Ooh, and make links to . and .. work properly as well.
[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
8
9acadc2b 9all: base64.1 base64
10
11base64: base64.c
12 $(CC) $(CFLAGS) -o $@ $<
13
14%.1: %.but
15 halibut --man=$@ $<
16
17clean:
8a48d402 18 rm -f *.1 base64 *.html *.tar.gz
19
20html:
21 halibut --html=$(DESTDIR)/base64.html base64.but
22
23release: 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
ef397e72 29 tar -C reltmp -chzf $(DESTDIR)/base64.tar.gz base64
8a48d402 30 rm -rf reltmp
1166ff62 31
32install: 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