aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile19
1 files changed, 12 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index 60e53d1..5871fa7 100644
--- a/Makefile
+++ b/Makefile
@@ -3,6 +3,9 @@
3 3
4include config.mk 4include config.mk
5 5
6SRC = dmenu.c draw.c
7OBJ = ${SRC:.c=.o}
8
6all: options dmenu 9all: options dmenu
7 10
8options: 11options:
@@ -11,22 +14,24 @@ options:
11 @echo "LDFLAGS = ${LDFLAGS}" 14 @echo "LDFLAGS = ${LDFLAGS}"
12 @echo "CC = ${CC}" 15 @echo "CC = ${CC}"
13 16
14dmenu: dmenu.o draw.o 17.c.o:
15 @echo CC -o $@
16 @${CC} -o $@ dmenu.o draw.o ${LDFLAGS}
17
18.c.o: config.mk
19 @echo CC -c $< 18 @echo CC -c $<
20 @${CC} -c $< ${CFLAGS} 19 @${CC} -c $< ${CFLAGS}
21 20
21${OBJ}: config.mk
22
23dmenu: ${OBJ}
24 @echo CC -o $@
25 @${CC} -o $@ ${OBJ} ${LDFLAGS}
26
22clean: 27clean:
23 @echo cleaning 28 @echo cleaning
24 @rm -f dmenu dmenu.o draw.o dmenu-${VERSION}.tar.gz 29 @rm -f dmenu ${OBJ} dmenu-${VERSION}.tar.gz
25 30
26dist: clean 31dist: clean
27 @echo creating dist tarball 32 @echo creating dist tarball
28 @mkdir -p dmenu-${VERSION} 33 @mkdir -p dmenu-${VERSION}
29 @cp LICENSE Makefile README config.mk dmenu.1 dmenu.c draw.c draw.h dmenu_path dmenu_run dmenu-${VERSION} 34 @cp LICENSE Makefile README config.mk dmenu.1 draw.h dmenu_path dmenu_run ${SRC} dmenu-${VERSION}
30 @tar -cf dmenu-${VERSION}.tar dmenu-${VERSION} 35 @tar -cf dmenu-${VERSION}.tar dmenu-${VERSION}
31 @gzip dmenu-${VERSION}.tar 36 @gzip dmenu-${VERSION}.tar
32 @rm -rf dmenu-${VERSION} 37 @rm -rf dmenu-${VERSION}