Add the --files option, to list individual files in the various
[sgt/agedu] / GNUmakefile
CommitLineData
c057c101 1# Makefile for agedu.
70322ae3 2
3prefix = /usr/local
70322ae3 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
995db599 14AGEDU_MODULES := agedu du alloc trie index html httpd fgetline licence
70322ae3 15AGEDU_OBJS := $(patsubst %,%.o,$(AGEDU_MODULES))
16
17ALLMODULES := $(sort $(AGEDU_MODULES))
18ALLOBJS := $(patsubst %,%.o,$(ALLMODULES))
19ALLDEPS := $(patsubst %,%.d,$(ALLMODULES))
20
50e82fdc 21BINARIES = agedu
70322ae3 22
50e82fdc 23binaries: $(BINARIES)
24
25agedu: config.h $(AGEDU_OBJS)
70322ae3 26 gcc $(LFLAGS) -o agedu $(AGEDU_OBJS)
27
50e82fdc 28config.h: configure
56cae6e1 29 ./configure -q
50e82fdc 30 rm -f Makefile # we keep using _this_ Makefile
31
32configure: configure.ac
33 aclocal
34 autoconf
35 autoheader
36 automake -a --foreign
37
70322ae3 38INTERNALFLAGS=#
39
40$(ALLOBJS): %.o: %.c
41 gcc $(CFLAGS) -MM $*.c > $*.d
42 gcc $(CFLAGS) $(INTERNALFLAGS) -c $*.c
43
67159944 44MANPAGES = agedu.1
45
46doc: $(MANPAGES)
47$(MANPAGES): %.1: %.but
48 halibut --man=$*.1 $*.but
49
70322ae3 50clean:
50e82fdc 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
70322ae3 58
59-include $(ALLDEPS)