aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorAkshay Nair <phenax5@gmail.com>2020-06-16 20:08:25 +0530
committerAkshay Nair <phenax5@gmail.com>2020-06-16 20:09:14 +0530
commit7bc460eb28b829537ba9b117eba238d4eaf7b059 (patch)
tree19244b8b5d43d0e0ccb0060d5d2df3736b096202 /Makefile
downloadshotkey-7bc460eb28b829537ba9b117eba238d4eaf7b059.tar.gz
shotkey-7bc460eb28b829537ba9b117eba238d4eaf7b059.zip
Init commit with all the shit
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile40
1 files changed, 40 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..c655b67
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,40 @@
+# daemonic - dynamic window manager
+# See LICENSE file for copyright and license details.
+
+include config.mk
+
+SRC = daemonic.c
+OBJ = ${SRC:.c=.o}
+
+all: clean options daemonic
+
+options:
+ @echo daemonic build options:
+ @echo "CFLAGS = ${CFLAGS}"
+ @echo "LDFLAGS = ${LDFLAGS}"
+ @echo "CC = ${CC}"
+
+.c.o:
+ ${CC} -c ${CFLAGS} $<
+
+${OBJ}: config.mk
+
+daemonic: ${OBJ}
+ ${CC} -o $@ ${OBJ} ${LDFLAGS}
+
+clean:
+ rm -f daemonic ${OBJ}
+
+install: all
+ mkdir -p ${DESTDIR}${PREFIX}/bin
+ cp -f daemonic ${DESTDIR}${PREFIX}/bin
+ chmod 755 ${DESTDIR}${PREFIX}/bin/daemonic
+ mkdir -p ${DESTDIR}${MANPREFIX}/man1
+ sed "s/VERSION/${VERSION}/g" < daemonic.1 > ${DESTDIR}${MANPREFIX}/man1/daemonic.1
+ chmod 644 ${DESTDIR}${MANPREFIX}/man1/daemonic.1
+
+uninstall:
+ rm -f ${DESTDIR}${PREFIX}/bin/daemonic\
+ ${DESTDIR}${MANPREFIX}/man1/daemonic.1
+
+.PHONY: all options clean dist install uninstall