cscvs to tla changeset 77
[onak.git] / Makefile
1 #
2 # Makefile for onak.
3 #
4 # $Id: Makefile,v 1.15 2003/06/04 20:57:06 noodles Exp $
5 #
6
7 CC = gcc
8 LINK = gcc
9 CFLAGS += -Wall -pedantic -g -I/usr/local/include
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
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 sha.o md5.o log.o
20 OBJS = merge.o stats.o sendsync.o $(CORE_OBJS)
21 SRCS = armor.c parsekey.c merge.c keyid.c md5.c sha.c main.c getcgi.c stats.c \
22         keyindex.c mem.c lookup.c add.c keydb_$(DBTYPE).c ll.c hash.c \
23         gpgwww.c onak-conf.c charfuncs.c sendsync.c log.c
24
25 all: .depend $(PROGS) testparse maxpath sixdegrees
26
27 testparse: main.o $(OBJS)
28         $(LINK) -o testparse main.o $(OBJS) $(LIBS)
29
30 maxpath: maxpath.o $(OBJS)
31         $(LINK) -o maxpath maxpath.o $(OBJS) $(LIBS)
32
33 sixdegrees: sixdegrees.o $(OBJS)
34         $(LINK) -o sixdegrees sixdegrees.o $(OBJS) $(LIBS)
35
36 gpgwww: gpgwww.o $(OBJS)
37         $(LINK) -o gpgwww gpgwww.o $(OBJS) $(LIBS)
38
39 lookup: lookup.o $(CORE_OBJS)
40         $(LINK) -o lookup lookup.o $(CORE_OBJS) $(LIBS)
41
42 add: add.o merge.o sendsync.o $(CORE_OBJS)
43         $(LINK) -o add add.o merge.o sendsync.o $(CORE_OBJS) $(LIBS)
44
45 onak: onak.o merge.o $(CORE_OBJS)
46         $(LINK) $(LDFLAGS) -o onak onak.o merge.o $(CORE_OBJS) $(LIBS)
47
48 clean:
49         rm -f $(PROGS) $(OBJS) Makefile.bak testparse maxpath *.core core \
50                 gpgwww.o add.o lookup.o main.o maxpath.o onak.o sixdegrees \
51                 sixdegrees.o
52
53 .depend: $(SRCS)
54         rm .depend
55         makedepend -f- -- $(CFLAGS) -- $(SRCS) > .depend
56
57 include .depend
58
59 .PHONY: all clean