e076b897af15f0dfb118554d9a9d309a031b48e6
[openafs.git] / src / crypto / hcrypto / Makefile.in
1 # Copyright 2010, Your File System Inc
2 # All rights reserved
3 #
4 # This software has been released under the terms of the BSD License
5 # For details, see the LICENSE file in the top level source directory
6
7 srcdir=@srcdir@
8 include @TOP_OBJDIR@/src/config/Makefile.config
9 include @TOP_OBJDIR@/src/config/Makefile.lwp
10 include @TOP_OBJDIR@/src/config/Makefile.lwptool
11 top_builddir=@top_builddir@
12
13 LT_current = 2
14 LT_revision = 0
15 LT_age = 0
16
17 LT_objs = aes.lo camellia.lo camellia-ntt.lo des.lo engine.lo evp.lo \
18           evp-hcrypto.lo evp-cc.lo hmac.lo md2.lo md4.lo md5.lo pkcs5.lo \
19           rand-egd.lo rand-timer.lo rand-unix.lo rand.lo rc2.lo rc4.lo \
20           rijndael-alg-fst.lo rnd_keys.lo sha.lo sha256.lo sha512.lo ui.lo \
21           validate.lo rand-fortuna.lo
22
23 LT_libs = $(LDFLAGS_roken) $(LIB_roken)
24
25 HEADERS= ${TOP_INCDIR}/hcrypto/aes.h \
26          ${TOP_INCDIR}/hcrypto/des.h \
27          ${TOP_INCDIR}/hcrypto/engine.h \
28          ${TOP_INCDIR}/hcrypto/evp.h \
29          ${TOP_INCDIR}/hcrypto/evp-hcrypto.h \
30          ${TOP_INCDIR}/hcrypto/evp-cc.h \
31          ${TOP_INCDIR}/hcrypto/hmac.h \
32          ${TOP_INCDIR}/hcrypto/md2.h \
33          ${TOP_INCDIR}/hcrypto/md4.h \
34          ${TOP_INCDIR}/hcrypto/md5.h \
35          ${TOP_INCDIR}/hcrypto/rand.h \
36          ${TOP_INCDIR}/hcrypto/rc2.h \
37          ${TOP_INCDIR}/hcrypto/rc4.h \
38          ${TOP_INCDIR}/hcrypto/sha.h \
39          ${TOP_INCDIR}/hcrypto/ui.h
40
41 UPSTREAM= ${TOP_SRCDIR}/external/heimdal
42
43 MODULE_INCLUDE=-I${srcdir} -I${TOP_INCDIR}/hcrypto -I$(UPSTREAM)/hcrypto
44
45 all: @hcrypto_all_target@
46
47 all-internal: ${HEADERS} ${TOP_LIBDIR}/libafshcrypto.$(SHLIB_SUFFIX) \
48         ${TOP_LIBDIR}/libafshcrypto.a \
49         ${TOP_LIBDIR}/libafshcrypto_lwp.a
50
51 all-lwp: ${HEADERS} ${TOP_LIBDIR}/libafshcrypto_lwp.a
52
53 buildtools: ${HEADERS} ${TOP_LIBDIR}/libafshcrypto.a
54
55 install: @hcrypto_install_target@
56
57 install-internal: libafshcrypto.la libafshcrypto.a
58         ${LT_INSTALL_DATA} libafshcrypto.la ${DESTDIR}${libdir}/libafshcrypto.la
59         ${RM} ${DESTDIR}${libdir}/libafshcrypto.la
60         ${INSTALL_DATA} libafshcrypto.a ${DESTDIR}${libdir}/libafshcrypto.a
61
62 dest: libafshcrypto.la libafshcrypto.a
63         ${LT_INSTALL_DATA} libafshcrypto.la ${DEST}/lib/libafshcrypto.la
64         ${RM} ${DEST}/lib/libafshcrypto.la
65         ${INSTALL_DATA} libafshcrypto.a ${DEST}/lib/libafshcrypto.a
66
67 clean:
68         $(LT_CLEAN)
69         $(RM) -f ${OBJECTS} rand-fortuna_lwp.o \
70                 libafshcrypto.a libafshcrypto_lwp.a libafshcrypto.exp \
71                 test_cipher test_cipher.o
72
73 libafshcrypto.la: libafshcrypto.la.sym $(LT_objs)
74         $(LT_LDLIB_shlib) $(LT_objs) $(LT_libs)
75
76 libafshcrypto.a: $(LT_objs)
77         $(LT_LDLIB_static) $(LT_objs)
78
79 libafshcrypto_lwp.a: $(LT_objs)
80         $(LT_LDLIB_lwp) $(LT_objs)
81
82 test_cipher: test_cipher.lo libafshcrypto.la
83         $(LT_LDRULE_static) test_cipher.lo libafshcrypto.la
84
85 ${TOP_INCDIR}/hcrypto/aes.h: ${UPSTREAM}/hcrypto/aes.h
86         ${INSTALL_DATA} $? $@
87
88 ${TOP_INCDIR}/hcrypto/bn.h: ${UPSTREAM}/hcrypto/bn.h
89         ${INSTALL_DATA} $? $@
90
91 ${TOP_INCDIR}/hcrypto/des.h: ${UPSTREAM}/hcrypto/des.h
92         ${INSTALL_DATA} $? $@
93
94 ${TOP_INCDIR}/hcrypto/dh.h: ${UPSTREAM}/hcrypto/dh.h
95         ${INSTALL_DATA} $? $@
96
97 ${TOP_INCDIR}/hcrypto/dsa.h: ${UPSTREAM}/hcrypto/dsa.h
98         ${INSTALL_DATA} $? $@
99
100 ${TOP_INCDIR}/hcrypto/engine.h: engine.h
101         ${INSTALL_DATA} $? $@
102
103 ${TOP_INCDIR}/hcrypto/evp.h: ${UPSTREAM}/hcrypto/evp.h
104         ${INSTALL_DATA} $? $@
105
106 ${TOP_INCDIR}/hcrypto/evp-hcrypto.h: ${UPSTREAM}/hcrypto/evp-hcrypto.h
107         ${INSTALL_DATA} $? $@
108
109 ${TOP_INCDIR}/hcrypto/evp-cc.h: ${UPSTREAM}/hcrypto/evp-cc.h
110         ${INSTALL_DATA} $? $@
111
112 ${TOP_INCDIR}/hcrypto/hmac.h: ${UPSTREAM}/hcrypto/hmac.h
113         ${INSTALL_DATA} $? $@
114
115 ${TOP_INCDIR}/hcrypto/md2.h: ${UPSTREAM}/hcrypto/md2.h
116         ${INSTALL_DATA} $? $@
117
118 ${TOP_INCDIR}/hcrypto/md4.h: ${UPSTREAM}/hcrypto/md4.h
119         ${INSTALL_DATA} $? $@
120
121 ${TOP_INCDIR}/hcrypto/md5.h: ${UPSTREAM}/hcrypto/md5.h
122         ${INSTALL_DATA} $? $@
123
124 ${TOP_INCDIR}/hcrypto/pkcs12.h: ${UPSTREAM}/hcrypto/pkcs12.h
125         ${INSTALL_DATA} $? $@
126
127 ${TOP_INCDIR}/hcrypto/rand.h: ${UPSTREAM}/hcrypto/rand.h
128         ${INSTALL_DATA} $? $@
129
130 ${TOP_INCDIR}/hcrypto/rc2.h: ${UPSTREAM}/hcrypto/rc2.h
131         ${INSTALL_DATA} $? $@
132
133 ${TOP_INCDIR}/hcrypto/rc4.h: ${UPSTREAM}/hcrypto/rc4.h
134         ${INSTALL_DATA} $? $@
135
136 ${TOP_INCDIR}/hcrypto/rsa.h: ${UPSTREAM}/hcrypto/rsa.h
137         ${INSTALL_DATA} $? $@
138
139 ${TOP_INCDIR}/hcrypto/sha.h: ${UPSTREAM}/hcrypto/sha.h
140         ${INSTALL_DATA} $? $@
141
142 ${TOP_INCDIR}/hcrypto/ui.h: ${UPSTREAM}/hcrypto/ui.h
143         ${INSTALL_DATA} $? $@
144
145 ${TOP_LIBDIR}/libafshcrypto.$(SHLIB_SUFFIX): libafshcrypto.la
146         $(LT_INSTALL_DATA) libafshcrypto.la $(TOP_LIBDIR)/libafshcrypto.la
147         # libtool gets confused if we leave these around
148         $(RM) $(TOP_LIBDIR)/libafshcrypto.la
149
150 ${TOP_LIBDIR}/libafshcrypto.a: libafshcrypto.a
151         ${INSTALL_DATA} $? $@
152
153 ${TOP_LIBDIR}/libafshcrypto_lwp.a: libafshcrypto_lwp.a
154         ${INSTALL_DATA} $? $@
155
156 # Pthread Targets
157
158 CFLAGS_test_cipher.lo= -I${UPSTREAM}/roken/
159 CFLAGS_rand-unix.lo=@CFLAGS_NOERROR@
160 CFLAGS_validate.lo=@CFLAGS_NOERROR@
161 CFLAGS_evp.lo=-DHAVE_CONFIG_H
162
163 # Here we have explicit rules for all the libtool objects we might need to
164 # build.  The implicit rules don't work since the sources are in a different
165 # castle.
166 aes.lo: ${UPSTREAM}/hcrypto/aes.c ${HEADERS}
167         $(LTLWP_CCRULE) $(UPSTREAM)/hcrypto/aes.c
168
169 bn.lo: ${UPSTREAM}/hcrypto/bn.c ${HEADERS}
170         $(LTLWP_CCRULE) $(UPSTREAM)/hcrypto/bn.c
171
172 camellia.lo: ${UPSTREAM}/hcrypto/camellia.c ${HEADERS}
173         $(LTLWP_CCRULE) $(UPSTREAM)/hcrypto/camellia.c
174
175 camellia-ntt.lo: ${UPSTREAM}/hcrypto/camellia-ntt.c ${HEADERS}
176         $(LTLWP_CCRULE) $(UPSTREAM)/hcrypto/camellia-ntt.c
177
178 des.lo: ${UPSTREAM}/hcrypto/des.c ${HEADERS}
179         $(LTLWP_CCRULE) $(UPSTREAM)/hcrypto/des.c
180
181 evp.lo: ${UPSTREAM}/hcrypto/evp.c ${HEADERS}
182         $(LTLWP_CCRULE) $(UPSTREAM)/hcrypto/evp.c
183
184 evp-hcrypto.lo: ${UPSTREAM}/hcrypto/evp-hcrypto.c ${HEADERS}
185         $(LTLWP_CCRULE) $(UPSTREAM)/hcrypto/evp-hcrypto.c
186
187 evp-cc.lo: ${UPSTREAM}/hcrypto/evp-cc.c ${HEADERS}
188         $(LTLWP_CCRULE) $(UPSTREAM)/hcrypto/evp-cc.c
189
190 hmac.lo: ${UPSTREAM}/hcrypto/hmac.c ${HEADERS}
191         $(LTLWP_CCRULE) $(UPSTREAM)/hcrypto/hmac.c
192
193 md2.lo: ${UPSTREAM}/hcrypto/md2.c ${HEADERS}
194         $(LTLWP_CCRULE) $(UPSTREAM)/hcrypto/md2.c
195
196 md4.lo: ${UPSTREAM}/hcrypto/md4.c ${HEADERS}
197         $(LTLWP_CCRULE) $(UPSTREAM)/hcrypto/md4.c
198
199 md5.lo: ${UPSTREAM}/hcrypto/md5.c ${HEADERS}
200         $(LTLWP_CCRULE) $(UPSTREAM)/hcrypto/md5.c
201
202 pkcs5.lo: ${UPSTREAM}/hcrypto/pkcs5.c ${HEADERS}
203         $(LTLWP_CCRULE) $(UPSTREAM)/hcrypto/pkcs5.c
204
205 rand-egd.lo: ${UPSTREAM}/hcrypto/rand-egd.c ${HEADERS}
206         $(LTLWP_CCRULE) $(UPSTREAM)/hcrypto/rand-egd.c
207
208 rand-fortuna.lo: ${UPSTREAM}/hcrypto/rand-fortuna.c ${HEADERS}
209         $(LTLWP_CCRULE) $(UPSTREAM)/hcrypto/rand-fortuna.c
210
211 rand-timer.lo: ${UPSTREAM}/hcrypto/rand-timer.c ${HEADERS}
212         $(LTLWP_CCRULE) $(UPSTREAM)/hcrypto/rand-timer.c
213
214 rand-unix.lo: ${UPSTREAM}/hcrypto/rand-unix.c ${HEADERS}
215         $(LTLWP_CCRULE) $(UPSTREAM)/hcrypto/rand-unix.c
216
217 rand.lo: ${UPSTREAM}/hcrypto/rand.c ${HEADERS}
218         $(LTLWP_CCRULE) $(UPSTREAM)/hcrypto/rand.c
219
220 rc2.lo: ${UPSTREAM}/hcrypto/rc2.c ${HEADERS}
221         $(LTLWP_CCRULE) $(UPSTREAM)/hcrypto/rc2.c
222
223 rc4.lo: ${UPSTREAM}/hcrypto/rc4.c ${HEADERS}
224         $(LTLWP_CCRULE) $(UPSTREAM)/hcrypto/rc4.c
225
226 rijndael-alg-fst.lo: ${UPSTREAM}/hcrypto/rijndael-alg-fst.c ${HEADERS}
227         $(LTLWP_CCRULE) $(UPSTREAM)/hcrypto/rijndael-alg-fst.c
228
229 rnd_keys.lo: ${UPSTREAM}/hcrypto/rnd_keys.c ${HEADERS}
230         $(LTLWP_CCRULE) $(UPSTREAM)/hcrypto/rnd_keys.c
231
232 sha.lo: ${UPSTREAM}/hcrypto/sha.c ${HEADERS}
233         $(LTLWP_CCRULE) $(UPSTREAM)/hcrypto/sha.c
234
235 sha256.lo: ${UPSTREAM}/hcrypto/sha256.c ${HEADERS}
236         $(LTLWP_CCRULE) $(UPSTREAM)/hcrypto/sha256.c
237
238 sha512.lo: ${UPSTREAM}/hcrypto/sha512.c ${HEADERS}
239         ${LTLWP_CCRULE} $(UPSTREAM)/hcrypto/sha512.c
240
241 ui.lo: ${UPSTREAM}/hcrypto/ui.c ${HEADERS}
242         $(LTLWP_CCRULE) $(UPSTREAM)/hcrypto/ui.c
243
244 validate.lo: ${UPSTREAM}/hcrypto/validate.c ${HEADERS}
245         ${LTLWP_CCRULE} ${UPSTREAM}/hcrypto/validate.c
246
247 test_cipher.lo: ${UPSTREAM}/hcrypto/test_cipher.c ${HEADERS}
248         $(LTLWP_CCRULE) $(UPSTREAM)/hcrypto/test_cipher.c