Commit | Line | Data |
---|---|---|
805e021f CE |
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 *.o libafshcrypto.a libafshcrypto_lwp.a libafshcrypto.exp \ | |
70 | test_cipher | |
71 | ||
72 | $(LT_objs): $(HEADERS) | |
73 | ||
74 | libafshcrypto.la: libafshcrypto.la.sym $(LT_objs) | |
75 | $(LT_LDLIB_shlib) $(LT_objs) $(LT_libs) | |
76 | ||
77 | libafshcrypto.a: $(LT_objs) | |
78 | $(LT_LDLIB_static) $(LT_objs) | |
79 | ||
80 | libafshcrypto_lwp.a: $(LT_objs) | |
81 | $(LT_LDLIB_lwp) $(LT_objs) | |
82 | ||
83 | test_cipher: test_cipher.lo libafshcrypto.la | |
84 | $(LT_LDRULE_static) test_cipher.lo libafshcrypto.la | |
85 | ||
86 | ${TOP_INCDIR}/hcrypto/aes.h: ${UPSTREAM}/hcrypto/aes.h | |
87 | ${INSTALL_DATA} $? $@ | |
88 | ||
89 | ${TOP_INCDIR}/hcrypto/bn.h: ${UPSTREAM}/hcrypto/bn.h | |
90 | ${INSTALL_DATA} $? $@ | |
91 | ||
92 | ${TOP_INCDIR}/hcrypto/des.h: ${UPSTREAM}/hcrypto/des.h | |
93 | ${INSTALL_DATA} $? $@ | |
94 | ||
95 | ${TOP_INCDIR}/hcrypto/dh.h: ${UPSTREAM}/hcrypto/dh.h | |
96 | ${INSTALL_DATA} $? $@ | |
97 | ||
98 | ${TOP_INCDIR}/hcrypto/dsa.h: ${UPSTREAM}/hcrypto/dsa.h | |
99 | ${INSTALL_DATA} $? $@ | |
100 | ||
101 | ${TOP_INCDIR}/hcrypto/engine.h: engine.h | |
102 | ${INSTALL_DATA} $? $@ | |
103 | ||
104 | ${TOP_INCDIR}/hcrypto/evp.h: ${UPSTREAM}/hcrypto/evp.h | |
105 | ${INSTALL_DATA} $? $@ | |
106 | ||
107 | ${TOP_INCDIR}/hcrypto/evp-hcrypto.h: ${UPSTREAM}/hcrypto/evp-hcrypto.h | |
108 | ${INSTALL_DATA} $? $@ | |
109 | ||
110 | ${TOP_INCDIR}/hcrypto/evp-cc.h: ${UPSTREAM}/hcrypto/evp-cc.h | |
111 | ${INSTALL_DATA} $? $@ | |
112 | ||
113 | ${TOP_INCDIR}/hcrypto/hmac.h: ${UPSTREAM}/hcrypto/hmac.h | |
114 | ${INSTALL_DATA} $? $@ | |
115 | ||
116 | ${TOP_INCDIR}/hcrypto/md2.h: ${UPSTREAM}/hcrypto/md2.h | |
117 | ${INSTALL_DATA} $? $@ | |
118 | ||
119 | ${TOP_INCDIR}/hcrypto/md4.h: ${UPSTREAM}/hcrypto/md4.h | |
120 | ${INSTALL_DATA} $? $@ | |
121 | ||
122 | ${TOP_INCDIR}/hcrypto/md5.h: ${UPSTREAM}/hcrypto/md5.h | |
123 | ${INSTALL_DATA} $? $@ | |
124 | ||
125 | ${TOP_INCDIR}/hcrypto/pkcs12.h: ${UPSTREAM}/hcrypto/pkcs12.h | |
126 | ${INSTALL_DATA} $? $@ | |
127 | ||
128 | ${TOP_INCDIR}/hcrypto/rand.h: ${UPSTREAM}/hcrypto/rand.h | |
129 | ${INSTALL_DATA} $? $@ | |
130 | ||
131 | ${TOP_INCDIR}/hcrypto/rc2.h: ${UPSTREAM}/hcrypto/rc2.h | |
132 | ${INSTALL_DATA} $? $@ | |
133 | ||
134 | ${TOP_INCDIR}/hcrypto/rc4.h: ${UPSTREAM}/hcrypto/rc4.h | |
135 | ${INSTALL_DATA} $? $@ | |
136 | ||
137 | ${TOP_INCDIR}/hcrypto/rsa.h: ${UPSTREAM}/hcrypto/rsa.h | |
138 | ${INSTALL_DATA} $? $@ | |
139 | ||
140 | ${TOP_INCDIR}/hcrypto/sha.h: ${UPSTREAM}/hcrypto/sha.h | |
141 | ${INSTALL_DATA} $? $@ | |
142 | ||
143 | ${TOP_INCDIR}/hcrypto/ui.h: ${UPSTREAM}/hcrypto/ui.h | |
144 | ${INSTALL_DATA} $? $@ | |
145 | ||
146 | ${TOP_LIBDIR}/libafshcrypto.$(SHLIB_SUFFIX): libafshcrypto.la | |
147 | $(LT_INSTALL_DATA) libafshcrypto.la $(TOP_LIBDIR)/libafshcrypto.la | |
148 | # libtool gets confused if we leave these around | |
149 | $(RM) $(TOP_LIBDIR)/libafshcrypto.la | |
150 | ||
151 | ${TOP_LIBDIR}/libafshcrypto.a: libafshcrypto.a | |
152 | ${INSTALL_DATA} $? $@ | |
153 | ||
154 | ${TOP_LIBDIR}/libafshcrypto_lwp.a: libafshcrypto_lwp.a | |
155 | ${INSTALL_DATA} $? $@ | |
156 | ||
157 | # Pthread Targets | |
158 | ||
159 | CFLAGS_test_cipher.lo= -I${UPSTREAM}/roken/ | |
160 | CFLAGS_rand-unix.lo=@CFLAGS_NOERROR@ | |
161 | CFLAGS_validate.lo=@CFLAGS_NOERROR@ | |
162 | CFLAGS_evp.lo=-DHAVE_CONFIG_H | |
163 | ||
164 | # Here we have explicit rules for all the libtool objects we might need to | |
165 | # build. The implicit rules don't work since the sources are in a different | |
166 | # castle. | |
167 | aes.lo: ${UPSTREAM}/hcrypto/aes.c ${HEADERS} | |
168 | $(LTLWP_CCRULE) $(UPSTREAM)/hcrypto/aes.c | |
169 | ||
170 | bn.lo: ${UPSTREAM}/hcrypto/bn.c ${HEADERS} | |
171 | $(LTLWP_CCRULE) $(UPSTREAM)/hcrypto/bn.c | |
172 | ||
173 | camellia.lo: ${UPSTREAM}/hcrypto/camellia.c ${HEADERS} | |
174 | $(LTLWP_CCRULE) $(UPSTREAM)/hcrypto/camellia.c | |
175 | ||
176 | camellia-ntt.lo: ${UPSTREAM}/hcrypto/camellia-ntt.c ${HEADERS} | |
177 | $(LTLWP_CCRULE) $(UPSTREAM)/hcrypto/camellia-ntt.c | |
178 | ||
179 | des.lo: ${UPSTREAM}/hcrypto/des.c ${HEADERS} | |
180 | $(LTLWP_CCRULE) $(UPSTREAM)/hcrypto/des.c | |
181 | ||
182 | evp.lo: ${UPSTREAM}/hcrypto/evp.c ${HEADERS} | |
183 | $(LTLWP_CCRULE) $(UPSTREAM)/hcrypto/evp.c | |
184 | ||
185 | evp-hcrypto.lo: ${UPSTREAM}/hcrypto/evp-hcrypto.c ${HEADERS} | |
186 | $(LTLWP_CCRULE) $(UPSTREAM)/hcrypto/evp-hcrypto.c | |
187 | ||
188 | evp-cc.lo: ${UPSTREAM}/hcrypto/evp-cc.c ${HEADERS} | |
189 | $(LTLWP_CCRULE) $(UPSTREAM)/hcrypto/evp-cc.c | |
190 | ||
191 | hmac.lo: ${UPSTREAM}/hcrypto/hmac.c ${HEADERS} | |
192 | $(LTLWP_CCRULE) $(UPSTREAM)/hcrypto/hmac.c | |
193 | ||
194 | md2.lo: ${UPSTREAM}/hcrypto/md2.c ${HEADERS} | |
195 | $(LTLWP_CCRULE) $(UPSTREAM)/hcrypto/md2.c | |
196 | ||
197 | md4.lo: ${UPSTREAM}/hcrypto/md4.c ${HEADERS} | |
198 | $(LTLWP_CCRULE) $(UPSTREAM)/hcrypto/md4.c | |
199 | ||
200 | md5.lo: ${UPSTREAM}/hcrypto/md5.c ${HEADERS} | |
201 | $(LTLWP_CCRULE) $(UPSTREAM)/hcrypto/md5.c | |
202 | ||
203 | pkcs5.lo: ${UPSTREAM}/hcrypto/pkcs5.c ${HEADERS} | |
204 | $(LTLWP_CCRULE) $(UPSTREAM)/hcrypto/pkcs5.c | |
205 | ||
206 | rand-egd.lo: ${UPSTREAM}/hcrypto/rand-egd.c ${HEADERS} | |
207 | $(LTLWP_CCRULE) $(UPSTREAM)/hcrypto/rand-egd.c | |
208 | ||
209 | rand-fortuna.lo: ${UPSTREAM}/hcrypto/rand-fortuna.c ${HEADERS} | |
210 | $(LTLWP_CCRULE) $(UPSTREAM)/hcrypto/rand-fortuna.c | |
211 | ||
212 | rand-timer.lo: ${UPSTREAM}/hcrypto/rand-timer.c ${HEADERS} | |
213 | $(LTLWP_CCRULE) $(UPSTREAM)/hcrypto/rand-timer.c | |
214 | ||
215 | rand-unix.lo: ${UPSTREAM}/hcrypto/rand-unix.c ${HEADERS} | |
216 | $(LTLWP_CCRULE) $(UPSTREAM)/hcrypto/rand-unix.c | |
217 | ||
218 | rand.lo: ${UPSTREAM}/hcrypto/rand.c ${HEADERS} | |
219 | $(LTLWP_CCRULE) $(UPSTREAM)/hcrypto/rand.c | |
220 | ||
221 | rc2.lo: ${UPSTREAM}/hcrypto/rc2.c ${HEADERS} | |
222 | $(LTLWP_CCRULE) $(UPSTREAM)/hcrypto/rc2.c | |
223 | ||
224 | rc4.lo: ${UPSTREAM}/hcrypto/rc4.c ${HEADERS} | |
225 | $(LTLWP_CCRULE) $(UPSTREAM)/hcrypto/rc4.c | |
226 | ||
227 | rijndael-alg-fst.lo: ${UPSTREAM}/hcrypto/rijndael-alg-fst.c ${HEADERS} | |
228 | $(LTLWP_CCRULE) $(UPSTREAM)/hcrypto/rijndael-alg-fst.c | |
229 | ||
230 | rnd_keys.lo: ${UPSTREAM}/hcrypto/rnd_keys.c ${HEADERS} | |
231 | $(LTLWP_CCRULE) $(UPSTREAM)/hcrypto/rnd_keys.c | |
232 | ||
233 | sha.lo: ${UPSTREAM}/hcrypto/sha.c ${HEADERS} | |
234 | $(LTLWP_CCRULE) $(UPSTREAM)/hcrypto/sha.c | |
235 | ||
236 | sha256.lo: ${UPSTREAM}/hcrypto/sha256.c ${HEADERS} | |
237 | $(LTLWP_CCRULE) $(UPSTREAM)/hcrypto/sha256.c | |
238 | ||
239 | sha512.lo: ${UPSTREAM}/hcrypto/sha512.c ${HEADERS} | |
240 | ${LTLWP_CCRULE} $(UPSTREAM)/hcrypto/sha512.c | |
241 | ||
242 | ui.lo: ${UPSTREAM}/hcrypto/ui.c ${HEADERS} | |
243 | $(LTLWP_CCRULE) $(UPSTREAM)/hcrypto/ui.c | |
244 | ||
245 | validate.lo: ${UPSTREAM}/hcrypto/validate.c ${HEADERS} | |
246 | ${LTLWP_CCRULE} ${UPSTREAM}/hcrypto/validate.c | |
247 | ||
248 | test_cipher.lo: ${UPSTREAM}/hcrypto/test_cipher.c ${HEADERS} | |
249 | $(LTLWP_CCRULE) $(UPSTREAM)/hcrypto/test_cipher.c |