77e8fdbcacf3ca9137083fa8c78ffdebd63b6ab0
[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 # API version. Must be incremented whenever something changes.
8 LIBMAJOR=1
9 LIBMINOR=1
10
11 srcdir=@srcdir@
12 include @TOP_OBJDIR@/src/config/Makefile.config
13 include @TOP_OBJDIR@/src/config/Makefile.shared
14
15
16 HEADERS= ${TOP_INCDIR}/hcrypto/aes.h \
17          ${TOP_INCDIR}/hcrypto/des.h \
18          ${TOP_INCDIR}/hcrypto/engine.h \
19          ${TOP_INCDIR}/hcrypto/evp.h \
20          ${TOP_INCDIR}/hcrypto/evp-hcrypto.h \
21          ${TOP_INCDIR}/hcrypto/evp-cc.h \
22          ${TOP_INCDIR}/hcrypto/hmac.h \
23          ${TOP_INCDIR}/hcrypto/md2.h \
24          ${TOP_INCDIR}/hcrypto/md4.h \
25          ${TOP_INCDIR}/hcrypto/md5.h \
26          ${TOP_INCDIR}/hcrypto/rand.h \
27          ${TOP_INCDIR}/hcrypto/rc2.h \
28          ${TOP_INCDIR}/hcrypto/rc4.h \
29          ${TOP_INCDIR}/hcrypto/sha.h \
30          ${TOP_INCDIR}/hcrypto/ui.h
31
32 UPSTREAM= ${TOP_SRCDIR}/external/heimdal
33
34 MODULE_INCLUDE=-I${srcdir} -I${TOP_INCDIR}/hcrypto -I$(UPSTREAM)/hcrypto
35
36 SHLIBOBJ= libafshcrypto.${SHLIB_SUFFIX}.${LIBMAJOR}.${LIBMINOR}
37
38 all: @hcrypto_all_target@
39
40 all-internal: ${HEADERS} ${TOP_LIBDIR}/${SHLIBOBJ} \
41         ${TOP_LIBDIR}/libafshcrypto.a \
42         ${TOP_LIBDIR}/libafshcrypto_lwp.a
43
44 all-lwp: ${HEADERS} ${TOP_LIBDIR}/libafshcrypto_lwp.a
45
46 buildtools: ${HEADERS} ${TOP_LIBDIR}/libafshcrypto.a
47
48 install: @hcrypto_install_target@
49
50 install-internal: libafshcrypto.a ${SHLIBOBJ}
51         ${TOP_OBJDIR}/src/config/shlib-install -d ${DESTDIR}${libdir} \
52                 -l libafshcrypto -M ${LIBMAJOR} -m ${LIBMINOR}
53         ${INSTALL_DATA} libafshcrypto.a ${DESTDIR}${libdir}/libafshcrypto.a
54
55 dest: libafshcrypto.a ${SHLIBOBJ}
56         ${TOP_OBJDIR}/src/config/shlib-install -d ${DEST}/lib \
57                 -l libafshcrypto -M ${LIBMAJOR} -m ${LIBMINOR}
58         ${INSTALL_DATA} libafshcrypto.a ${DEST}/lib/libafshcrypto.a
59
60 clean:
61         $(RM) -f ${OBJECTS} ${SHLIBOBJ} rand-fortuna_lwp.o \
62                 libafshcrypto.a libafshcrypto_lwp.a libafshcrypto.exp \
63                 test_cipher test_cipher.o
64
65 COMMON_OBJS= aes.o camellia.o camellia-ntt.o des.o engine.o evp.o \
66              evp-hcrypto.o evp-cc.o hmac.o md2.o md4.o md5.o pkcs5.o \
67              rand-egd.o rand-timer.o rand-unix.o rand.o rc2.o rc4.o \
68              rijndael-alg-fst.o rnd_keys.o sha.o sha256.o sha512.o ui.o \
69              validate.o
70
71 OBJECTS = $(COMMON_OBJS) rand-fortuna.o
72
73 LWP_OBJS = $(COMMON_OBJS) rand-fortuna_lwp.o
74
75 ${TOP_LIBDIR}/${SHLIBOBJ}: ${SHLIBOBJ}
76         ${TOP_OBJDIR}/src/config/shlib-install -d ${TOP_LIBDIR} \
77                 -l libafshcrypto -M ${LIBMAJOR} -m ${LIBMINOR}
78
79 ${SHLIBOBJ}: ${OBJECTS} libafshcrypto.map
80         ${TOP_OBJDIR}/src/config/shlib-build -d $(srcdir) -l libafshcrypto \
81                 -M ${LIBMAJOR} -m ${LIBMINOR} -- \
82                 ${OBJECTS} $(LDFLAGS_roken) $(LIB_roken) ${MT_LIBS}
83
84 libafshcrypto.a: ${OBJECTS}
85         $(RM) -f $@
86         $(AR) crv $@ ${OBJECTS}
87         $(RANLIB) $@
88
89 libafshcrypto_lwp.a: $(LWP_OBJS)
90         $(RM) -f $@
91         $(AR) crv $@ $(LWP_OBJS)
92         $(RANLIB) $@
93
94 test_cipher: test_cipher.o libafshcrypto.a
95         $(AFS_LDRULE) test_cipher.o libafshcrypto.a $(LIB_roken)
96
97 ${TOP_INCDIR}/hcrypto/aes.h: ${UPSTREAM}/hcrypto/aes.h
98         ${INSTALL_DATA} $? $@
99
100 ${TOP_INCDIR}/hcrypto/bn.h: ${UPSTREAM}/hcrypto/bn.h
101         ${INSTALL_DATA} $? $@
102
103 ${TOP_INCDIR}/hcrypto/des.h: ${UPSTREAM}/hcrypto/des.h
104         ${INSTALL_DATA} $? $@
105
106 ${TOP_INCDIR}/hcrypto/dh.h: ${UPSTREAM}/hcrypto/dh.h
107         ${INSTALL_DATA} $? $@
108
109 ${TOP_INCDIR}/hcrypto/dsa.h: ${UPSTREAM}/hcrypto/dsa.h
110         ${INSTALL_DATA} $? $@
111
112 ${TOP_INCDIR}/hcrypto/engine.h: engine.h
113         ${INSTALL_DATA} $? $@
114
115 ${TOP_INCDIR}/hcrypto/evp.h: ${UPSTREAM}/hcrypto/evp.h
116         ${INSTALL_DATA} $? $@
117
118 ${TOP_INCDIR}/hcrypto/evp-hcrypto.h: ${UPSTREAM}/hcrypto/evp-hcrypto.h
119         ${INSTALL_DATA} $? $@
120
121 ${TOP_INCDIR}/hcrypto/evp-cc.h: ${UPSTREAM}/hcrypto/evp-cc.h
122         ${INSTALL_DATA} $? $@
123
124 ${TOP_INCDIR}/hcrypto/hmac.h: ${UPSTREAM}/hcrypto/hmac.h
125         ${INSTALL_DATA} $? $@
126
127 ${TOP_INCDIR}/hcrypto/md2.h: ${UPSTREAM}/hcrypto/md2.h
128         ${INSTALL_DATA} $? $@
129
130 ${TOP_INCDIR}/hcrypto/md4.h: ${UPSTREAM}/hcrypto/md4.h
131         ${INSTALL_DATA} $? $@
132
133 ${TOP_INCDIR}/hcrypto/md5.h: ${UPSTREAM}/hcrypto/md5.h
134         ${INSTALL_DATA} $? $@
135
136 ${TOP_INCDIR}/hcrypto/pkcs12.h: ${UPSTREAM}/hcrypto/pkcs12.h
137         ${INSTALL_DATA} $? $@
138
139 ${TOP_INCDIR}/hcrypto/rand.h: ${UPSTREAM}/hcrypto/rand.h
140         ${INSTALL_DATA} $? $@
141
142 ${TOP_INCDIR}/hcrypto/rc2.h: ${UPSTREAM}/hcrypto/rc2.h
143         ${INSTALL_DATA} $? $@
144
145 ${TOP_INCDIR}/hcrypto/rc4.h: ${UPSTREAM}/hcrypto/rc4.h
146         ${INSTALL_DATA} $? $@
147
148 ${TOP_INCDIR}/hcrypto/rsa.h: ${UPSTREAM}/hcrypto/rsa.h
149         ${INSTALL_DATA} $? $@
150
151 ${TOP_INCDIR}/hcrypto/sha.h: ${UPSTREAM}/hcrypto/sha.h
152         ${INSTALL_DATA} $? $@
153
154 ${TOP_INCDIR}/hcrypto/ui.h: ${UPSTREAM}/hcrypto/ui.h
155         ${INSTALL_DATA} $? $@
156
157 ${TOP_LIBDIR}/libafshcrypto.a: libafshcrypto.a
158         ${INSTALL_DATA} $? $@
159
160 ${TOP_LIBDIR}/libafshcrypto_lwp.a: libafshcrypto_lwp.a
161         ${INSTALL_DATA} $? $@
162
163 # Pthread Targets
164
165 CFLAGS_test_cipher.o= -I${UPSTREAM}/roken/
166 CFLAGS_rand-unix.o=@CFLAGS_NOERROR@
167 CFLAGS_validate.o=@CFLAGS_NOERROR@
168 CFLAGS_evp.o=-DHAVE_CONFIG_H
169
170 aes.o: ${UPSTREAM}/hcrypto/aes.c ${HEADERS}
171         $(AFS_CCRULE) $(UPSTREAM)/hcrypto/aes.c
172
173 bn.o: ${UPSTREAM}/hcrypto/bn.c ${HEADERS}
174         $(AFS_CCRULE) $(UPSTREAM)/hcrypto/bn.c
175
176 camellia.o: ${UPSTREAM}/hcrypto/camellia.c ${HEADERS}
177         $(AFS_CCRULE) $(UPSTREAM)/hcrypto/camellia.c
178
179 camellia-ntt.o: ${UPSTREAM}/hcrypto/camellia-ntt.c ${HEADERS}
180         $(AFS_CCRULE) $(UPSTREAM)/hcrypto/camellia-ntt.c
181
182 des.o: ${UPSTREAM}/hcrypto/des.c ${HEADERS}
183         $(AFS_CCRULE) $(UPSTREAM)/hcrypto/des.c
184
185 evp.o: ${UPSTREAM}/hcrypto/evp.c ${HEADERS}
186         $(AFS_CCRULE) $(UPSTREAM)/hcrypto/evp.c
187
188 evp-hcrypto.o: ${UPSTREAM}/hcrypto/evp-hcrypto.c ${HEADERS}
189         $(AFS_CCRULE) $(UPSTREAM)/hcrypto/evp-hcrypto.c
190
191 evp-cc.o: ${UPSTREAM}/hcrypto/evp-cc.c ${HEADERS}
192         $(AFS_CCRULE) $(UPSTREAM)/hcrypto/evp-cc.c
193
194 hmac.o: ${UPSTREAM}/hcrypto/hmac.c ${HEADERS}
195         $(AFS_CCRULE) $(UPSTREAM)/hcrypto/hmac.c
196
197 md2.o: ${UPSTREAM}/hcrypto/md2.c ${HEADERS}
198         $(AFS_CCRULE) $(UPSTREAM)/hcrypto/md2.c
199
200 md4.o: ${UPSTREAM}/hcrypto/md4.c ${HEADERS}
201         $(AFS_CCRULE) $(UPSTREAM)/hcrypto/md4.c
202
203 md5.o: ${UPSTREAM}/hcrypto/md5.c ${HEADERS}
204         $(AFS_CCRULE) $(UPSTREAM)/hcrypto/md5.c
205
206 pkcs5.o: ${UPSTREAM}/hcrypto/pkcs5.c ${HEADERS}
207         $(AFS_CCRULE) $(UPSTREAM)/hcrypto/pkcs5.c
208
209 rand-egd.o: ${UPSTREAM}/hcrypto/rand-egd.c ${HEADERS}
210         $(AFS_CCRULE) $(UPSTREAM)/hcrypto/rand-egd.c
211
212 rand-fortuna.o: ${UPSTREAM}/hcrypto/rand-fortuna.c ${HEADERS}
213         $(AFS_CCRULE) $(UPSTREAM)/hcrypto/rand-fortuna.c
214
215 rand-timer.o: ${UPSTREAM}/hcrypto/rand-timer.c ${HEADERS}
216         $(AFS_CCRULE) $(UPSTREAM)/hcrypto/rand-timer.c
217
218 rand-unix.o: ${UPSTREAM}/hcrypto/rand-unix.c ${HEADERS}
219         $(AFS_CCRULE) $(UPSTREAM)/hcrypto/rand-unix.c
220
221 rand.o: ${UPSTREAM}/hcrypto/rand.c ${HEADERS}
222         $(AFS_CCRULE) $(UPSTREAM)/hcrypto/rand.c
223
224 rc2.o: ${UPSTREAM}/hcrypto/rc2.c ${HEADERS}
225         $(AFS_CCRULE) $(UPSTREAM)/hcrypto/rc2.c
226
227 rc4.o: ${UPSTREAM}/hcrypto/rc4.c ${HEADERS}
228         $(AFS_CCRULE) $(UPSTREAM)/hcrypto/rc4.c
229
230 rijndael-alg-fst.o: ${UPSTREAM}/hcrypto/rijndael-alg-fst.c ${HEADERS}
231         $(AFS_CCRULE) $(UPSTREAM)/hcrypto/rijndael-alg-fst.c
232
233 rnd_keys.o: ${UPSTREAM}/hcrypto/rnd_keys.c ${HEADERS}
234         $(AFS_CCRULE) $(UPSTREAM)/hcrypto/rnd_keys.c
235
236 sha.o: ${UPSTREAM}/hcrypto/sha.c ${HEADERS}
237         $(AFS_CCRULE) $(UPSTREAM)/hcrypto/sha.c
238
239 sha256.o: ${UPSTREAM}/hcrypto/sha256.c ${HEADERS}
240         $(AFS_CCRULE) $(UPSTREAM)/hcrypto/sha256.c
241
242 sha512.o: ${UPSTREAM}/hcrypto/sha512.c ${HEADERS}
243         ${AFS_CCRULE} $(UPSTREAM)/hcrypto/sha512.c
244
245 ui.o: ${UPSTREAM}/hcrypto/ui.c ${HEADERS}
246         $(AFS_CCRULE) $(UPSTREAM)/hcrypto/ui.c
247
248 validate.o: ${UPSTREAM}/hcrypto/validate.c ${HEADERS}
249         ${AFS_CCRULE} ${UPSTREAM}/hcrypto/validate.c
250
251 test_cipher.o: ${UPSTREAM}/hcrypto/test_cipher.c ${HEADERS}
252         $(AFS_CCRULE) $(UPSTREAM)/hcrypto/test_cipher.c
253
254 # LWP Targets
255
256 rand-fortuna_lwp.o: ${UPSTREAM}/hcrypto/rand-fortuna.c ${HEADERS}
257         $(LWP_CCRULE) $(UPSTREAM)/hcrypto/rand-fortuna.c
258