diff options
author | arg@suckless.org <unknown> | 2006-10-11 12:35:21 +0200 |
---|---|---|
committer | arg@suckless.org <unknown> | 2006-10-11 12:35:21 +0200 |
commit | 763e52878dba100e79c6f4a837a92e1df0d41ae0 (patch) | |
tree | 7cad40c95b64e52358bb5ddc3aec3589aa6c77b8 /Makefile |
initial commit
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..a84e889 --- /dev/null +++ b/Makefile | |||
@@ -0,0 +1,52 @@ | |||
1 | # slock - simple screen locker | ||
2 | # (C)opyright MMVI Anselm R. Garbe | ||
3 | |||
4 | include config.mk | ||
5 | |||
6 | SRC = slock.c | ||
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 | @echo "LD = ${LD}" | ||
17 | |||
18 | .c.o: | ||
19 | @echo CC $< | ||
20 | @${CC} -c ${CFLAGS} $< | ||
21 | |||
22 | ${OBJ}: config.mk | ||
23 | |||
24 | slock: ${OBJ} | ||
25 | @echo LD $@ | ||
26 | @${LD} -o $@ ${OBJ} ${LDFLAGS} | ||
27 | @strip $@ | ||
28 | |||
29 | clean: | ||
30 | @echo cleaning | ||
31 | @rm -f slock ${OBJ} slock-${VERSION}.tar.gz | ||
32 | |||
33 | dist: clean | ||
34 | @echo creating dist tarball | ||
35 | @mkdir -p slock-${VERSION} | ||
36 | @cp -R LICENSE Makefile README config.mk ${SRC} slock-${VERSION} | ||
37 | @tar -cf slock-${VERSION}.tar slock-${VERSION} | ||
38 | @gzip slock-${VERSION}.tar | ||
39 | @rm -rf slock-${VERSION} | ||
40 | |||
41 | install: all | ||
42 | @echo installing executable file to ${DESTDIR}${PREFIX}/bin | ||
43 | @mkdir -p ${DESTDIR}${PREFIX}/bin | ||
44 | @cp -f slock ${DESTDIR}${PREFIX}/bin | ||
45 | @chmod 755 ${DESTDIR}${PREFIX}/bin/slock | ||
46 | @chmod u+s ${DESTDIR}${PREFIX}/bin/slock | ||
47 | |||
48 | uninstall: | ||
49 | @echo removing executable file from ${DESTDIR}${PREFIX}/bin | ||
50 | @rm -f ${DESTDIR}${PREFIX}/bin/slock | ||
51 | |||
52 | .PHONY: all options clean dist install uninstall | ||