Bug fixes.
[sgt/utils] / base64 / Makefile
1 # for `make release' and `make html'
2 DESTDIR = .
3
4 # for `make install'
5 PREFIX = /usr/local
6 BINDIR = $(PREFIX)/bin
7 MANDIR = $(PREFIX)/man/man1
8
9 all: base64.1 base64
10
11 base64: base64.c
12 $(CC) $(CFLAGS) -o $@ $<
13
14 %.1: %.but
15 halibut --man=$@ $<
16
17 clean:
18 rm -f *.1 base64 *.html *.tar.gz
19
20 html:
21 halibut --html=$(DESTDIR)/base64.html base64.but
22
23 release: base64.1
24 mkdir -p reltmp/base64
25 ln -s ../../base64.c reltmp/base64
26 ln -s ../../base64.1 reltmp/base64
27 ln -s ../../base64.but reltmp/base64
28 ln -s ../../Makefile reltmp/base64
29 tar -C reltmp -chzf $(DESTDIR)/base64.tar.gz base64
30 rm -rf reltmp
31
32 install: base64 base64.1
33 mkdir -p $(BINDIR)
34 install base64 $(BINDIR)/base64
35 mkdir -p $(MANDIR)
36 install -m 0644 base64.1 $(MANDIR)/base64.1