aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorConnor Lane Smith2011-05-15 02:37:49 +0100
committerConnor Lane Smith2011-05-15 02:37:49 +0100
commit1654d6cd6269bc784ee99045edd89e4bda24149f (patch)
tree9d440b1133201d2083e99213412f92d094adc516 /Makefile
parent6cc0b0dc086feaf944b166d0b459ac407192ea5e (diff)
cleanup
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 @@
include config.mk
+SRC = dmenu.c draw.c
+OBJ = ${SRC:.c=.o}
+
all: options dmenu
options:
@@ -11,22 +14,24 @@ options:
@echo "LDFLAGS = ${LDFLAGS}"
@echo "CC = ${CC}"
-dmenu: dmenu.o draw.o
- @echo CC -o $@
- @${CC} -o $@ dmenu.o draw.o ${LDFLAGS}
-
-.c.o: config.mk
+.c.o:
@echo CC -c $<
@${CC} -c $< ${CFLAGS}
+${OBJ}: config.mk
+
+dmenu: ${OBJ}
+ @echo CC -o $@
+ @${CC} -o $@ ${OBJ} ${LDFLAGS}
+
clean:
@echo cleaning
- @rm -f dmenu dmenu.o draw.o dmenu-${VERSION}.tar.gz
+ @rm -f dmenu ${OBJ} dmenu-${VERSION}.tar.gz
dist: clean
@echo creating dist tarball
@mkdir -p dmenu-${VERSION}
- @cp LICENSE Makefile README config.mk dmenu.1 dmenu.c draw.c draw.h dmenu_path dmenu_run dmenu-${VERSION}
+ @cp LICENSE Makefile README config.mk dmenu.1 draw.h dmenu_path dmenu_run ${SRC} dmenu-${VERSION}
@tar -cf dmenu-${VERSION}.tar dmenu-${VERSION}
@gzip dmenu-${VERSION}.tar
@rm -rf dmenu-${VERSION}