From bca8e3bce04a63caf5e24c6c4b70c8603756d80f Mon Sep 17 00:00:00 2001 From: KatolaZ Date: Wed, 7 Aug 2019 15:56:11 +0100 Subject: add Makefile, README, manpage --- Makefile | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 Makefile (limited to 'Makefile') diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..051bd74 --- /dev/null +++ b/Makefile @@ -0,0 +1,39 @@ +.POSIX: + +include config.mk + +SRC = 2ls10.c +OBJ = ${SRC:.c=.o} + +all: options 2ls10 + +options: + @echo "-+- build options -+-" + @echo "PREFIX = ${PREFIX}" + @echo "CFLAGS = ${CFLAGS}" + @echo "LDFLAGS = ${LDFLAGS}" + @echo "CC = ${CC}" + @echo "-+-+-+-+-+-+-+-+-+-+-" + +2ls10: ${OBJ} + +clean: + @echo cleaning + @rm -f 2ls10 ${OBJ} + +install: all + @echo installing executable to "${DESTDIR}${BINDIR}" + @mkdir -p "${DESTDIR}${BINDIR}" + @cp -f 2ls10 "${DESTDIR}${BINDIR}" + @chmod 755 "${DESTDIR}${BINDIR}/2ls10" + @echo installing manpage to "${DESTDIR}${MANDIR}/man6" + @mkdir -p "${DESTDIR}${MANDIR}/man6" + @cp -f 2ls10.6 "${DESTDIR}${MANDIR}/man6" + @chmod 644 "${DESTDIR}${MANDIR}/man6/2ls10.6" + +uninstall: + @echo removing executable from "${DESTDIR}${BINDIR}" + @rm -f "${DESTDIR}${BINDIR}/2ls10" + @echo removing manpage from "${DESTDIR}${MANDIR}/man6" + @rm -f "${DESTDIR}${MANDIR}/man6/2ls10.6" + -- cgit v1.2.3