dmenu

Simple dynamic menu for X
git clone https://git.sinitax.com/suckless/dmenu
Log | Files | Refs | README | LICENSE | sfeed.txt

Makefile (1576B)


      1# dmenu - dynamic menu
      2# See LICENSE file for copyright and license details.
      3
      4include config.mk
      5
      6SRC = drw.c dmenu.c stest.c util.c
      7OBJ = $(SRC:.c=.o)
      8
      9all: dmenu stest
     10
     11.c.o:
     12	$(CC) -c $(CFLAGS) $<
     13
     14config.h:
     15	cp config.def.h $@
     16
     17$(OBJ): arg.h config.h config.mk drw.h
     18
     19dmenu: dmenu.o drw.o util.o
     20	$(CC) -o $@ dmenu.o drw.o util.o $(LDFLAGS)
     21
     22stest: stest.o
     23	$(CC) -o $@ stest.o $(LDFLAGS)
     24
     25clean:
     26	rm -f dmenu stest $(OBJ) dmenu-$(VERSION).tar.gz
     27
     28dist: clean
     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)\
     32		dmenu-$(VERSION)
     33	tar -cf dmenu-$(VERSION).tar dmenu-$(VERSION)
     34	gzip dmenu-$(VERSION).tar
     35	rm -rf dmenu-$(VERSION)
     36
     37install: all
     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
     49
     50uninstall:
     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
     57
     58.PHONY: all clean dist install uninstall