libc: remove THIRDPARTYLICENSE/extract-copyright
[unleashed.git] / lib / libssl / Makefile
blob9c486722ced1e0232c7abb5eccf835ebd0a9fc9f
1 # $OpenBSD: Makefile,v 1.39 2018/03/17 16:20:01 beck 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} == "clang"
16 CFLAGS+= -Werror
17 .endif
18 CFLAGS+= -DLIBRESSL_INTERNAL
20 CFLAGS+= -I${.CURDIR}
22 LDADD+= -L${BSDOBJDIR}/lib/libcrypto -lcrypto
24 VERSION_SCRIPT= Symbols.map
25 SYMBOL_LIST= ${.CURDIR}/Symbols.list
27 SRCS= \
28 ssl_srvr.c ssl_clnt.c s3_lib.c ssl_pkt.c ssl_both.c \
29 t1_meth.c t1_srvr.c t1_clnt.c t1_lib.c t1_enc.c t1_hash.c \
30 d1_meth.c d1_srvr.c d1_clnt.c d1_lib.c d1_pkt.c \
31 d1_both.c d1_enc.c d1_srtp.c \
32 ssl_lib.c ssl_cert.c ssl_sess.c \
33 ssl_ciph.c ssl_stat.c ssl_rsa.c \
34 ssl_asn1.c ssl_txt.c ssl_algs.c \
35 bio_ssl.c ssl_err.c \
36 ssl_packet.c ssl_tlsext.c ssl_versions.c pqueue.c ssl_init.c
37 SRCS+= s3_cbc.c
38 SRCS+= bs_ber.c bs_cbb.c bs_cbs.c
40 HDRS= srtp.h ssl.h ssl2.h ssl3.h ssl23.h tls1.h dtls1.h
42 .PATH: ${.CURDIR}
44 includes:
45 @test -d ${DESTDIR}/usr/include/openssl || \
46 mkdir ${DESTDIR}/usr/include/openssl
47 @cd ${.CURDIR}; for i in $(HDRS); do \
48 j="cmp -s $$i ${DESTDIR}/usr/include/openssl/`basename $$i` || \
49 ${INSTALL} ${INSTALL_COPY} -o ${BINOWN} -g ${BINGRP} -m 444 $$i\
50 ${DESTDIR}/usr/include/openssl"; \
51 echo $$j; \
52 eval "$$j"; \
53 done;
55 ${VERSION_SCRIPT}: ${SYMBOL_LIST}
56 { printf '{\n\tglobal:\n'; \
57 sed '/^[._a-zA-Z]/s/$$/;/; s/^/ /' ${SYMBOL_LIST}; \
58 printf '\n\tlocal:\n\t\t*;\n};\n'; } >$@.tmp && mv $@.tmp $@
60 .include "compat.mk"
61 .include <bsd.lib.mk>
63 all: ${PC_FILES}
64 ${PC_FILES}: ${.CURDIR}/../libcrypto/opensslv.h
65 /bin/sh ${.CURDIR}/generate_pkgconfig.sh -c ${.CURDIR} -o ${.OBJDIR}
67 beforeinstall:
68 nm -o lib${LIB}.so | egrep -w 'printf|fprintf' && \
69 (echo please fix stdio usage in this library; false) || true
70 .for p in ${PC_FILES}
71 ${INSTALL} ${INSTALL_COPY} -o ${SHAREOWN} -g ${SHAREGRP} \
72 -m ${SHAREMODE} ${.OBJDIR}/$p ${DESTDIR}/usr/lib/pkgconfig/
73 .endfor
75 .include <bsd.subdir.mk>