aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile31
1 files changed, 12 insertions, 19 deletions
diff --git a/Makefile b/Makefile
index 3ea8f76..7a6a6a5 100644
--- a/Makefile
+++ b/Makefile
@@ -1,32 +1,24 @@
-PREFIX = /usr/local
-BINDIR = ${PREFIX}/bin
-DOCDIR = ${PREFIX}/share/doc
-KISSDOC = ${DOCDIR}/kiss
-MANPREFIX = ${PREFIX}/share/man
-MAN1 = ${MANPREFIX}/man1
-CC = cc
+# See LICENSE for copyright information
+include config.mk
-all: kiss-stat kiss-readlink
+BIN = bin/kiss-readlink bin/kiss-stat
-kiss-stat: bin/kiss-stat.c
- ${CC} -o kiss-stat bin/kiss-stat.c
+all: ${BIN}
-kiss-readlink: bin/kiss-readlink.c
- ${CC} -o kiss-readlink bin/kiss-readlink.c
+.c:
+ ${CC} ${CFLAGS} ${LDFLAGS} -o $@ $< ${LIBS}
clean:
- rm -f kiss-stat kiss-readlink
+ rm -f ${BIN}
install: all
mkdir -p ${DESTDIR}${BINDIR}
- cp -f kiss kiss-stat kiss-readlink ${DESTDIR}${BINDIR}
- chmod 755 ${DESTDIR}${BINDIR}/kiss \
- ${DESTDIR}${BINDIR}/kiss-stat \
- ${DESTDIR}${BINDIR}/kiss-readlink
+ cp -f kiss ${BIN} ${DESTDIR}${BINDIR}
+ chmod 755 ${DESTDIR}${BINDIR}/kiss
+ for bin in ${BIN}; do chmod 755 ${DESTDIR}${BINDIR}/$${bin##*/}; done
for bin in contrib/* ; do \
cp -f $${bin} ${DESTDIR}${BINDIR}/$${bin##*/}; \
chmod 755 ${DESTDIR}${BINDIR}/$${bin##*/} ; done
-
mkdir -p ${DESTDIR}${MAN1}
for man in man/*.1 ; do cp -f $${man} ${DESTDIR}${MAN1}/$${man##*/}; \
chmod 644 ${DESTDIR}${MAN1}/$${man##*/} ; done
@@ -39,7 +31,8 @@ uninstall:
rm -f ${DESTDIR}${BINDIR}/kiss
rm -f ${DESTDIR}${BINDIR}/kiss-stat
rm -f ${DESTDIR}${BINDIR}/kiss-readlink
- for bin in contrib/* ; do rm -f ${DESTDIR}${BINDIR}/$${bin##*/} ; done
+ for bin in ${BIN}; do rm -f ${DESTDIR}${BINDIR}/$${bin##*/}; done
+ for bin in contrib/*; do rm -f ${DESTDIR}${BINDIR}/$${bin##*/}; done
rm -f ${DESTDIR}${MAN1}/kiss.1 ${DESTDIR}${MAN1}/kiss.1
rm -f ${DESTDIR}${MAN1}/kiss-contrib.1 ${DESTDIR}${MAN1}/kiss-contrib.1
rm -rf ${DESTDIR}${KISSDOC}