summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorMichael Stapelberg <michael+x200@stapelberg.de>2009-03-11 22:17:00 +0100
committerMichael Stapelberg <michael+x200@stapelberg.de>2009-03-11 22:17:00 +0100
commit91672632868a56cb229d3311f7a2b5c86eadbcec (patch)
treeb20ebddeeb2e0f40dc6878821066fc06ae9598de /Makefile
Initial import of i3lock 0.9
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile49
1 files changed, 49 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..4a8d2a1
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,49 @@
+# slock - simple screen locker
+# © 2006-2007 Anselm R. Garbe, Sander van Dijk
+# © 2009 Michael Stapelberg
+
+include config.mk
+
+SRC = i3lock.c
+OBJ = ${SRC:.c=.o}
+
+all: options i3lock
+
+options:
+ @echo i3lock build options:
+ @echo "CFLAGS = ${CFLAGS}"
+ @echo "LDFLAGS = ${LDFLAGS}"
+ @echo "CC = ${CC}"
+
+.c.o:
+ @echo CC $<
+ @${CC} -c ${CFLAGS} $<
+
+${OBJ}: config.mk
+
+i3lock: ${OBJ}
+ @echo CC -o $@
+ @${CC} -o $@ ${OBJ} ${LDFLAGS}
+
+clean:
+ @echo cleaning
+ @rm -f i3lock ${OBJ} i3lock-${VERSION}.tar.gz
+
+dist: clean
+ @echo creating dist tarball
+ @mkdir -p i3lock-${VERSION}
+ @cp -R LICENSE Makefile README config.mk ${SRC} slock-${VERSION}
+ @tar -cf i3lock-${VERSION}.tar i3lock-${VERSION}
+ @gzip i3lock-${VERSION}.tar
+ @rm -rf i3lock-${VERSION}
+
+install: all
+ @echo installing executable file to $(DESTDIR)$(PREFIX)/bin
+ $(INSTALL) -d $(DESTDIR)$(PREFIX)/bin
+ $(INSTALL) -m 4755 i3lock $(DESTDIR)$(PREFIX)/bin/i3lock
+
+uninstall:
+ @echo removing executable file from $(DESTDIR)$(PREFIX)/bin
+ @rm -f $(DESTDIR)$(PREFIX)/bin/i3lock
+
+.PHONY: all options clean dist install uninstall