Initial introduction of autoconf support; just endian checking at present.
[onak.git] / Makefile.in
1 #
2 # Makefile for onak.
3 #
4 # $Id: Makefile,v 1.23 2004/05/31 22:04:50 noodles Exp $
5 #
6
7 CC = @CC@
8 CFLAGS += @CFLAGS@ -Wall -pedantic -g
9 # Uncomment to enable profiling.
10 #LDFLAGS += -pg
11 # Can be "pg" for Postgresql, "file" for flat files or "db2" for pksd db2 style.
12 DBTYPE = db3
13 # If using DBTYPE of "file" then comment the following line out.
14 #LIBS = -L/usr/local/lib -lpq
15 LIBS = -L/usr/local/lib -ldb3
16
17 PROGS = add lookup gpgwww onak splitkeys
18 CORE_OBJS = armor.o charfuncs.o decodekey.o getcgi.o hash.o keydb_$(DBTYPE).o \
19         keyid.o keyindex.o ll.o mem.o onak-conf.o parsekey.o sha1.o md5.o \
20         log.o photoid.o wordlist.o
21 OBJS = merge.o stats.o sendsync.o cleankey.o $(CORE_OBJS)
22 SRCS = armor.c parsekey.c merge.c keyid.c md5.c sha1.c main.c getcgi.c mem.c \
23         keyindex.c stats.c lookup.c add.c keydb_$(DBTYPE).c ll.c hash.c \
24         gpgwww.c onak-conf.c charfuncs.c sendsync.c log.c photoid.c \
25         wordlist.c cleankey.c
26
27 all: .depend $(PROGS) testparse maxpath sixdegrees splitkeys
28
29 splitkeys: splitkeys.o $(CORE_OBJS)
30         $(CC) $(LDFLAGS) -o splitkeys splitkeys.o $(CORE_OBJS) $(LIBS)
31
32 testparse: main.o $(OBJS)
33         $(CC) $(LDFLAGS) -o testparse main.o $(OBJS) $(LIBS)
34
35 maxpath: maxpath.o $(OBJS)
36         $(CC) $(LDFLAGS) -o maxpath maxpath.o $(OBJS) $(LIBS)
37
38 sixdegrees: sixdegrees.o $(OBJS)
39         $(CC) $(LDFLAGS) -o sixdegrees sixdegrees.o $(OBJS) $(LIBS)
40
41 gpgwww: gpgwww.o $(OBJS)
42         $(CC) $(LDFLAGS) -o gpgwww gpgwww.o $(OBJS) $(LIBS)
43
44 lookup: lookup.o cleankey.o merge.o $(CORE_OBJS)
45         $(CC) $(LDFLAGS) -o lookup lookup.o cleankey.o merge.o $(CORE_OBJS) \
46                 $(LIBS)
47
48 add: add.o cleankey.o merge.o sendsync.o $(CORE_OBJS)
49         $(CC) $(LDFLAGS) -o add add.o cleankey.o merge.o sendsync.o \
50                 $(CORE_OBJS) $(LIBS)
51
52 onak: onak.o merge.o cleankey.o $(CORE_OBJS)
53         $(CC) $(LDFLAGS) $(LDFLAGS) -o onak onak.o merge.o cleankey.o \
54                 $(CORE_OBJS) $(LIBS)
55
56 clean:
57         rm -f $(PROGS) $(OBJS) Makefile.bak testparse maxpath *.core core \
58                 gpgwww.o add.o lookup.o main.o maxpath.o onak.o sixdegrees \
59                 sixdegrees.o splitkeys.o
60
61 distclean:
62         rm -f Makefile config.h .depend
63
64 .depend: $(SRCS)
65         rm -f .depend
66         makedepend -f- -- $(CFLAGS) -- $(SRCS) > .depend
67
68 include .depend
69
70 .PHONY: all clean