make it possible to build bmake lib before dmake
[unleashed.git] / lib / libcrypto / compat.mk
blob594327de604a19af95246f4fcc37c4376978e5ba
1 MACHINE_CPU?= ${MACHINE}
3 CPPFLAGS+= -D__BEGIN_HIDDEN_DECLS= -D__END_HIDDEN_DECLS=
4 CPPFLAGS+= -I${LCRYPTO_SRC}/compat/include
5 # see libressl-portable/portable:m4/disable-compiler-warnings.m4
6 CFLAGS+= -Wno-pointer-sign
7 # sizeof(time_t) == 4 (2038 problem)
8 CFLAGS+= -DSMALL_TIME_T
10 SRCS+= compat/timingsafe_bcmp.c compat/timingsafe_memcmp.c
11 INSTALL_COPY?= ${COPY}
12 SHAREMODE?= 444
14 # we don't use MAPFILE_VERS here, because that would cause us to ignore
15 # shlib_version
16 SHLIB_LDADD+= -Mmapfile
17 .NOPATH: mapfile ${VERSION_SCRIPT}
18 mapfile: ${VERSION_SCRIPT}
19 { echo '$$mapfile_version 2'; \
20 printf 'SYMBOL_SCOPE '; \
21 cat ${VERSION_SCRIPT}; } > $@
22 CLEANFILES+= mapfile
23 BUILDFIRST+= mapfile
24 # XXX OPENSSL_cpuid_setup needs this
25 SHLIB_LDADD+= -z textoff
27 # XXX <openssl/*> includes need to be available in DESTDIR if DESTDIR is
28 # specified since the mk files set -isysroot in that case
29 .ifdef DESTDIR
30 beforebuild: includes prereq
31 # 'includes' assumes usr/include exists
32 includes: mkincdir
33 mkincdir:
34 ${INSTALL} -d ${DESTDIR}/usr/include
35 .endif
36 # install config files as well
37 afterinstall: distribution
38 distribution: mkdir_etc_ssl
39 mkdir_etc_ssl:
40 ${INSTALL} -d ${DESTDIR}/etc/ssl