autoconf onak-mail.pl config
[onak.git] / Makefile.in
1 #
2 # Makefile for onak.
3 #
4
5 CC = @CC@
6 CFLAGS += @CFLAGS@ -Wall -pedantic
7 # Uncomment to enable profiling.
8 LDFLAGS += @LDFLAGS@
9 # Can be "pg" for Postgresql, "file" for flat files or "db2" for pksd db2 style.
10 DBTYPE = @DBTYPE@
11 #
12 LIBS = @LIBS@
13 prefix ?= @prefix@
14
15 PROGS = add lookup gpgwww onak splitkeys onak-mail.pl
16 CORE_OBJS = armor.o charfuncs.o decodekey.o getcgi.o hash.o keydb_$(DBTYPE).o \
17         keyid.o keyindex.o ll.o mem.o onak-conf.o parsekey.o sha1.o md5.o \
18         log.o photoid.o wordlist.o
19 OBJS = merge.o stats.o sendsync.o cleankey.o $(CORE_OBJS)
20 SRCS = armor.c parsekey.c merge.c keyid.c md5.c sha1.c main.c getcgi.c mem.c \
21         keyindex.c stats.c lookup.c add.c keydb_$(DBTYPE).c ll.c hash.c \
22         gpgwww.c onak-conf.c charfuncs.c sendsync.c log.c photoid.c \
23         wordlist.c cleankey.c
24
25 all: .depend $(PROGS) testparse maxpath sixdegrees splitkeys
26
27 splitkeys: splitkeys.o $(CORE_OBJS)
28         $(CC) $(LDFLAGS) -o splitkeys splitkeys.o $(CORE_OBJS) $(LIBS)
29
30 testparse: main.o $(OBJS)
31         $(CC) $(LDFLAGS) -o testparse main.o $(OBJS) $(LIBS)
32
33 maxpath: maxpath.o $(OBJS)
34         $(CC) $(LDFLAGS) -o maxpath maxpath.o $(OBJS) $(LIBS)
35
36 sixdegrees: sixdegrees.o $(OBJS)
37         $(CC) $(LDFLAGS) -o sixdegrees sixdegrees.o $(OBJS) $(LIBS)
38
39 gpgwww: gpgwww.o $(OBJS)
40         $(CC) $(LDFLAGS) -o gpgwww gpgwww.o $(OBJS) $(LIBS)
41
42 lookup: lookup.o cleankey.o merge.o $(CORE_OBJS)
43         $(CC) $(LDFLAGS) -o lookup lookup.o cleankey.o merge.o $(CORE_OBJS) \
44                 $(LIBS)
45
46 add: add.o cleankey.o merge.o sendsync.o $(CORE_OBJS)
47         $(CC) $(LDFLAGS) -o add add.o cleankey.o merge.o sendsync.o \
48                 $(CORE_OBJS) $(LIBS)
49
50 onak: onak.o merge.o cleankey.o $(CORE_OBJS)
51         $(CC) $(LDFLAGS) -o onak onak.o merge.o cleankey.o \
52                 $(CORE_OBJS) $(LIBS)
53
54 onak-conf.o: onak-conf.c onak-conf.h
55         $(CC) $(CFLAGS) -DCONFIGFILE=\"@sysconfdir@/onak.conf\" -c onak-conf.c
56
57 onak-mail.pl: onak-mail.pl.in
58         sed 's:@CONFIG@:@sysconfdir@/onak.conf:g' < onak-mail.pl.in > onak-mail.pl
59         chmod +x onak-mail.pl
60
61 clean:
62         $(RM) -f $(PROGS) $(OBJS) Makefile.bak testparse maxpath *.core core \
63                 gpgwww.o add.o lookup.o main.o maxpath.o onak.o sixdegrees \
64                 sixdegrees.o splitkeys.o
65
66 distclean: clean
67         $(RM) -f Makefile .depend config.{log,status,h}
68         $(RM) -r autom4te.cache
69
70 .depend: $(SRCS)
71         rm -f .depend
72         makedepend -f- -- $(CFLAGS) -- $(SRCS) > .depend
73
74 include .depend
75
76 .PHONY: all clean