2 # See LICENSE file for copyright and license details.
6 SRC
= drw.c dmenu.c stest.c util.c
17 $(OBJ
): arg.h config.h config.mk drw.h
19 dmenu
: dmenu.o drw.o util.o
20 $(CC
) -o
$@ dmenu.o drw.o util.o
$(LDFLAGS
)
23 $(CC
) -o
$@ stest.o
$(LDFLAGS
)
26 rm -f dmenu stest
$(OBJ
) dmenu-
$(VERSION
).
tar.gz
29 mkdir
-p dmenu-
$(VERSION
)
30 cp LICENSE Makefile README arg.h config.def.h config.mk dmenu
.1\
31 drw.h util.h dmenu_path dmenu_run stest
.1 $(SRC
)\
33 tar -cf dmenu-
$(VERSION
).
tar dmenu-
$(VERSION
)
34 gzip dmenu-
$(VERSION
).
tar
35 rm -rf dmenu-
$(VERSION
)
38 mkdir
-p
$(DESTDIR
)$(PREFIX
)/bin
39 cp
-f dmenu dmenu_path dmenu_run stest
$(DESTDIR
)$(PREFIX
)/bin
40 chmod
755 $(DESTDIR
)$(PREFIX
)/bin
/dmenu
41 chmod
755 $(DESTDIR
)$(PREFIX
)/bin
/dmenu_path
42 chmod
755 $(DESTDIR
)$(PREFIX
)/bin
/dmenu_run
43 chmod
755 $(DESTDIR
)$(PREFIX
)/bin
/stest
44 mkdir
-p
$(DESTDIR
)$(MANPREFIX
)/man1
45 sed
"s/VERSION/$(VERSION)/g" < dmenu
.1 > $(DESTDIR
)$(MANPREFIX
)/man1
/dmenu
.1
46 sed
"s/VERSION/$(VERSION)/g" < stest
.1 > $(DESTDIR
)$(MANPREFIX
)/man1
/stest
.1
47 chmod
644 $(DESTDIR
)$(MANPREFIX
)/man1
/dmenu
.1
48 chmod
644 $(DESTDIR
)$(MANPREFIX
)/man1
/stest
.1
51 rm -f
$(DESTDIR
)$(PREFIX
)/bin
/dmenu\
52 $(DESTDIR
)$(PREFIX
)/bin
/dmenu_path\
53 $(DESTDIR
)$(PREFIX
)/bin
/dmenu_run\
54 $(DESTDIR
)$(PREFIX
)/bin
/stest\
55 $(DESTDIR
)$(MANPREFIX
)/man1
/dmenu
.1\
56 $(DESTDIR
)$(MANPREFIX
)/man1
/stest
.1
58 .PHONY
: all clean dist install uninstall