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