From 1654d6cd6269bc784ee99045edd89e4bda24149f Mon Sep 17 00:00:00 2001 From: Connor Lane Smith Date: Sun, 15 May 2011 02:37:49 +0100 Subject: cleanup --- Makefile | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'Makefile') 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} -- cgit v1.2.3