libtool: Serialize building libfoo.la and libfoo.a
[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 @SHARED_ONLY@SHARED_LIBS = libafshcrypto.la
46 @SHARED_ONLY@SHARED_SHLIBS_TOP = ${TOP_LIBDIR}/libafshcrypto.$(SHLIB_SUFFIX)
47
48 all: @hcrypto_all_target@
49
50 all-internal: ${HEADERS} $(SHARED_SHLIBS_TOP) \
51         ${TOP_LIBDIR}/libafshcrypto.a \
52         ${TOP_LIBDIR}/libafshcrypto_lwp.a
53
54 all-lwp: ${HEADERS} ${TOP_LIBDIR}/libafshcrypto_lwp.a
55
56 buildtools: ${HEADERS} ${TOP_LIBDIR}/libafshcrypto.a
57
58 install: @hcrypto_install_target@
59
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
64
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
69
70 clean:
71         $(LT_CLEAN)
72         $(RM) -f *.o libafshcrypto.a libafshcrypto_lwp.a libafshcrypto.exp \
73                 test_cipher
74
75 $(LT_objs): $(HEADERS)
76
77 libafshcrypto.la: libafshcrypto.la.sym $(LT_objs) libafshcrypto.a
78         $(LT_LDLIB_shlib_only) $(LT_objs) $(LT_libs)
79
80 libafshcrypto.a: $(LT_objs)
81         $(LT_LDLIB_static) $(LT_objs)
82
83 libafshcrypto_lwp.a: $(LT_objs)
84         $(LT_LDLIB_lwp) $(LT_objs)
85
86 test_cipher: test_cipher.lo libafshcrypto.a
87         $(LT_LDRULE_static) test_cipher.lo libafshcrypto.a
88
89 ${TOP_INCDIR}/hcrypto/aes.h: ${UPSTREAM}/hcrypto/aes.h
90         ${INSTALL_DATA} $? $@
91
92 ${TOP_INCDIR}/hcrypto/bn.h: ${UPSTREAM}/hcrypto/bn.h
93         ${INSTALL_DATA} $? $@
94
95 ${TOP_INCDIR}/hcrypto/des.h: ${UPSTREAM}/hcrypto/des.h
96         ${INSTALL_DATA} $? $@
97
98 ${TOP_INCDIR}/hcrypto/dh.h: ${UPSTREAM}/hcrypto/dh.h
99         ${INSTALL_DATA} $? $@
100
101 ${TOP_INCDIR}/hcrypto/dsa.h: ${UPSTREAM}/hcrypto/dsa.h
102         ${INSTALL_DATA} $? $@
103
104 ${TOP_INCDIR}/hcrypto/engine.h: engine.h
105         ${INSTALL_DATA} $? $@
106
107 ${TOP_INCDIR}/hcrypto/evp.h: ${UPSTREAM}/hcrypto/evp.h
108         ${INSTALL_DATA} $? $@
109
110 ${TOP_INCDIR}/hcrypto/evp-hcrypto.h: ${UPSTREAM}/hcrypto/evp-hcrypto.h
111         ${INSTALL_DATA} $? $@
112
113 ${TOP_INCDIR}/hcrypto/evp-cc.h: ${UPSTREAM}/hcrypto/evp-cc.h
114         ${INSTALL_DATA} $? $@
115
116 ${TOP_INCDIR}/hcrypto/hmac.h: ${UPSTREAM}/hcrypto/hmac.h
117         ${INSTALL_DATA} $? $@
118
119 ${TOP_INCDIR}/hcrypto/md2.h: ${UPSTREAM}/hcrypto/md2.h
120         ${INSTALL_DATA} $? $@
121
122 ${TOP_INCDIR}/hcrypto/md4.h: ${UPSTREAM}/hcrypto/md4.h
123         ${INSTALL_DATA} $? $@
124
125 ${TOP_INCDIR}/hcrypto/md5.h: ${UPSTREAM}/hcrypto/md5.h
126         ${INSTALL_DATA} $? $@
127
128 ${TOP_INCDIR}/hcrypto/pkcs12.h: ${UPSTREAM}/hcrypto/pkcs12.h
129         ${INSTALL_DATA} $? $@
130
131 ${TOP_INCDIR}/hcrypto/rand.h: ${UPSTREAM}/hcrypto/rand.h
132         ${INSTALL_DATA} $? $@
133
134 ${TOP_INCDIR}/hcrypto/rc2.h: ${UPSTREAM}/hcrypto/rc2.h
135         ${INSTALL_DATA} $? $@
136
137 ${TOP_INCDIR}/hcrypto/rc4.h: ${UPSTREAM}/hcrypto/rc4.h
138         ${INSTALL_DATA} $? $@
139
140 ${TOP_INCDIR}/hcrypto/rsa.h: ${UPSTREAM}/hcrypto/rsa.h
141         ${INSTALL_DATA} $? $@
142
143 ${TOP_INCDIR}/hcrypto/sha.h: ${UPSTREAM}/hcrypto/sha.h
144         ${INSTALL_DATA} $? $@
145
146 ${TOP_INCDIR}/hcrypto/ui.h: ${UPSTREAM}/hcrypto/ui.h
147         ${INSTALL_DATA} $? $@
148
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
153
154 ${TOP_LIBDIR}/libafshcrypto.a: libafshcrypto.a
155         ${INSTALL_DATA} $? $@
156
157 ${TOP_LIBDIR}/libafshcrypto_lwp.a: libafshcrypto_lwp.a
158         ${INSTALL_DATA} $? $@
159
160 # Pthread Targets
161
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
166
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
169 # castle.
170 aes.lo: ${UPSTREAM}/hcrypto/aes.c ${HEADERS}
171         $(LTLWP_CCRULE) $(UPSTREAM)/hcrypto/aes.c
172
173 bn.lo: ${UPSTREAM}/hcrypto/bn.c ${HEADERS}
174         $(LTLWP_CCRULE) $(UPSTREAM)/hcrypto/bn.c
175
176 camellia.lo: ${UPSTREAM}/hcrypto/camellia.c ${HEADERS}
177         $(LTLWP_CCRULE) $(UPSTREAM)/hcrypto/camellia.c
178
179 camellia-ntt.lo: ${UPSTREAM}/hcrypto/camellia-ntt.c ${HEADERS}
180         $(LTLWP_CCRULE) $(UPSTREAM)/hcrypto/camellia-ntt.c
181
182 des.lo: ${UPSTREAM}/hcrypto/des.c ${HEADERS}
183         $(LTLWP_CCRULE) $(UPSTREAM)/hcrypto/des.c
184
185 evp.lo: ${UPSTREAM}/hcrypto/evp.c ${HEADERS}
186         $(LTLWP_CCRULE) $(UPSTREAM)/hcrypto/evp.c
187
188 evp-hcrypto.lo: ${UPSTREAM}/hcrypto/evp-hcrypto.c ${HEADERS}
189         $(LTLWP_CCRULE) $(UPSTREAM)/hcrypto/evp-hcrypto.c
190
191 evp-cc.lo: ${UPSTREAM}/hcrypto/evp-cc.c ${HEADERS}
192         $(LTLWP_CCRULE) $(UPSTREAM)/hcrypto/evp-cc.c
193
194 hmac.lo: ${UPSTREAM}/hcrypto/hmac.c ${HEADERS}
195         $(LTLWP_CCRULE) $(UPSTREAM)/hcrypto/hmac.c
196
197 md2.lo: ${UPSTREAM}/hcrypto/md2.c ${HEADERS}
198         $(LTLWP_CCRULE) $(UPSTREAM)/hcrypto/md2.c
199
200 md4.lo: ${UPSTREAM}/hcrypto/md4.c ${HEADERS}
201         $(LTLWP_CCRULE) $(UPSTREAM)/hcrypto/md4.c
202
203 md5.lo: ${UPSTREAM}/hcrypto/md5.c ${HEADERS}
204         $(LTLWP_CCRULE) $(UPSTREAM)/hcrypto/md5.c
205
206 pkcs5.lo: ${UPSTREAM}/hcrypto/pkcs5.c ${HEADERS}
207         $(LTLWP_CCRULE) $(UPSTREAM)/hcrypto/pkcs5.c
208
209 rand-egd.lo: ${UPSTREAM}/hcrypto/rand-egd.c ${HEADERS}
210         $(LTLWP_CCRULE) $(UPSTREAM)/hcrypto/rand-egd.c
211
212 rand-fortuna.lo: ${UPSTREAM}/hcrypto/rand-fortuna.c ${HEADERS}
213         $(LTLWP_CCRULE) $(UPSTREAM)/hcrypto/rand-fortuna.c
214
215 rand-timer.lo: ${UPSTREAM}/hcrypto/rand-timer.c ${HEADERS}
216         $(LTLWP_CCRULE) $(UPSTREAM)/hcrypto/rand-timer.c
217
218 rand-unix.lo: ${UPSTREAM}/hcrypto/rand-unix.c ${HEADERS}
219         $(LTLWP_CCRULE) $(UPSTREAM)/hcrypto/rand-unix.c
220
221 rand.lo: ${UPSTREAM}/hcrypto/rand.c ${HEADERS}
222         $(LTLWP_CCRULE) $(UPSTREAM)/hcrypto/rand.c
223
224 rc2.lo: ${UPSTREAM}/hcrypto/rc2.c ${HEADERS}
225         $(LTLWP_CCRULE) $(UPSTREAM)/hcrypto/rc2.c
226
227 rc4.lo: ${UPSTREAM}/hcrypto/rc4.c ${HEADERS}
228         $(LTLWP_CCRULE) $(UPSTREAM)/hcrypto/rc4.c
229
230 rijndael-alg-fst.lo: ${UPSTREAM}/hcrypto/rijndael-alg-fst.c ${HEADERS}
231         $(LTLWP_CCRULE) $(UPSTREAM)/hcrypto/rijndael-alg-fst.c
232
233 rnd_keys.lo: ${UPSTREAM}/hcrypto/rnd_keys.c ${HEADERS}
234         $(LTLWP_CCRULE) $(UPSTREAM)/hcrypto/rnd_keys.c
235
236 sha.lo: ${UPSTREAM}/hcrypto/sha.c ${HEADERS}
237         $(LTLWP_CCRULE) $(UPSTREAM)/hcrypto/sha.c
238
239 sha256.lo: ${UPSTREAM}/hcrypto/sha256.c ${HEADERS}
240         $(LTLWP_CCRULE) $(UPSTREAM)/hcrypto/sha256.c
241
242 sha512.lo: ${UPSTREAM}/hcrypto/sha512.c ${HEADERS}
243         ${LTLWP_CCRULE} $(UPSTREAM)/hcrypto/sha512.c
244
245 ui.lo: ${UPSTREAM}/hcrypto/ui.c ${HEADERS}
246         $(LTLWP_CCRULE) $(UPSTREAM)/hcrypto/ui.c
247
248 validate.lo: ${UPSTREAM}/hcrypto/validate.c ${HEADERS}
249         ${LTLWP_CCRULE} ${UPSTREAM}/hcrypto/validate.c
250
251 test_cipher.lo: ${UPSTREAM}/hcrypto/test_cipher.c ${HEADERS}
252         $(LTLWP_CCRULE) $(UPSTREAM)/hcrypto/test_cipher.c