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
7 # API version. Must be incremented whenever something changes.
12 include @TOP_OBJDIR@/src/config/Makefile.config
13 include @TOP_OBJDIR@/src/config/Makefile.shared
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
32 UPSTREAM= ${TOP_SRCDIR}/external/heimdal
34 MODULE_INCLUDE=-I${srcdir} -I${TOP_INCDIR}/hcrypto -I$(UPSTREAM)/hcrypto
36 SHLIBOBJ= libafshcrypto.${SHLIB_SUFFIX}.${LIBMAJOR}.${LIBMINOR}
38 all: ${HEADERS} ${TOP_LIBDIR}/${SHLIBOBJ} \
39 ${TOP_LIBDIR}/libafshcrypto.a \
40 ${TOP_LIBDIR}/libafshcrypto_lwp.a
42 buildtools: ${HEADERS} ${TOP_LIBDIR}/libafshcrypto.a
44 install: libafshcrypto.a ${SHLIBOBJ}
45 ${TOP_OBJDIR}/src/config/shlib-install -d ${DESTDIR}${libdir} \
46 -l libafshcrypto -M ${LIBMAJOR} -m ${LIBMINOR}
47 ${INSTALL_DATA} libafshcrypto.a ${DESTDIR}${libdir}/libafshcrypto.a
49 dest: libafshcrypto.a ${SHLIBOBJ}
50 ${TOP_OBJDIR}/src/config/shlib-install -d ${DEST}/lib \
51 -l libafshcrypto -M ${LIBMAJOR} -m ${LIBMINOR}
52 ${INSTALL_DATA} libafshcrypto.a ${DEST}/lib/libafshcrypto.a
55 $(RM) -f ${OBJECTS} ${SHLIBOBJ} rand-fortuna_lwp.o \
56 libafshcrypto.a libafshcrypto_lwp.a libafshcrypto.exp \
57 test_cipher test_cipher.o
59 COMMON_OBJS= aes.o camellia.o camellia-ntt.o des.o engine.o evp.o \
60 evp-hcrypto.o evp-cc.o hmac.o md2.o md4.o md5.o pkcs5.o \
61 rand-egd.o rand-timer.o rand-unix.o rand.o rc2.o rc4.o \
62 rijndael-alg-fst.o rnd_keys.o sha.o sha256.o sha512.o ui.o \
65 OBJECTS = $(COMMON_OBJS) rand-fortuna.o
67 LWP_OBJS = $(COMMON_OBJS) rand-fortuna_lwp.o
69 ${TOP_LIBDIR}/${SHLIBOBJ}: ${SHLIBOBJ}
70 ${TOP_OBJDIR}/src/config/shlib-install -d ${TOP_LIBDIR} \
71 -l libafshcrypto -M ${LIBMAJOR} -m ${LIBMINOR}
73 ${SHLIBOBJ}: ${OBJECTS} libafshcrypto.map
74 ${TOP_OBJDIR}/src/config/shlib-build -d $(srcdir) -l libafshcrypto \
75 -M ${LIBMAJOR} -m ${LIBMINOR} -- \
76 ${OBJECTS} $(LDFLAGS_roken) $(LIB_roken) ${MT_LIBS}
78 libafshcrypto.a: ${OBJECTS}
80 $(AR) crv $@ ${OBJECTS}
83 libafshcrypto_lwp.a: $(LWP_OBJS)
85 $(AR) crv $@ $(LWP_OBJS)
88 test_cipher: test_cipher.o libafshcrypto.a
89 $(AFS_LDRULE) test_cipher.o libafshcrypto.a $(LIB_roken)
91 ${TOP_INCDIR}/hcrypto/aes.h: ${UPSTREAM}/hcrypto/aes.h
94 ${TOP_INCDIR}/hcrypto/bn.h: ${UPSTREAM}/hcrypto/bn.h
97 ${TOP_INCDIR}/hcrypto/des.h: ${UPSTREAM}/hcrypto/des.h
100 ${TOP_INCDIR}/hcrypto/dh.h: ${UPSTREAM}/hcrypto/dh.h
101 ${INSTALL_DATA} $? $@
103 ${TOP_INCDIR}/hcrypto/dsa.h: ${UPSTREAM}/hcrypto/dsa.h
104 ${INSTALL_DATA} $? $@
106 ${TOP_INCDIR}/hcrypto/engine.h: engine.h
107 ${INSTALL_DATA} $? $@
109 ${TOP_INCDIR}/hcrypto/evp.h: ${UPSTREAM}/hcrypto/evp.h
110 ${INSTALL_DATA} $? $@
112 ${TOP_INCDIR}/hcrypto/evp-hcrypto.h: ${UPSTREAM}/hcrypto/evp-hcrypto.h
113 ${INSTALL_DATA} $? $@
115 ${TOP_INCDIR}/hcrypto/evp-cc.h: ${UPSTREAM}/hcrypto/evp-cc.h
116 ${INSTALL_DATA} $? $@
118 ${TOP_INCDIR}/hcrypto/hmac.h: ${UPSTREAM}/hcrypto/hmac.h
119 ${INSTALL_DATA} $? $@
121 ${TOP_INCDIR}/hcrypto/md2.h: ${UPSTREAM}/hcrypto/md2.h
122 ${INSTALL_DATA} $? $@
124 ${TOP_INCDIR}/hcrypto/md4.h: ${UPSTREAM}/hcrypto/md4.h
125 ${INSTALL_DATA} $? $@
127 ${TOP_INCDIR}/hcrypto/md5.h: ${UPSTREAM}/hcrypto/md5.h
128 ${INSTALL_DATA} $? $@
130 ${TOP_INCDIR}/hcrypto/pkcs12.h: ${UPSTREAM}/hcrypto/pkcs12.h
131 ${INSTALL_DATA} $? $@
133 ${TOP_INCDIR}/hcrypto/rand.h: ${UPSTREAM}/hcrypto/rand.h
134 ${INSTALL_DATA} $? $@
136 ${TOP_INCDIR}/hcrypto/rc2.h: ${UPSTREAM}/hcrypto/rc2.h
137 ${INSTALL_DATA} $? $@
139 ${TOP_INCDIR}/hcrypto/rc4.h: ${UPSTREAM}/hcrypto/rc4.h
140 ${INSTALL_DATA} $? $@
142 ${TOP_INCDIR}/hcrypto/rsa.h: ${UPSTREAM}/hcrypto/rsa.h
143 ${INSTALL_DATA} $? $@
145 ${TOP_INCDIR}/hcrypto/sha.h: ${UPSTREAM}/hcrypto/sha.h
146 ${INSTALL_DATA} $? $@
148 ${TOP_INCDIR}/hcrypto/ui.h: ${UPSTREAM}/hcrypto/ui.h
149 ${INSTALL_DATA} $? $@
151 ${TOP_LIBDIR}/libafshcrypto.a: libafshcrypto.a
152 ${INSTALL_DATA} $? $@
154 ${TOP_LIBDIR}/libafshcrypto_lwp.a: libafshcrypto_lwp.a
155 ${INSTALL_DATA} $? $@
159 CFLAGS_test_cipher.o= -I${UPSTREAM}/roken/
160 CFLAGS_rand-unix.o=@CFLAGS_NOERROR@
161 CFLAGS_evp.o=-DHAVE_CONFIG_H
163 aes.o: ${UPSTREAM}/hcrypto/aes.c ${HEADERS}
164 $(AFS_CCRULE) $(UPSTREAM)/hcrypto/aes.c
166 bn.o: ${UPSTREAM}/hcrypto/bn.c ${HEADERS}
167 $(AFS_CCRULE) $(UPSTREAM)/hcrypto/bn.c
169 camellia.o: ${UPSTREAM}/hcrypto/camellia.c ${HEADERS}
170 $(AFS_CCRULE) $(UPSTREAM)/hcrypto/camellia.c
172 camellia-ntt.o: ${UPSTREAM}/hcrypto/camellia-ntt.c ${HEADERS}
173 $(AFS_CCRULE) $(UPSTREAM)/hcrypto/camellia-ntt.c
175 des.o: ${UPSTREAM}/hcrypto/des.c ${HEADERS}
176 $(AFS_CCRULE) $(UPSTREAM)/hcrypto/des.c
178 evp.o: ${UPSTREAM}/hcrypto/evp.c ${HEADERS}
179 $(AFS_CCRULE) $(UPSTREAM)/hcrypto/evp.c
181 evp-hcrypto.o: ${UPSTREAM}/hcrypto/evp-hcrypto.c ${HEADERS}
182 $(AFS_CCRULE) $(UPSTREAM)/hcrypto/evp-hcrypto.c
184 evp-cc.o: ${UPSTREAM}/hcrypto/evp-cc.c ${HEADERS}
185 $(AFS_CCRULE) $(UPSTREAM)/hcrypto/evp-cc.c
187 hmac.o: ${UPSTREAM}/hcrypto/hmac.c ${HEADERS}
188 $(AFS_CCRULE) $(UPSTREAM)/hcrypto/hmac.c
190 md2.o: ${UPSTREAM}/hcrypto/md2.c ${HEADERS}
191 $(AFS_CCRULE) $(UPSTREAM)/hcrypto/md2.c
193 md4.o: ${UPSTREAM}/hcrypto/md4.c ${HEADERS}
194 $(AFS_CCRULE) $(UPSTREAM)/hcrypto/md4.c
196 md5.o: ${UPSTREAM}/hcrypto/md5.c ${HEADERS}
197 $(AFS_CCRULE) $(UPSTREAM)/hcrypto/md5.c
199 pkcs5.o: ${UPSTREAM}/hcrypto/pkcs5.c ${HEADERS}
200 $(AFS_CCRULE) $(UPSTREAM)/hcrypto/pkcs5.c
202 rand-egd.o: ${UPSTREAM}/hcrypto/rand-egd.c ${HEADERS}
203 $(AFS_CCRULE) $(UPSTREAM)/hcrypto/rand-egd.c
205 rand-fortuna.o: ${UPSTREAM}/hcrypto/rand-fortuna.c ${HEADERS}
206 $(AFS_CCRULE) $(UPSTREAM)/hcrypto/rand-fortuna.c
208 rand-timer.o: ${UPSTREAM}/hcrypto/rand-timer.c ${HEADERS}
209 $(AFS_CCRULE) $(UPSTREAM)/hcrypto/rand-timer.c
211 rand-unix.o: ${UPSTREAM}/hcrypto/rand-unix.c ${HEADERS}
212 $(AFS_CCRULE) $(UPSTREAM)/hcrypto/rand-unix.c
214 rand.o: ${UPSTREAM}/hcrypto/rand.c ${HEADERS}
215 $(AFS_CCRULE) $(UPSTREAM)/hcrypto/rand.c
217 rc2.o: ${UPSTREAM}/hcrypto/rc2.c ${HEADERS}
218 $(AFS_CCRULE) $(UPSTREAM)/hcrypto/rc2.c
220 rc4.o: ${UPSTREAM}/hcrypto/rc4.c ${HEADERS}
221 $(AFS_CCRULE) $(UPSTREAM)/hcrypto/rc4.c
223 rijndael-alg-fst.o: ${UPSTREAM}/hcrypto/rijndael-alg-fst.c ${HEADERS}
224 $(AFS_CCRULE) $(UPSTREAM)/hcrypto/rijndael-alg-fst.c
226 rnd_keys.o: ${UPSTREAM}/hcrypto/rnd_keys.c ${HEADERS}
227 $(AFS_CCRULE) $(UPSTREAM)/hcrypto/rnd_keys.c
229 sha.o: ${UPSTREAM}/hcrypto/sha.c ${HEADERS}
230 $(AFS_CCRULE) $(UPSTREAM)/hcrypto/sha.c
232 sha256.o: ${UPSTREAM}/hcrypto/sha256.c ${HEADERS}
233 $(AFS_CCRULE) $(UPSTREAM)/hcrypto/sha256.c
235 sha512.o: ${UPSTREAM}/hcrypto/sha512.c ${HEADERS}
236 ${AFS_CCRULE} $(UPSTREAM)/hcrypto/sha512.c
238 ui.o: ${UPSTREAM}/hcrypto/ui.c ${HEADERS}
239 $(AFS_CCRULE) $(UPSTREAM)/hcrypto/ui.c
241 validate.o: ${UPSTREAM}/hcrypto/validate.c ${HEADERS}
242 ${AFS_CCRULE} ${UPSTREAM}/hcrypto/validate.c
244 test_cipher.o: ${UPSTREAM}/hcrypto/test_cipher.c ${HEADERS}
245 $(AFS_CCRULE) $(UPSTREAM)/hcrypto/test_cipher.c
249 rand-fortuna_lwp.o: ${UPSTREAM}/hcrypto/rand-fortuna.c ${HEADERS}
250 $(LWP_CCRULE) $(UPSTREAM)/hcrypto/rand-fortuna.c