preprocessor cleanup: __lint
[unleashed/tickless.git] / lib / libssl / Makefile
blob3969961b24fdfaa7920fa80c21d0bfff7b013096
1 # $OpenBSD: Makefile,v 1.32 2017/03/05 14:39:53 jsing Exp $
3 .include <bsd.own.mk>
4 .ifndef NOMAN
5 SUBDIR= man
6 .endif
8 PC_FILES=openssl.pc libssl.pc
10 CLEANFILES=${PC_FILES} ${VERSION_SCRIPT}
12 LIB= ssl
14 CFLAGS+= -Wall -Wundef
15 .if ${COMPILER_VERSION:L} != "gcc3"
16 CFLAGS+= -Werror
17 .endif
18 CFLAGS+= -DLIBRESSL_INTERNAL
19 CFLAGS+= -I${.CURDIR}
21 LDADD+= -L${BSDOBJDIR}/lib/libcrypto -lcrypto
23 VERSION_SCRIPT= Symbols.map
24 SYMBOL_LIST= ${.CURDIR}/Symbols.list
26 SRCS= \
27 ssl_srvr.c ssl_clnt.c s3_lib.c ssl_pkt.c ssl_both.c \
28 t1_meth.c t1_srvr.c t1_clnt.c t1_lib.c t1_enc.c t1_hash.c \
29 d1_meth.c d1_srvr.c d1_clnt.c d1_lib.c d1_pkt.c \
30 d1_both.c d1_enc.c d1_srtp.c \
31 ssl_lib.c ssl_cert.c ssl_sess.c \
32 ssl_ciph.c ssl_stat.c ssl_rsa.c \
33 ssl_asn1.c ssl_txt.c ssl_algs.c \
34 bio_ssl.c ssl_err.c t1_reneg.c \
35 ssl_packet.c ssl_versions.c pqueue.c
36 SRCS+= s3_cbc.c
37 SRCS+= bs_ber.c bs_cbb.c bs_cbs.c
39 HDRS= srtp.h ssl.h ssl2.h ssl3.h ssl23.h tls1.h dtls1.h
41 .PATH: ${.CURDIR}
43 includes:
44 @test -d ${DESTDIR}/usr/include/openssl || \
45 mkdir ${DESTDIR}/usr/include/openssl
46 @cd ${.CURDIR}; for i in $(HDRS); do \
47 j="cmp -s $$i ${DESTDIR}/usr/include/openssl/`basename $$i` || \
48 ${INSTALL} ${INSTALL_COPY} -o ${BINOWN} -g ${BINGRP} -m 444 $$i\
49 ${DESTDIR}/usr/include/openssl"; \
50 echo $$j; \
51 eval "$$j"; \
52 done;
54 ${VERSION_SCRIPT}: ${SYMBOL_LIST}
55 { printf '{\n\tglobal:\n'; \
56 sed '/^[._a-zA-Z]/s/$$/;/; s/^/ /' ${SYMBOL_LIST}; \
57 printf '\n\tlocal:\n\t\t*;\n};\n'; } >$@.tmp && mv $@.tmp $@
59 .include "compat.mk"
60 .include <bsd.lib.mk>
62 all: ${PC_FILES}
63 ${PC_FILES}: ${.CURDIR}/../libcrypto/opensslv.h
64 /bin/sh ${.CURDIR}/generate_pkgconfig.sh -c ${.CURDIR} -o ${.OBJDIR}
66 beforeinstall:
67 nm -o lib${LIB}.so | egrep -w 'printf|fprintf' && \
68 (echo please fix stdio usage in this library; false) || true
69 .for p in ${PC_FILES}
70 ${INSTALL} ${INSTALL_COPY} -o ${SHAREOWN} -g ${SHAREGRP} \
71 -m ${SHAREMODE} ${.OBJDIR}/$p ${DESTDIR}/usr/lib/pkgconfig/
72 .endfor
74 .include <bsd.subdir.mk>