1 # Copyright 2010, Your File System Inc
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
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@
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
23 LT_libs = $(LDFLAGS_roken) $(LIB_roken)
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
41 UPSTREAM= ${TOP_SRCDIR}/external/heimdal
43 MODULE_INCLUDE=-I${srcdir} -I${TOP_INCDIR}/hcrypto -I$(UPSTREAM)/hcrypto
45 @SHARED_ONLY@SHARED_LIBS = libafshcrypto.la
46 @SHARED_ONLY@SHARED_SHLIBS_TOP = ${TOP_LIBDIR}/libafshcrypto.$(SHLIB_SUFFIX)
48 all: @hcrypto_all_target@
50 all-internal: ${HEADERS} $(SHARED_SHLIBS_TOP) \
51 ${TOP_LIBDIR}/libafshcrypto.a \
52 ${TOP_LIBDIR}/libafshcrypto_lwp.a
54 all-lwp: ${HEADERS} ${TOP_LIBDIR}/libafshcrypto_lwp.a
56 buildtools: ${HEADERS} ${TOP_LIBDIR}/libafshcrypto.a
58 install: @hcrypto_install_target@
60 install-internal: $(SHARED_LIBS) libafshcrypto.a
61 @SHARED_ONLY@${LT_INSTALL_DATA} libafshcrypto.la ${DESTDIR}${libdir}/libafshcrypto.la
62 @SHARED_ONLY@${RM} ${DESTDIR}${libdir}/libafshcrypto.la
63 ${INSTALL_DATA} libafshcrypto.a ${DESTDIR}${libdir}/libafshcrypto.a
65 dest: $(SHARED_LIBS) libafshcrypto.a
66 @SHARED_ONLY@${LT_INSTALL_DATA} libafshcrypto.la ${DEST}/lib/libafshcrypto.la
67 @SHARED_ONLY@${RM} ${DEST}/lib/libafshcrypto.la
68 ${INSTALL_DATA} libafshcrypto.a ${DEST}/lib/libafshcrypto.a
72 $(RM) -f *.o libafshcrypto.a libafshcrypto_lwp.a libafshcrypto.exp \
75 $(LT_objs): $(HEADERS)
77 libafshcrypto.la: libafshcrypto.la.sym $(LT_objs)
78 $(LT_LDLIB_shlib_only) $(LT_objs) $(LT_libs)
80 libafshcrypto.a: $(LT_objs)
81 $(LT_LDLIB_static) $(LT_objs)
83 libafshcrypto_lwp.a: $(LT_objs)
84 $(LT_LDLIB_lwp) $(LT_objs)
86 test_cipher: test_cipher.lo libafshcrypto.a
87 $(LT_LDRULE_static) test_cipher.lo libafshcrypto.a
89 ${TOP_INCDIR}/hcrypto/aes.h: ${UPSTREAM}/hcrypto/aes.h
92 ${TOP_INCDIR}/hcrypto/bn.h: ${UPSTREAM}/hcrypto/bn.h
95 ${TOP_INCDIR}/hcrypto/des.h: ${UPSTREAM}/hcrypto/des.h
98 ${TOP_INCDIR}/hcrypto/dh.h: ${UPSTREAM}/hcrypto/dh.h
101 ${TOP_INCDIR}/hcrypto/dsa.h: ${UPSTREAM}/hcrypto/dsa.h
102 ${INSTALL_DATA} $? $@
104 ${TOP_INCDIR}/hcrypto/engine.h: engine.h
105 ${INSTALL_DATA} $? $@
107 ${TOP_INCDIR}/hcrypto/evp.h: ${UPSTREAM}/hcrypto/evp.h
108 ${INSTALL_DATA} $? $@
110 ${TOP_INCDIR}/hcrypto/evp-hcrypto.h: ${UPSTREAM}/hcrypto/evp-hcrypto.h
111 ${INSTALL_DATA} $? $@
113 ${TOP_INCDIR}/hcrypto/evp-cc.h: ${UPSTREAM}/hcrypto/evp-cc.h
114 ${INSTALL_DATA} $? $@
116 ${TOP_INCDIR}/hcrypto/hmac.h: ${UPSTREAM}/hcrypto/hmac.h
117 ${INSTALL_DATA} $? $@
119 ${TOP_INCDIR}/hcrypto/md2.h: ${UPSTREAM}/hcrypto/md2.h
120 ${INSTALL_DATA} $? $@
122 ${TOP_INCDIR}/hcrypto/md4.h: ${UPSTREAM}/hcrypto/md4.h
123 ${INSTALL_DATA} $? $@
125 ${TOP_INCDIR}/hcrypto/md5.h: ${UPSTREAM}/hcrypto/md5.h
126 ${INSTALL_DATA} $? $@
128 ${TOP_INCDIR}/hcrypto/pkcs12.h: ${UPSTREAM}/hcrypto/pkcs12.h
129 ${INSTALL_DATA} $? $@
131 ${TOP_INCDIR}/hcrypto/rand.h: ${UPSTREAM}/hcrypto/rand.h
132 ${INSTALL_DATA} $? $@
134 ${TOP_INCDIR}/hcrypto/rc2.h: ${UPSTREAM}/hcrypto/rc2.h
135 ${INSTALL_DATA} $? $@
137 ${TOP_INCDIR}/hcrypto/rc4.h: ${UPSTREAM}/hcrypto/rc4.h
138 ${INSTALL_DATA} $? $@
140 ${TOP_INCDIR}/hcrypto/rsa.h: ${UPSTREAM}/hcrypto/rsa.h
141 ${INSTALL_DATA} $? $@
143 ${TOP_INCDIR}/hcrypto/sha.h: ${UPSTREAM}/hcrypto/sha.h
144 ${INSTALL_DATA} $? $@
146 ${TOP_INCDIR}/hcrypto/ui.h: ${UPSTREAM}/hcrypto/ui.h
147 ${INSTALL_DATA} $? $@
149 ${TOP_LIBDIR}/libafshcrypto.$(SHLIB_SUFFIX): libafshcrypto.la
150 $(LT_INSTALL_DATA) libafshcrypto.la $(TOP_LIBDIR)/libafshcrypto.la
151 # libtool gets confused if we leave these around
152 $(RM) $(TOP_LIBDIR)/libafshcrypto.la
154 ${TOP_LIBDIR}/libafshcrypto.a: libafshcrypto.a
155 ${INSTALL_DATA} $? $@
157 ${TOP_LIBDIR}/libafshcrypto_lwp.a: libafshcrypto_lwp.a
158 ${INSTALL_DATA} $? $@
162 CFLAGS_test_cipher.lo= -I${UPSTREAM}/roken/
163 CFLAGS_rand-unix.lo=@CFLAGS_NOERROR@
164 CFLAGS_validate.lo=@CFLAGS_NOERROR@
165 CFLAGS_evp.lo=-DHAVE_CONFIG_H
167 # Here we have explicit rules for all the libtool objects we might need to
168 # build. The implicit rules don't work since the sources are in a different
170 aes.lo: ${UPSTREAM}/hcrypto/aes.c ${HEADERS}
171 $(LTLWP_CCRULE) $(UPSTREAM)/hcrypto/aes.c
173 bn.lo: ${UPSTREAM}/hcrypto/bn.c ${HEADERS}
174 $(LTLWP_CCRULE) $(UPSTREAM)/hcrypto/bn.c
176 camellia.lo: ${UPSTREAM}/hcrypto/camellia.c ${HEADERS}
177 $(LTLWP_CCRULE) $(UPSTREAM)/hcrypto/camellia.c
179 camellia-ntt.lo: ${UPSTREAM}/hcrypto/camellia-ntt.c ${HEADERS}
180 $(LTLWP_CCRULE) $(UPSTREAM)/hcrypto/camellia-ntt.c
182 des.lo: ${UPSTREAM}/hcrypto/des.c ${HEADERS}
183 $(LTLWP_CCRULE) $(UPSTREAM)/hcrypto/des.c
185 evp.lo: ${UPSTREAM}/hcrypto/evp.c ${HEADERS}
186 $(LTLWP_CCRULE) $(UPSTREAM)/hcrypto/evp.c
188 evp-hcrypto.lo: ${UPSTREAM}/hcrypto/evp-hcrypto.c ${HEADERS}
189 $(LTLWP_CCRULE) $(UPSTREAM)/hcrypto/evp-hcrypto.c
191 evp-cc.lo: ${UPSTREAM}/hcrypto/evp-cc.c ${HEADERS}
192 $(LTLWP_CCRULE) $(UPSTREAM)/hcrypto/evp-cc.c
194 hmac.lo: ${UPSTREAM}/hcrypto/hmac.c ${HEADERS}
195 $(LTLWP_CCRULE) $(UPSTREAM)/hcrypto/hmac.c
197 md2.lo: ${UPSTREAM}/hcrypto/md2.c ${HEADERS}
198 $(LTLWP_CCRULE) $(UPSTREAM)/hcrypto/md2.c
200 md4.lo: ${UPSTREAM}/hcrypto/md4.c ${HEADERS}
201 $(LTLWP_CCRULE) $(UPSTREAM)/hcrypto/md4.c
203 md5.lo: ${UPSTREAM}/hcrypto/md5.c ${HEADERS}
204 $(LTLWP_CCRULE) $(UPSTREAM)/hcrypto/md5.c
206 pkcs5.lo: ${UPSTREAM}/hcrypto/pkcs5.c ${HEADERS}
207 $(LTLWP_CCRULE) $(UPSTREAM)/hcrypto/pkcs5.c
209 rand-egd.lo: ${UPSTREAM}/hcrypto/rand-egd.c ${HEADERS}
210 $(LTLWP_CCRULE) $(UPSTREAM)/hcrypto/rand-egd.c
212 rand-fortuna.lo: ${UPSTREAM}/hcrypto/rand-fortuna.c ${HEADERS}
213 $(LTLWP_CCRULE) $(UPSTREAM)/hcrypto/rand-fortuna.c
215 rand-timer.lo: ${UPSTREAM}/hcrypto/rand-timer.c ${HEADERS}
216 $(LTLWP_CCRULE) $(UPSTREAM)/hcrypto/rand-timer.c
218 rand-unix.lo: ${UPSTREAM}/hcrypto/rand-unix.c ${HEADERS}
219 $(LTLWP_CCRULE) $(UPSTREAM)/hcrypto/rand-unix.c
221 rand.lo: ${UPSTREAM}/hcrypto/rand.c ${HEADERS}
222 $(LTLWP_CCRULE) $(UPSTREAM)/hcrypto/rand.c
224 rc2.lo: ${UPSTREAM}/hcrypto/rc2.c ${HEADERS}
225 $(LTLWP_CCRULE) $(UPSTREAM)/hcrypto/rc2.c
227 rc4.lo: ${UPSTREAM}/hcrypto/rc4.c ${HEADERS}
228 $(LTLWP_CCRULE) $(UPSTREAM)/hcrypto/rc4.c
230 rijndael-alg-fst.lo: ${UPSTREAM}/hcrypto/rijndael-alg-fst.c ${HEADERS}
231 $(LTLWP_CCRULE) $(UPSTREAM)/hcrypto/rijndael-alg-fst.c
233 rnd_keys.lo: ${UPSTREAM}/hcrypto/rnd_keys.c ${HEADERS}
234 $(LTLWP_CCRULE) $(UPSTREAM)/hcrypto/rnd_keys.c
236 sha.lo: ${UPSTREAM}/hcrypto/sha.c ${HEADERS}
237 $(LTLWP_CCRULE) $(UPSTREAM)/hcrypto/sha.c
239 sha256.lo: ${UPSTREAM}/hcrypto/sha256.c ${HEADERS}
240 $(LTLWP_CCRULE) $(UPSTREAM)/hcrypto/sha256.c
242 sha512.lo: ${UPSTREAM}/hcrypto/sha512.c ${HEADERS}
243 ${LTLWP_CCRULE} $(UPSTREAM)/hcrypto/sha512.c
245 ui.lo: ${UPSTREAM}/hcrypto/ui.c ${HEADERS}
246 $(LTLWP_CCRULE) $(UPSTREAM)/hcrypto/ui.c
248 validate.lo: ${UPSTREAM}/hcrypto/validate.c ${HEADERS}
249 ${LTLWP_CCRULE} ${UPSTREAM}/hcrypto/validate.c
251 test_cipher.lo: ${UPSTREAM}/hcrypto/test_cipher.c ${HEADERS}
252 $(LTLWP_CCRULE) $(UPSTREAM)/hcrypto/test_cipher.c