Makefile (1369B)
1 # dmenu - dynamic menu 2 # See LICENSE file for copyright and license details. 3 4 include config.mk 5 6 SRC = drw.c dmenu.c stest.c util.c 7 OBJ = $(SRC:.c=.o) 8 9 all: options dmenu stest 10 11 options: 12 @echo dmenu build options: 13 @echo "CFLAGS = $(CFLAGS)" 14 @echo "LDFLAGS = $(LDFLAGS)" 15 @echo "CC = $(CC)" 16 17 .c.o: 18 $(CC) -c $(CFLAGS) $< 19 20 config.h: 21 cp config.def.h $@ 22 23 $(OBJ): arg.h config.h config.mk drw.h 24 25 dmenu: dmenu.o drw.o util.o 26 $(CC) -o $@ dmenu.o drw.o util.o $(LDFLAGS) 27 28 stest: stest.o 29 $(CC) -o $@ stest.o $(LDFLAGS) 30 31 clean: 32 rm -f dmenu stest $(OBJ) dmenu-$(VERSION).tar.gz 33 34 dist: clean 35 mkdir -p dmenu-$(VERSION) 36 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)\ 38 dmenu-$(VERSION) 39 tar -cf dmenu-$(VERSION).tar dmenu-$(VERSION) 40 gzip dmenu-$(VERSION).tar 41 rm -rf dmenu-$(VERSION) 42 43 install: all 44 mkdir -p $(DESTDIR)$(PREFIX)/bin 45 cp -f dmenu dmenu_path dmenu_run stest $(DESTDIR)$(PREFIX)/bin 46 chmod 755 $(DESTDIR)$(PREFIX)/bin/dmenu 47 chmod 755 $(DESTDIR)$(PREFIX)/bin/dmenu_path 48 chmod 755 $(DESTDIR)$(PREFIX)/bin/dmenu_run 49 chmod 755 $(DESTDIR)$(PREFIX)/bin/stest 50 rm -f dmenu *.o 51 52 uninstall: 53 rm -f $(DESTDIR)$(PREFIX)/bin/dmenu\ 54 $(DESTDIR)$(PREFIX)/bin/dmenu_path\ 55 $(DESTDIR)$(PREFIX)/bin/dmenu_run\ 56 $(DESTDIR)$(PREFIX)/bin/stest\ 57 58 .PHONY: all options clean dist install uninstall