A bit more uniformity in those --help messages wouldn't go amiss.
[sgt/utils] / base64 / Makefile
CommitLineData
1166ff62 1# for `make release' and `make html'
8a48d402 2DESTDIR = .
3
1166ff62 4# for `make install'
5PREFIX = /usr/local
6BINDIR = $(PREFIX)/bin
7MANDIR = $(PREFIX)/man/man1
f6cacff9 8INSTALL = install
9IPROG =# flags for installing programs (default none)
10IDATA = -m 0644 # flags for installing data
1166ff62 11
9acadc2b 12all: base64.1 base64
13
14base64: base64.c
15 $(CC) $(CFLAGS) -o $@ $<
16
17%.1: %.but
18 halibut --man=$@ $<
19
20clean:
8a48d402 21 rm -f *.1 base64 *.html *.tar.gz
22
23html:
24 halibut --html=$(DESTDIR)/base64.html base64.but
25
26release: base64.1
27 mkdir -p reltmp/base64
28 ln -s ../../base64.c reltmp/base64
29 ln -s ../../base64.1 reltmp/base64
30 ln -s ../../base64.but reltmp/base64
31 ln -s ../../Makefile reltmp/base64
ef397e72 32 tar -C reltmp -chzf $(DESTDIR)/base64.tar.gz base64
8a48d402 33 rm -rf reltmp
1166ff62 34
35install: base64 base64.1
36 mkdir -p $(BINDIR)
f6cacff9 37 $(INSTALL) $(IPROG) base64 $(BINDIR)/base64
1166ff62 38 mkdir -p $(MANDIR)
f6cacff9 39 $(INSTALL) $(IDATA) base64.1 $(MANDIR)/base64.1