pinentry-dmenu

Yet another implementation of pinentry-dmenu
git clone git://git.ckyln.com/pinentry-dmenu.git
Log | Files | Refs | README | LICENSE

Makefile (1556B)


      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 util.c
      7 OBJ = $(SRC:.c=.o)
      8 
      9 all: options pinentry-dmenu-core
     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 pinentry-dmenu-core: dmenu.o drw.o util.o
     26 	$(CC) -o $@ dmenu.o drw.o util.o $(LDFLAGS)
     27 
     28 clean:
     29 	rm -f pinentry-dmenu-core $(OBJ) pinentry-dmenu-$(VERSION).tar.gz
     30 
     31 dist: clean
     32 	mkdir -p pinentry-dmenu-$(VERSION)
     33 	cp LICENSE Makefile README.md arg.h config.def.h pinentry-dmenu config.mk\
     34 		drw.h util.h $(SRC)\
     35 		pinentry-dmenu-$(VERSION)
     36 	tar -cf pinentry-dmenu-$(VERSION).tar pinentry-dmenu-$(VERSION)
     37 	gzip pinentry-dmenu-$(VERSION).tar
     38 	rm -rf pinentry-dmenu-$(VERSION)
     39 
     40 install: all
     41 	mkdir -p $(DESTDIR)$(PREFIX)/bin
     42 	cp -f pinentry-dmenu-core pinentry-dmenu $(DESTDIR)$(PREFIX)/bin
     43 	chmod 755 $(DESTDIR)$(PREFIX)/bin/pinentry-dmenu-core
     44 	chmod 755 $(DESTDIR)$(PREFIX)/bin/pinentry-dmenu
     45 
     46 pinentry-install:
     47 	mkdir -p $(DESTDIR)$(PREFIX)/bin
     48 	sed 's#pinentry-dmenu-core#dmenu#g' < pinentry-dmenu > $(DESTDIR)$(PREFIX)/bin/pinentry-dmenu
     49 	chmod 755 $(DESTDIR)$(PREFIX)/bin/pinentry-dmenu
     50 
     51 uninstall:
     52 	rm -f $(DESTDIR)$(PREFIX)/bin/pinentry-dmenu-core
     53 	rm -f $(DESTDIR)$(PREFIX)/bin/pinentry-dmenu
     54 
     55 pinentry-uninstall:
     56 	rm -f $(DESTDIR)$(PREFIX)/bin/pinentry-dmenu
     57 
     58 .PHONY: all options clean dist install uninstall pinentry-install pinentry-uninstall