APE=/sys/src/ape
<$APE/config
LIB=/$objtype/lib/ape/libsec.a
LIBSECCFILES =\
des.c desmodes.c desECB.c desCBC.c des3ECB.c des3CBC.c\
aes.c blowfish.c \
hmac.c md5.c md5block.c md4.c sha1.c sha1block.c\
sha2_64.c sha2_128.c sha2block64.c sha2block128.c\
sha1block.c md5block.c\
sha1pickle.c md5pickle.c\
rc4.c\
genrandom.c prng.c fastrand.c nfastrand.c\
probably_prime.c smallprimetest.c genprime.c dsaprimes.c\
gensafeprime.c genstrongprime.c\
rsagen.c rsafill.c rsaencrypt.c rsadecrypt.c rsaalloc.c \
rsaprivtopub.c decodepem.c \
eggen.c egencrypt.c egdecrypt.c egalloc.c egprivtopub.c \
egsign.c egverify.c \
dsagen.c dsaalloc.c dsaprivtopub.c dsasign.c dsaverify.c \
tlshand.c readcert.c \
CFILES=\
$LIBSECCFILES\
x509-ape.c\
ALLOFILES=${CFILES:%.c=%.$O}
# cull things in the per-machine directories from this list
OFILES= `{rc ./reduce $O $objtype $ALLOFILES}
HFILES=\
/sys/include/ape/libsec.h\
/sys/include/ape/mp.h\
../../9/libc.h\
UPDATE=\
mkfile\
$HFILES\
$CFILES\
CLEANFILES=\
x509-ape.c
</sys/src/cmd/mksyslib
CFLAGS=-TVwc -+ -I. -I../../9 -D_POSIX_SOURCE -D_PLAN9_SOURCE -I/sys/src/libmp/port
%.$O: /sys/src/libsec/port/%.c
$CC $CFLAGS /sys/src/libsec/port/$stem.c
x509-ape.c: /sys/src/libsec/port/x509.c
cat /sys/src/libsec/port/x509.c | \
sed 's/Tm \*tm = gmtime\(t\)/struct tm *tm0 = gmtime\(\&t\)/;s/tm->/tm0->tm_/g' | \
sed 's/static //g' > x509-ape.c
$O.rsatest: rsatest.$O
$LD -o $target $prereq
|