- connection termination is handled cleanly by name now
[strongswan.git] / src / openac / Makefile
1 # Makefile for the openac attribute certificate generation tool
2 # Copyright (C) 2004 Andreas Steffen
3 # Zuercher Hochschule Winterthur
4 #
5 # This program is free software; you can redistribute it and/or modify it
6 # under the terms of the GNU General Public License as published by the
7 # Free Software Foundation; either version 2 of the License, or (at your
8 # option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
9 #
10 # This program is distributed in the hope that it will be useful, but
11 # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12 # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
13 # for more details.
14 #
15 # RCSID $Id: Makefile,v 1.16 2006/02/17 19:33:27 as Exp $
16
17 FREESWANSRCDIR=../..
18 include ${FREESWANSRCDIR}/Makefile.inc
19
20 CONFDIR=$(DESTDIR)/etc/openac
21 PLUTODIR=../pluto
22
23 PROGRAM=openac
24 EXTRA8PROC=${PROGRAM}.8
25
26 LIBS=${FREESWANLIB} $(LIBDESLITE) -lgmp
27 CFLAGS+= -DDEBUG -DNO_PLUTO
28
29 # This compile option activates the leak detective
30 ifeq ($(USE_LEAK_DETECTIVE),true)
31 CFLAGS+= -DLEAK_DETECTIVE
32 endif
33
34 X509_OBJS= ac.o asn1.o ca.o certs.o constants.o crl.o defs.o mp_defs.o fetch.o \
35 id.o keys.o lex.o md2.o md5.o ocsp.o oid.o pem.o pgp.o pkcs1.o \
36 rnd.o sha1.o smartcard.o x509.o
37
38 OBJS= build.o loglite.o ${X509_OBJS}
39
40 include ../Makefile.program
41
42 build.o : build.c build.h
43 $(CC) $(CFLAGS) -c -o $@ $<
44
45 loglite.o : loglite.c $(PLUTODIR)/log.h
46 $(CC) $(CFLAGS) -c -o $@ $<
47
48 # X.509 library
49
50 ac.o : $(PLUTODIR)/ac.c $(PLUTODIR)/ac.h
51 $(CC) $(CFLAGS) -c -o $@ $<
52
53 asn1.o : $(PLUTODIR)/asn1.c $(PLUTODIR)/asn1.h
54 $(CC) $(CFLAGS) -c -o $@ $<
55
56 ca.o : $(PLUTODIR)/ca.c $(PLUTODIR)/ca.h
57 $(CC) $(CFLAGS) -c -o $@ $<
58
59 certs.o : $(PLUTODIR)/certs.c $(PLUTODIR)/certs.h
60 $(CC) $(CFLAGS) -c -o $@ $<
61
62 constants.o : $(PLUTODIR)/constants.c $(PLUTODIR)/constants.h
63 $(CC) $(CFLAGS) -c -o $@ $<
64
65 crl.o : $(PLUTODIR)/crl.c $(PLUTODIR)/crl.h
66 $(CC) $(CFLAGS) -c -o $@ $<
67
68 defs.o : $(PLUTODIR)/defs.c $(PLUTODIR)/defs.h
69 $(CC) $(CFLAGS) -c -o $@ $<
70
71 mp_defs.o : $(PLUTODIR)/mp_defs.c $(PLUTODIR)/mp_defs.h
72 $(CC) $(CFLAGS) -c -o $@ $<
73
74 fetch.o : $(PLUTODIR)/fetch.c $(PLUTODIR)/fetch.h
75 $(CC) $(CFLAGS) -c -o $@ $<
76
77 id.o : $(PLUTODIR)/id.c $(PLUTODIR)/id.h
78 $(CC) $(CFLAGS) -c -o $@ $<
79
80 keys.o : $(PLUTODIR)/keys.c $(PLUTODIR)/keys.h
81 $(CC) $(CFLAGS) -c -o $@ $<
82
83 lex.o : $(PLUTODIR)/lex.c $(PLUTODIR)/lex.h
84 $(CC) $(CFLAGS) -c -o $@ $<
85
86 md2.o : $(PLUTODIR)/md2.c $(PLUTODIR)/md2.h
87 $(CC) $(CFLAGS) -c -o $@ $<
88
89 md5.o : $(PLUTODIR)/md5.c $(PLUTODIR)/md5.h
90 $(CC) $(CFLAGS) -c -o $@ $<
91
92 ocsp.o : $(PLUTODIR)/ocsp.c $(PLUTODIR)/ocsp.h
93 $(CC) $(CFLAGS) -c -o $@ $<
94
95 oid.o : $(PLUTODIR)/oid.c $(PLUTODIR)/oid.h
96 $(CC) $(CFLAGS) -c -o $@ $<
97
98 pem.o : $(PLUTODIR)/pem.c $(PLUTODIR)/pem.h
99 $(CC) $(CFLAGS) -c -o $@ $<
100
101 pgp.o : $(PLUTODIR)/pgp.c $(PLUTODIR)/pgp.h
102 $(CC) $(CFLAGS) -c -o $@ $<
103
104 pkcs1.o : $(PLUTODIR)/pkcs1.c $(PLUTODIR)/pkcs1.h
105 $(CC) $(CFLAGS) -c -o $@ $<
106
107 rnd.o : $(PLUTODIR)/rnd.c $(PLUTODIR)/rnd.h
108 $(CC) $(CFLAGS) -c -o $@ $<
109
110 sha1.o : $(PLUTODIR)/sha1.c $(PLUTODIR)/sha1.h
111 $(CC) $(CFLAGS) -c -o $@ $<
112
113 smartcard.o : $(PLUTODIR)/smartcard.c $(PLUTODIR)/smartcard.h
114 $(CC) $(CFLAGS) -c -o $@ $<
115
116 x509.o : $(PLUTODIR)/x509.c $(PLUTODIR)/x509.h
117 $(CC) $(CFLAGS) -c -o $@ $<
118
119 # Stolen from pluto/Makefile
120
121 gatherdeps:
122 @ls | grep '\.c$$' | sed -e 's/\(.*\)\.c$$/\1.o: \1.c/'
123 @echo
124 @ls | grep '\.c$$' | xargs grep '^#[ ]*include[ ]*"' | \
125 sed -e 's/\.c:#[ ]*include[ ]*"/.o: /' -e 's/".*//'
126
127 # Dependencies generated by "make gatherdeps":
128
129 build.o: build.c
130 loglite.o: loglite.c
131 openac.o: openac.c
132
133 build.o: ../pluto/constants.h
134 build.o: ../pluto/defs.h
135 build.o: ../pluto/oid.h
136 build.o: ../pluto/asn1.h
137 build.o: ../pluto/x509.h
138 build.o: ../pluto/log.h
139 build.o: build.h
140 loglite.o: ../pluto/constants.h
141 loglite.o: ../pluto/defs.h
142 loglite.o: ../pluto/log.h
143 loglite.o: ../pluto/whack.h
144 openac.o: ../pluto/constants.h
145 openac.o: ../pluto/defs.h
146 openac.o: ../pluto/mp_defs.h
147 openac.o: ../pluto/log.h
148 openac.o: ../pluto/asn1.h
149 openac.o: ../pluto/certs.h
150 openac.o: ../pluto/x509.h
151 openac.o: ../pluto/crl.h
152 openac.o: ../pluto/keys.h
153 openac.o: ../pluto/ac.h
154 openac.o: build.h