1 0bef3bb5 2023-05-30 aa include version.mk
4 aab4ecb3 2022-07-14 src OBJ = $(BIN:=.o)
5 aab4ecb3 2022-07-14 src SRC = $(BIN:=.c)
6 aab4ecb3 2022-07-14 src MAN = $(BIN:=.1)
7 12236cc2 2023-05-30 aa M4S = $(BIN:=.m4)
9 0bef3bb5 2023-05-30 aa PREFIX ?= $(DESTDIR)/usr/local
10 0bef3bb5 2023-05-30 aa MANPREFIX ?= $(PREFIX)/man
16 0bef3bb5 2023-05-30 aa bindir = $(PREFIX)/bin
17 12236cc2 2023-05-30 aa mandir = $(MANPREFIX)/man1
18 0bef3bb5 2023-05-30 aa sharedir = $(PREFIX)/share
19 0bef3bb5 2023-05-30 aa gpassdir = $(sharedir)/gpass
21 12236cc2 2023-05-30 aa all: $(BIN) $(MAN)
23 12236cc2 2023-05-30 aa .SUFFIXES: .c .o .1 .m4
25 0bef3bb5 2023-05-30 aa $(BIN): $(OBJ)
26 0bef3bb5 2023-05-30 aa $(CC) -o $@ $(OBJ) $(LIBS) $(LDFLAGS)
29 0bef3bb5 2023-05-30 aa $(CC) -std=c99 -pedantic -DPREFIX=\"$(PREFIX)\" $(CFLAGS) $(CPPFLAGS) -c $<
31 12236cc2 2023-05-30 aa $(MAN): $(M4S)
34 12236cc2 2023-05-30 aa $(M4) -DPREFIX=$(PREFIX) <$< >$@
37 0bef3bb5 2023-05-30 aa mkdir -p $(bindir)
38 0bef3bb5 2023-05-30 aa install -m 755 $(BIN) $(bindir)
39 12236cc2 2023-05-30 aa mkdir -p $(mandir)
40 12236cc2 2023-05-30 aa install -m 644 $(MAN) $(mandir)
41 0bef3bb5 2023-05-30 aa mkdir -p $(gpassdir)
42 0bef3bb5 2023-05-30 aa install -m 644 eff.long $(gpassdir)
45 0bef3bb5 2023-05-30 aa cd $(bindir) && rm -f $(BIN)
46 12236cc2 2023-05-30 aa cd $(mandir) && rm -f $(MAN)
47 0bef3bb5 2023-05-30 aa rm -rf $(gpassdir)
50 12236cc2 2023-05-30 aa -rm -f $(BIN) $(OBJ) $(MAN) *.tar.gz *.core gpass-$(V)
53 0bef3bb5 2023-05-30 aa mkdir -p gpass-$(V)
54 0123a9a6 2023-05-30 aa cp -f CHANGES COPYING README Makefile version.mk eff.long $(SRC) $(M4S) \
56 0123a9a6 2023-05-30 aa tar cf - gpass-$(V) | gzip >gpass-$(V).tar.gz
57 0bef3bb5 2023-05-30 aa rm -rf gpass-$(V)
62 03321501 2022-08-21 src .PHONY: all options install uninstall clean dist