X-Git-Url: https://git.xinqibao.xyz/dwm.git/blobdiff_plain/bba044de4f055e4a5b6605c221bded849b8bd53e..c2b908f603bd30c9dcf9990ad3964b9864716c2a:/Makefile

diff --git a/Makefile b/Makefile
index 5454fbb..ad8ec08 100644
--- a/Makefile
+++ b/Makefile
@@ -3,36 +3,36 @@
 
 include config.mk
 
-SRC = client.c draw.c event.c main.c tag.c util.c
+SRC = client.c draw.c event.c main.c tag.c util.c view.c
 OBJ = ${SRC:.c=.o}
-CONFIG ?= config.default.h
 
 all: options dwm
-	@echo finished
 
 options:
 	@echo dwm build options:
 	@echo "CFLAGS   = ${CFLAGS}"
 	@echo "LDFLAGS  = ${LDFLAGS}"
 	@echo "CC       = ${CC}"
+	@echo "LD       = ${LD}"
 
 .c.o:
 	@echo CC $<
 	@${CC} -c ${CFLAGS} $<
 
-${OBJ}: dwm.h config.h
+${OBJ}: dwm.h config.h config.mk
 
-config.h: ${CONFIG}
-	@echo creating $@ from $>
-	@cp $> $@
+config.h:
+	@echo creating $@ from config.default.h
+	@cp config.default.h $@
 
 dwm: ${OBJ}
 	@echo LD $@
-	@${CC} -o $@ ${OBJ} ${LDFLAGS}
+	@${LD} -o $@ ${OBJ} ${LDFLAGS}
+	@strip $@
 
 clean:
 	@echo cleaning
-	@rm -f dwm ${OBJ} config.h dwm-${VERSION}.tar.gz
+	@rm -f dwm ${OBJ} dwm-${VERSION}.tar.gz
 
 dist: clean
 	@echo creating dist tarball
@@ -50,7 +50,7 @@ install: all
 	@chmod 755 ${DESTDIR}${PREFIX}/bin/dwm
 	@echo installing manual page to ${DESTDIR}${MANPREFIX}/man1
 	@mkdir -p ${DESTDIR}${MANPREFIX}/man1
-	@cp -f dwm.1 ${DESTDIR}${MANPREFIX}/man1
+	@sed 's/VERSION/${VERSION}/g' < dwm.1 > ${DESTDIR}${MANPREFIX}/man1/dwm.1
 	@chmod 644 ${DESTDIR}${MANPREFIX}/man1/dwm.1
 
 uninstall: