summaryrefslogtreecommitdiffstats
path: root/secure/lib/libcrypto/Makefile.inc
blob: 8b0ec13e4914c77b51d80c7b442e9ae19931b1e1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# $FreeBSD$

LCRYPTO_SRC=	${.CURDIR}/../../../crypto/openssl/crypto
CFLAGS+= -DTERMIOS -DANSI_SOURCE -DNO_IDEA -I${LCRYPTO_SRC} -I${.OBJDIR}

.if ${MACHINE_ARCH} == "i386"
CFLAGS+= -DL_ENDIAN
# -DBN_ASM -DSHA1_ASM -DMD5_ASM -DRMD160_ASM - XXX notyet
CFLAGS+= -DDEVRANDOM=\"/dev/urandom\"
.else
.if ${MACHINE_ARCH} == "alpha"
# no ENDIAN stuff defined for alpha (64-bit)
.endif
.endif

WITH_RSA?= YES

SRCS+=		buildinf.h
CLEANFILES+=	buildinf.h
CLEANDIRS+=	openssl

#	this bogus dependency was the easiest way to get the openssl/ 
#	directory populated
buildinf.h:  openssl/opensslconf.h openssl/headers-copied
	( echo "#ifndef MK1MF_BUILD"; \
	echo "  /* auto-generated by crypto/Makefile.ssl for crypto/cversion.c */"; \
	echo "  #define CFLAGS \"$(CC)\""; \
	echo "  #define PLATFORM \"`uname -s`-`uname -m`\""; \
	echo "  #define DATE \"`LC_TIME=C date`\""; \
	echo "#endif" ) > ${.TARGET}

openssl/opensslconf.h:  ../libcrypto/opensslconf-${MACHINE_ARCH}.h
	@test -d openssl || mkdir -p openssl
	cp ${.OODATE} ${.TARGET}

openssl/headers-copied:
	@test -d openssl || mkdir -p openssl
	${INSTALL} ${COPY} -m 444 ${CRYPTO_HDRS} ${EXTRA_HDRS} openssl
	@touch ${.TARGET}
OpenPOWER on IntegriCloud