summaryrefslogtreecommitdiff
path: root/programs/openac/Makefile
blob: 7aeacee0a7161a94a9275b7f6a26a4a16de0cce4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
# Makefile for the openac attribute certificate generation tool
# Copyright (C) 2004  Andreas Steffen
# Zuercher Hochschule Winterthur
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation; either version 2 of the License, or (at your
# option) any later version.  See <http://www.fsf.org/copyleft/gpl.txt>.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
# for more details.
#
# RCSID $Id: Makefile,v 1.16 2006/02/17 19:33:27 as Exp $

FREESWANSRCDIR=../..
include ${FREESWANSRCDIR}/Makefile.inc

CONFDIR=$(DESTDIR)/etc/openac
PLUTODIR=../pluto

PROGRAM=openac
EXTRA8PROC=${PROGRAM}.8

LIBS=${FREESWANLIB} $(LIBDESLITE) -lgmp
CFLAGS+= -DDEBUG -DNO_PLUTO

# This compile option activates the leak detective
ifeq ($(USE_LEAK_DETECTIVE),true)
  CFLAGS+= -DLEAK_DETECTIVE
endif

X509_OBJS= ac.o asn1.o ca.o certs.o constants.o crl.o defs.o mp_defs.o fetch.o \
           id.o keys.o lex.o md2.o md5.o ocsp.o oid.o pem.o pgp.o pkcs1.o \
           rnd.o sha1.o smartcard.o x509.o

OBJS= build.o loglite.o ${X509_OBJS}

include ../Makefile.program

build.o : build.c build.h
	$(CC) $(CFLAGS) -c -o $@ $<

loglite.o : loglite.c $(PLUTODIR)/log.h
	$(CC) $(CFLAGS) -c -o $@ $<

# X.509 library

ac.o : $(PLUTODIR)/ac.c $(PLUTODIR)/ac.h
	$(CC) $(CFLAGS) -c -o $@ $<

asn1.o : $(PLUTODIR)/asn1.c $(PLUTODIR)/asn1.h
	$(CC) $(CFLAGS) -c -o $@ $<

ca.o : $(PLUTODIR)/ca.c $(PLUTODIR)/ca.h
	$(CC) $(CFLAGS) -c -o $@ $<

certs.o : $(PLUTODIR)/certs.c $(PLUTODIR)/certs.h
	$(CC) $(CFLAGS) -c -o $@ $<

constants.o : $(PLUTODIR)/constants.c $(PLUTODIR)/constants.h
	$(CC) $(CFLAGS) -c -o $@ $<

crl.o : $(PLUTODIR)/crl.c $(PLUTODIR)/crl.h
	$(CC) $(CFLAGS) -c -o $@ $<

defs.o : $(PLUTODIR)/defs.c $(PLUTODIR)/defs.h
	$(CC) $(CFLAGS) -c -o $@ $<

mp_defs.o : $(PLUTODIR)/mp_defs.c $(PLUTODIR)/mp_defs.h
	$(CC) $(CFLAGS) -c -o $@ $<

fetch.o : $(PLUTODIR)/fetch.c $(PLUTODIR)/fetch.h
	$(CC) $(CFLAGS) -c -o $@ $<

id.o : $(PLUTODIR)/id.c $(PLUTODIR)/id.h
	$(CC) $(CFLAGS) -c -o $@ $<

keys.o : $(PLUTODIR)/keys.c $(PLUTODIR)/keys.h
	$(CC) $(CFLAGS) -c -o $@ $<

lex.o : $(PLUTODIR)/lex.c $(PLUTODIR)/lex.h
	$(CC) $(CFLAGS) -c -o $@ $<

md2.o : $(PLUTODIR)/md2.c $(PLUTODIR)/md2.h
	$(CC) $(CFLAGS) -c -o $@ $<

md5.o : $(PLUTODIR)/md5.c $(PLUTODIR)/md5.h
	$(CC) $(CFLAGS) -c -o $@ $<

ocsp.o : $(PLUTODIR)/ocsp.c $(PLUTODIR)/ocsp.h
	$(CC) $(CFLAGS) -c -o $@ $<

oid.o : $(PLUTODIR)/oid.c $(PLUTODIR)/oid.h
	$(CC) $(CFLAGS) -c -o $@ $<

pem.o : $(PLUTODIR)/pem.c $(PLUTODIR)/pem.h
	$(CC) $(CFLAGS) -c -o $@ $<

pgp.o : $(PLUTODIR)/pgp.c $(PLUTODIR)/pgp.h
	$(CC) $(CFLAGS) -c -o $@ $<

pkcs1.o : $(PLUTODIR)/pkcs1.c $(PLUTODIR)/pkcs1.h
	$(CC) $(CFLAGS) -c -o $@ $<

rnd.o : $(PLUTODIR)/rnd.c $(PLUTODIR)/rnd.h
	$(CC) $(CFLAGS) -c -o $@ $<

sha1.o : $(PLUTODIR)/sha1.c $(PLUTODIR)/sha1.h
	$(CC) $(CFLAGS) -c -o $@ $<

smartcard.o : $(PLUTODIR)/smartcard.c $(PLUTODIR)/smartcard.h
	$(CC) $(CFLAGS) -c -o $@ $<

x509.o : $(PLUTODIR)/x509.c $(PLUTODIR)/x509.h
	$(CC) $(CFLAGS) -c -o $@ $<

# Stolen from pluto/Makefile

gatherdeps:
		@ls | grep '\.c$$' | sed -e 's/\(.*\)\.c$$/\1.o: \1.c/'
		@echo
		@ls | grep '\.c$$' | xargs grep '^#[    ]*include[      ]*"' | \
                sed -e 's/\.c:#[        ]*include[      ]*"/.o: /' -e 's/".*//'

# Dependencies generated by "make gatherdeps":

build.o: build.c
loglite.o: loglite.c
openac.o: openac.c

build.o: ../pluto/constants.h
build.o: ../pluto/defs.h
build.o: ../pluto/oid.h
build.o: ../pluto/asn1.h
build.o: ../pluto/x509.h
build.o: ../pluto/log.h
build.o: build.h
loglite.o: ../pluto/constants.h
loglite.o: ../pluto/defs.h
loglite.o: ../pluto/log.h
loglite.o: ../pluto/whack.h
openac.o: ../pluto/constants.h
openac.o: ../pluto/defs.h
openac.o: ../pluto/mp_defs.h
openac.o: ../pluto/log.h
openac.o: ../pluto/asn1.h
openac.o: ../pluto/certs.h
openac.o: ../pluto/x509.h
openac.o: ../pluto/crl.h
openac.o: ../pluto/keys.h
openac.o: ../pluto/ac.h
openac.o: build.h