When displaying sizes as a floating-point number (e.g. "123.4 Mb"),
[sgt/agedu] / GNUmakefile
... / ...
CommitLineData
1# Makefile for agedu.
2
3prefix = /usr/local
4bindir = $(prefix)/bin
5mandir = $(prefix)/man
6man1dir = $(mandir)/man1
7
8INSTALL = install
9
10CFLAGS = -Wall --std=c99 -pedantic $(XFLAGS)
11
12-include Makefile.local
13
14AGEDU_MODULES := agedu du alloc trie index html httpd fgetline licence
15AGEDU_OBJS := $(patsubst %,%.o,$(AGEDU_MODULES))
16
17ALLMODULES := $(sort $(AGEDU_MODULES))
18ALLOBJS := $(patsubst %,%.o,$(ALLMODULES))
19ALLDEPS := $(patsubst %,%.d,$(ALLMODULES))
20
21BINARIES = agedu
22
23binaries: $(BINARIES)
24
25agedu: config.h $(AGEDU_OBJS)
26 gcc $(LFLAGS) -o agedu $(AGEDU_OBJS)
27
28config.h: configure
29 ./configure -q
30 rm -f Makefile # we keep using _this_ Makefile
31
32configure: configure.ac
33 aclocal
34 autoconf
35 autoheader
36 automake -a --foreign
37
38INTERNALFLAGS=#
39
40$(ALLOBJS): %.o: %.c
41 gcc $(CFLAGS) -MM $*.c > $*.d
42 gcc $(CFLAGS) $(INTERNALFLAGS) -c $*.c
43
44MANPAGES = agedu.1
45
46doc: $(MANPAGES)
47$(MANPAGES): %.1: %.but
48 halibut --man=$*.1 $*.but
49
50clean:
51 rm -f $(ALLOBJS) $(ALLDEPS) $(MANPAGES) $(BINARIES)
52
53spotless: clean
54 rm -f config.h config.h.in config.log config.status configure
55 rm -f depcomp install-sh missing stamp-h1
56 rm -f Makefile.in aclocal.m4
57 rm -rf autom4te.cache .deps
58
59-include $(ALLDEPS)