summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile39
1 files changed, 39 insertions, 0 deletions
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"
+