aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile66
1 files changed, 28 insertions, 38 deletions
diff --git a/Makefile b/Makefile
index daac40b..a03a95c 100644
--- a/Makefile
+++ b/Makefile
@@ -15,60 +15,50 @@ options:
15 @echo "CC = $(CC)" 15 @echo "CC = $(CC)"
16 16
17.c.o: 17.c.o:
18 @echo CC $< 18 $(CC) -c $(CFLAGS) $<
19 @$(CC) -c $(CFLAGS) $<
20 19
21config.h: 20config.h:
22 @echo creating $@ from config.def.h 21 cp config.def.h $@
23 @cp config.def.h $@
24 22
25$(OBJ): arg.h config.h config.mk drw.h 23$(OBJ): arg.h config.h config.mk drw.h
26 24
27dmenu: dmenu.o drw.o util.o 25dmenu: dmenu.o drw.o util.o
28 @echo CC -o $@ 26 $(CC) -o $@ dmenu.o drw.o util.o $(LDFLAGS)
29 @$(CC) -o $@ dmenu.o drw.o util.o $(LDFLAGS)
30 27
31stest: stest.o 28stest: stest.o
32 @echo CC -o $@ 29 $(CC) -o $@ stest.o $(LDFLAGS)
33 @$(CC) -o $@ stest.o $(LDFLAGS)
34 30
35clean: 31clean:
36 @echo cleaning 32 rm -f dmenu stest $(OBJ) dmenu-$(VERSION).tar.gz
37 @rm -f dmenu stest $(OBJ) dmenu-$(VERSION).tar.gz
38 33
39dist: clean 34dist: clean
40 @echo creating dist tarball 35 mkdir -p dmenu-$(VERSION)
41 @mkdir -p dmenu-$(VERSION) 36 cp LICENSE Makefile README arg.h config.def.h config.mk dmenu.1\
42 @cp LICENSE Makefile README arg.h config.def.h config.mk dmenu.1 \ 37 drw.h util.h dmenu_path dmenu_run stest.1 $(SRC)\
43 drw.h util.h dmenu_path dmenu_run stest.1 $(SRC) \
44 dmenu-$(VERSION) 38 dmenu-$(VERSION)
45 @tar -cf dmenu-$(VERSION).tar dmenu-$(VERSION) 39 tar -cf dmenu-$(VERSION).tar dmenu-$(VERSION)
46 @gzip dmenu-$(VERSION).tar 40 gzip dmenu-$(VERSION).tar
47 @rm -rf dmenu-$(VERSION) 41 rm -rf dmenu-$(VERSION)
48 42
49install: all 43install: all
50 @echo installing executables to $(DESTDIR)$(PREFIX)/bin 44 mkdir -p $(DESTDIR)$(PREFIX)/bin
51 @mkdir -p $(DESTDIR)$(PREFIX)/bin 45 cp -f dmenu dmenu_path dmenu_run stest $(DESTDIR)$(PREFIX)/bin
52 @cp -f dmenu dmenu_path dmenu_run stest $(DESTDIR)$(PREFIX)/bin 46 chmod 755 $(DESTDIR)$(PREFIX)/bin/dmenu
53 @chmod 755 $(DESTDIR)$(PREFIX)/bin/dmenu 47 chmod 755 $(DESTDIR)$(PREFIX)/bin/dmenu_path
54 @chmod 755 $(DESTDIR)$(PREFIX)/bin/dmenu_path 48 chmod 755 $(DESTDIR)$(PREFIX)/bin/dmenu_run
55 @chmod 755 $(DESTDIR)$(PREFIX)/bin/dmenu_run 49 chmod 755 $(DESTDIR)$(PREFIX)/bin/stest
56 @chmod 755 $(DESTDIR)$(PREFIX)/bin/stest 50 mkdir -p $(DESTDIR)$(MANPREFIX)/man1
57 @echo installing manual pages to $(DESTDIR)$(MANPREFIX)/man1 51 sed "s/VERSION/$(VERSION)/g" < dmenu.1 > $(DESTDIR)$(MANPREFIX)/man1/dmenu.1
58 @mkdir -p $(DESTDIR)$(MANPREFIX)/man1 52 sed "s/VERSION/$(VERSION)/g" < stest.1 > $(DESTDIR)$(MANPREFIX)/man1/stest.1
59 @sed "s/VERSION/$(VERSION)/g" < dmenu.1 > $(DESTDIR)$(MANPREFIX)/man1/dmenu.1 53 chmod 644 $(DESTDIR)$(MANPREFIX)/man1/dmenu.1
60 @sed "s/VERSION/$(VERSION)/g" < stest.1 > $(DESTDIR)$(MANPREFIX)/man1/stest.1 54 chmod 644 $(DESTDIR)$(MANPREFIX)/man1/stest.1
61 @chmod 644 $(DESTDIR)$(MANPREFIX)/man1/dmenu.1
62 @chmod 644 $(DESTDIR)$(MANPREFIX)/man1/stest.1
63 55
64uninstall: 56uninstall:
65 @echo removing executables from $(DESTDIR)$(PREFIX)/bin 57 rm -f $(DESTDIR)$(PREFIX)/bin/dmenu\
66 @rm -f $(DESTDIR)$(PREFIX)/bin/dmenu 58 $(DESTDIR)$(PREFIX)/bin/dmenu_path\
67 @rm -f $(DESTDIR)$(PREFIX)/bin/dmenu_path 59 $(DESTDIR)$(PREFIX)/bin/dmenu_run\
68 @rm -f $(DESTDIR)$(PREFIX)/bin/dmenu_run 60 $(DESTDIR)$(PREFIX)/bin/stest\
69 @rm -f $(DESTDIR)$(PREFIX)/bin/stest 61 $(DESTDIR)$(MANPREFIX)/man1/dmenu.1\
70 @echo removing manual page from $(DESTDIR)$(MANPREFIX)/man1 62 $(DESTDIR)$(MANPREFIX)/man1/stest.1
71 @rm -f $(DESTDIR)$(MANPREFIX)/man1/dmenu.1
72 @rm -f $(DESTDIR)$(MANPREFIX)/man1/stest.1
73 63
74.PHONY: all options clean dist install uninstall 64.PHONY: all options clean dist install uninstall