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