1166ff62 |
1 | # for `make release' and `make html' |
8a48d402 |
2 | DESTDIR = . |
3 | |
1166ff62 |
4 | # for `make install' |
5 | PREFIX = /usr/local |
6 | BINDIR = $(PREFIX)/bin |
7 | MANDIR = $(PREFIX)/man/man1 |
8 | |
9acadc2b |
9 | all: base64.1 base64 |
10 | |
11 | base64: base64.c |
12 | $(CC) $(CFLAGS) -o $@ $< |
13 | |
14 | %.1: %.but |
15 | halibut --man=$@ $< |
16 | |
17 | clean: |
8a48d402 |
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 |
ef397e72 |
29 | tar -C reltmp -chzf $(DESTDIR)/base64.tar.gz base64 |
8a48d402 |
30 | rm -rf reltmp |
1166ff62 |
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 |