Makefile (844B)
1 # slock - simple screen locker 2 # See LICENSE file for copyright and license details. 3 4 include config.mk 5 6 SRC = slock.c ${COMPATSRC} 7 OBJ = ${SRC:.c=.o} 8 9 all: options slock 10 11 options: 12 @echo slock build options: 13 @echo "CFLAGS = ${CFLAGS}" 14 @echo "LDFLAGS = ${LDFLAGS}" 15 @echo "CC = ${CC}" 16 17 .c.o: 18 @echo CC $< 19 @${CC} -c ${CFLAGS} $< 20 21 ${OBJ}: config.h config.mk arg.h util.h 22 23 slock: ${OBJ} 24 @echo CC -o $@ 25 @${CC} -o $@ ${OBJ} ${LDFLAGS} 26 27 install: all 28 @echo installing executable file to ${DESTDIR}${PREFIX}/bin 29 @mkdir -p ${DESTDIR}${PREFIX}/bin 30 @cp -f slock ${DESTDIR}${PREFIX}/bin 31 @chmod 755 ${DESTDIR}${PREFIX}/bin/slock 32 @chmod u+s ${DESTDIR}${PREFIX}/bin/slock 33 @rm -f slock *.o 34 35 uninstall: 36 @echo removing executable file from ${DESTDIR}${PREFIX}/bin 37 @rm -f ${DESTDIR}${PREFIX}/bin/slock 38 39 .PHONY: all options install uninstall