include @TOP_OBJDIR@/src/config/Makefile.config
include @TOP_OBJDIR@/src/config/Makefile.shared
-INSTALL = @INSTALL@
-INSTALL_DATA = @INSTALL_DATA@
HEADERS= ${TOP_INCDIR}/hcrypto/aes.h \
${TOP_INCDIR}/hcrypto/des.h \
UPSTREAM= ${TOP_SRCDIR}/external/heimdal
-MODULE_INCLUDE=-I${TOP_INCDIR}/hcrypto -I$(UPSTREAM)/hcrypto
+MODULE_INCLUDE=-I${srcdir} -I${TOP_INCDIR}/hcrypto -I$(UPSTREAM)/hcrypto
SHLIBOBJ= libafshcrypto.${SHLIB_SUFFIX}.${LIBMAJOR}.${LIBMINOR}
-all: $(ROKEN_HEADERS) ${HEADERS} ${TOP_LIBDIR}/${SHLIBOBJ} \
+all: ${HEADERS} ${TOP_LIBDIR}/${SHLIBOBJ} \
${TOP_LIBDIR}/libafshcrypto.a \
${TOP_LIBDIR}/libafshcrypto_lwp.a
+buildtools: ${HEADERS} ${TOP_LIBDIR}/libafshcrypto.a
+
install: libafshcrypto.a ${SHLIBOBJ}
${TOP_OBJDIR}/src/config/shlib-install -d ${DESTDIR}${libdir} \
-l libafshcrypto -M ${LIBMAJOR} -m ${LIBMINOR}
${INSTALL_DATA} libafshcrypto.a ${DEST}/lib/libafshcrypto.a
clean:
- $(RM) -f ${OBJECTS} ${SHLIBOBJ} libafshcrypto.a libafshcrypto.exp \
- test_cipher test_cipher.o hex.o
+ $(RM) -f ${OBJECTS} ${SHLIBOBJ} rand-fortuna_lwp.o \
+ libafshcrypto.a libafshcrypto_lwp.a libafshcrypto.exp \
+ test_cipher test_cipher.o
COMMON_OBJS= aes.o camellia.o camellia-ntt.o des.o engine.o evp.o \
evp-hcrypto.o evp-cc.o hmac.o md2.o md4.o md5.o pkcs5.o \
rand-egd.o rand-timer.o rand-unix.o rand.o rc2.o rc4.o \
rijndael-alg-fst.o rnd_keys.o sha.o sha256.o sha512.o ui.o \
- validate.o \
- cloexec.o ct.o issuid.o net_read.o net_write.o warnerr.o
-
-OBJECTS = $(COMMON_OBJS) rand-fortuna.o $(ROKEN_LIBOBJS)
+ validate.o
-LWP_OBJS = $(COMMON_OBJS) rand-fortuna_lwp.o $(ROKEN_LIBOBJS)
+OBJECTS = $(COMMON_OBJS) rand-fortuna.o
-LWPRULE=$(CC) $(AFS_CPPFLAGS) $(COMMON_CFLAGS) $(XCFLAGS) $(ARCHFLAGS) \
- -I$(TOP_INCDIR)/hcrypto -I$(UPSTREAM)/hcrypto -c $?
+LWP_OBJS = $(COMMON_OBJS) rand-fortuna_lwp.o
${TOP_LIBDIR}/${SHLIBOBJ}: ${SHLIBOBJ}
${TOP_OBJDIR}/src/config/shlib-install -d ${TOP_LIBDIR} \
${SHLIBOBJ}: ${OBJECTS} libafshcrypto.map
${TOP_OBJDIR}/src/config/shlib-build -d $(srcdir) -l libafshcrypto \
-M ${LIBMAJOR} -m ${LIBMINOR} -- \
- ${OBJECTS} ${MT_LIBS}
+ ${OBJECTS} $(LDFLAGS_roken) $(LIB_roken) ${MT_LIBS}
libafshcrypto.a: ${OBJECTS}
$(RM) -f $@
$(AR) crv $@ $(LWP_OBJS)
$(RANLIB) $@
-test_cipher: test_cipher.o hex.o libafshcrypto.a
- $(AFS_LDRULE) test_cipher.o hex.o libafshcrypto.a
+test_cipher: test_cipher.o libafshcrypto.a
+ $(AFS_LDRULE) test_cipher.o libafshcrypto.a $(LIB_roken)
${TOP_INCDIR}/hcrypto/aes.h: ${UPSTREAM}/hcrypto/aes.h
${INSTALL_DATA} $? $@
CFLAGS_rand-unix.o=@CFLAGS_NOERROR@
CFLAGS_evp.o=-DHAVE_CONFIG_H
-aes.o: ${UPSTREAM}/hcrypto/aes.c
+aes.o: ${UPSTREAM}/hcrypto/aes.c ${HEADERS}
$(AFS_CCRULE) $(UPSTREAM)/hcrypto/aes.c
-bn.o: ${UPSTREAM}/hcrypto/bn.c
+bn.o: ${UPSTREAM}/hcrypto/bn.c ${HEADERS}
$(AFS_CCRULE) $(UPSTREAM)/hcrypto/bn.c
-camellia.o: ${UPSTREAM}/hcrypto/camellia.c
+camellia.o: ${UPSTREAM}/hcrypto/camellia.c ${HEADERS}
$(AFS_CCRULE) $(UPSTREAM)/hcrypto/camellia.c
-camellia-ntt.o: ${UPSTREAM}/hcrypto/camellia-ntt.c
+camellia-ntt.o: ${UPSTREAM}/hcrypto/camellia-ntt.c ${HEADERS}
$(AFS_CCRULE) $(UPSTREAM)/hcrypto/camellia-ntt.c
-des.o: ${UPSTREAM}/hcrypto/des.c
+des.o: ${UPSTREAM}/hcrypto/des.c ${HEADERS}
$(AFS_CCRULE) $(UPSTREAM)/hcrypto/des.c
-evp.o: ${UPSTREAM}/hcrypto/evp.c
+evp.o: ${UPSTREAM}/hcrypto/evp.c ${HEADERS}
$(AFS_CCRULE) $(UPSTREAM)/hcrypto/evp.c
-evp-hcrypto.o: ${UPSTREAM}/hcrypto/evp-hcrypto.c
+evp-hcrypto.o: ${UPSTREAM}/hcrypto/evp-hcrypto.c ${HEADERS}
$(AFS_CCRULE) $(UPSTREAM)/hcrypto/evp-hcrypto.c
-evp-cc.o: ${UPSTREAM}/hcrypto/evp-cc.c
+evp-cc.o: ${UPSTREAM}/hcrypto/evp-cc.c ${HEADERS}
$(AFS_CCRULE) $(UPSTREAM)/hcrypto/evp-cc.c
-hmac.o: ${UPSTREAM}/hcrypto/hmac.c
+hmac.o: ${UPSTREAM}/hcrypto/hmac.c ${HEADERS}
$(AFS_CCRULE) $(UPSTREAM)/hcrypto/hmac.c
-md2.o: ${UPSTREAM}/hcrypto/md2.c
+md2.o: ${UPSTREAM}/hcrypto/md2.c ${HEADERS}
$(AFS_CCRULE) $(UPSTREAM)/hcrypto/md2.c
-md4.o: ${UPSTREAM}/hcrypto/md4.c
+md4.o: ${UPSTREAM}/hcrypto/md4.c ${HEADERS}
$(AFS_CCRULE) $(UPSTREAM)/hcrypto/md4.c
-md5.o: ${UPSTREAM}/hcrypto/md5.c
+md5.o: ${UPSTREAM}/hcrypto/md5.c ${HEADERS}
$(AFS_CCRULE) $(UPSTREAM)/hcrypto/md5.c
-pkcs5.o: ${UPSTREAM}/hcrypto/pkcs5.c
+pkcs5.o: ${UPSTREAM}/hcrypto/pkcs5.c ${HEADERS}
$(AFS_CCRULE) $(UPSTREAM)/hcrypto/pkcs5.c
-rand-egd.o: ${UPSTREAM}/hcrypto/rand-egd.c
+rand-egd.o: ${UPSTREAM}/hcrypto/rand-egd.c ${HEADERS}
$(AFS_CCRULE) $(UPSTREAM)/hcrypto/rand-egd.c
-rand-fortuna.o: ${UPSTREAM}/hcrypto/rand-fortuna.c
+rand-fortuna.o: ${UPSTREAM}/hcrypto/rand-fortuna.c ${HEADERS}
$(AFS_CCRULE) $(UPSTREAM)/hcrypto/rand-fortuna.c
-rand-timer.o: ${UPSTREAM}/hcrypto/rand-timer.c
+rand-timer.o: ${UPSTREAM}/hcrypto/rand-timer.c ${HEADERS}
$(AFS_CCRULE) $(UPSTREAM)/hcrypto/rand-timer.c
-rand-unix.o: ${UPSTREAM}/hcrypto/rand-unix.c
+rand-unix.o: ${UPSTREAM}/hcrypto/rand-unix.c ${HEADERS}
$(AFS_CCRULE) $(UPSTREAM)/hcrypto/rand-unix.c
-rand.o: ${UPSTREAM}/hcrypto/rand.c
+rand.o: ${UPSTREAM}/hcrypto/rand.c ${HEADERS}
$(AFS_CCRULE) $(UPSTREAM)/hcrypto/rand.c
-rc2.o: ${UPSTREAM}/hcrypto/rc2.c
+rc2.o: ${UPSTREAM}/hcrypto/rc2.c ${HEADERS}
$(AFS_CCRULE) $(UPSTREAM)/hcrypto/rc2.c
-rc4.o: ${UPSTREAM}/hcrypto/rc4.c
+rc4.o: ${UPSTREAM}/hcrypto/rc4.c ${HEADERS}
$(AFS_CCRULE) $(UPSTREAM)/hcrypto/rc4.c
-rijndael-alg-fst.o: ${UPSTREAM}/hcrypto/rijndael-alg-fst.c
+rijndael-alg-fst.o: ${UPSTREAM}/hcrypto/rijndael-alg-fst.c ${HEADERS}
$(AFS_CCRULE) $(UPSTREAM)/hcrypto/rijndael-alg-fst.c
-rnd_keys.o: ${UPSTREAM}/hcrypto/rnd_keys.c
+rnd_keys.o: ${UPSTREAM}/hcrypto/rnd_keys.c ${HEADERS}
$(AFS_CCRULE) $(UPSTREAM)/hcrypto/rnd_keys.c
-sha.o: ${UPSTREAM}/hcrypto/sha.c
+sha.o: ${UPSTREAM}/hcrypto/sha.c ${HEADERS}
$(AFS_CCRULE) $(UPSTREAM)/hcrypto/sha.c
-sha256.o: ${UPSTREAM}/hcrypto/sha256.c
+sha256.o: ${UPSTREAM}/hcrypto/sha256.c ${HEADERS}
$(AFS_CCRULE) $(UPSTREAM)/hcrypto/sha256.c
-sha512.o: ${UPSTREAM}/hcrypto/sha512.c
+sha512.o: ${UPSTREAM}/hcrypto/sha512.c ${HEADERS}
${AFS_CCRULE} $(UPSTREAM)/hcrypto/sha512.c
-ui.o: ${UPSTREAM}/hcrypto/ui.c
+ui.o: ${UPSTREAM}/hcrypto/ui.c ${HEADERS}
$(AFS_CCRULE) $(UPSTREAM)/hcrypto/ui.c
-validate.o: ${UPSTREAM}/hcrypto/validate.c
+validate.o: ${UPSTREAM}/hcrypto/validate.c ${HEADERS}
${AFS_CCRULE} ${UPSTREAM}/hcrypto/validate.c
-test_cipher.o: ${UPSTREAM}/hcrypto/test_cipher.c
+test_cipher.o: ${UPSTREAM}/hcrypto/test_cipher.c ${HEADERS}
$(AFS_CCRULE) $(UPSTREAM)/hcrypto/test_cipher.c
-# These bits of libroken are new functionality, rather than compatibility
-# code. Where they should go eventually is unclear.
-
-cloexec.o: ${UPSTREAM}/roken/cloexec.c
- $(AFS_CCRULE) $(UPSTREAM)/roken/cloexec.c
-
-ct.o: ${UPSTREAM}/roken/ct.c
- $(AFS_CCRULE) $(UPSTREAM)/roken/ct.c
-
-hex.o: ${UPSTREAM}/roken/hex.c
- $(AFS_CCRULE) $(UPSTREAM)/roken/hex.c
-
-issuid.o: ${UPSTREAM}/roken/issuid.c
- $(AFS_CCRULE) $(UPSTREAM)/roken/issuid.c
-
-net_read.o: ${UPSTREAM}/roken/net_read.c
- $(AFS_CCRULE) $(UPSTREAM)/roken/net_read.c
-
-net_write.o: ${UPSTREAM}/roken/net_write.c
- $(AFS_CCRULE) $(UPSTREAM)/roken/net_write.c
-
-# These bits of libroken are compatibility functions. They should get moved
-# out into a new libroken top level target, which allows the use of an
-# existing libroken, if one is available.
-
-strlcpy.o: ${UPSTREAM}/roken/strlcpy.c
- $(AFS_CCRULE) $(UPSTREAM)/roken/strlcpy.c
-
-err.h: ${UPSTREAM}/roken/err.hin
- cp $? $@
-
-err.o: ${UPSTREAM}/roken/err.c
- $(AFS_CCRULE) $(UPSTREAM)/roken/err.c
-
-errx.o: ${UPSTREAM}/roken/errx.c
- $(AFS_CCRULE) $(UPSTREAM)/roken/errx.c
- ${CCRULE}
-
-getprogname.o: ${UPSTREAM}/roken/getprogname.c
- $(AFS_CCRULE) $(UPSTREAM)/roken/getprogname.c
- ${CCRULE}
-
-verr.o: ${UPSTREAM}/roken/verr.c
- $(AFS_CCRULE) $(UPSTREAM)/roken/verr.c
- ${CCRULE}
-
-verrx.o: ${UPSTREAM}/roken/verrx.c
- $(AFS_CCRULE) $(UPSTREAM)/roken/verrx.c
- ${CCRULE}
-
-vwarn.o: ${UPSTREAM}/roken/vwarn.c
- $(AFS_CCRULE) $(UPSTREAM)/roken/vwarn.c
- ${CCRULE}
-
-vwarnx.o: ${UPSTREAM}/roken/vwarnx.c
- $(AFS_CCRULE) $(UPSTREAM)/roken/vwarnx.c
- ${CCRULE}
-
-warn.o: ${UPSTREAM}/roken/warn.c
- $(AFS_CCRULE) $(UPSTREAM)/roken/warn.c
- ${CCRULE}
-
-warnerr.o: ${UPSTREAM}/roken/warnerr.c
- $(AFS_CCRULE) $(UPSTREAM)/roken/warnerr.c
- ${CCRULE}
-
-warnx.o: ${UPSTREAM}/roken/warnx.c
- $(AFS_CCRULE) $(UPSTREAM)/roken/warnx.c
- ${CCRULE}
-
# LWP Targets
-rand-fortuna_lwp.o: ${UPSTREAM}/hcrypto/rand-fortuna.c
- ${LWPRULE} -o rand-fortuna_lwp.o
+rand-fortuna_lwp.o: ${UPSTREAM}/hcrypto/rand-fortuna.c ${HEADERS}
+ $(LWP_CCRULE) $(UPSTREAM)/hcrypto/rand-fortuna.c