Home | History | Annotate | Line # | Download | only in libcrypto
Makefile revision 1.13
      1  1.13  christos #	$NetBSD: Makefile,v 1.13 2018/02/08 21:57:24 christos Exp $
      2   1.1  christos 
      3   1.1  christos # RCSid:
      4   1.1  christos #	Id: Makefile,v 1.33 1998/11/11 11:53:53 sjg Exp
      5   1.1  christos #
      6   1.1  christos #	@(#) Copyright (c) 1994 Simon J. Gerraty
      7   1.1  christos #
      8   1.1  christos #	This file is provided in the hope that it will
      9   1.1  christos #	be of use.  There is absolutely NO WARRANTY.
     10   1.1  christos #	Permission to copy, redistribute or otherwise
     11   1.1  christos #	use this file is hereby granted provided that 
     12   1.1  christos #	the above copyright notice and this notice are
     13   1.1  christos #	left intact. 
     14   1.1  christos #      
     15   1.1  christos #	Please send copies of changes and bug-fixes to:
     16   1.1  christos #	sjg (at] quick.com.au
     17   1.1  christos #
     18   1.1  christos 
     19   1.1  christos LIB=	crypto
     20   1.1  christos USE_FORT?= yes	# cryptographic software
     21   1.1  christos USE_SHLIBDIR=	yes
     22   1.1  christos USE_FIPS=	no
     23   1.1  christos 
     24   1.1  christos .include <bsd.own.mk>
     25   1.1  christos .include <bsd.shlib.mk>
     26   1.1  christos 
     27   1.1  christos # XXX There's a bit of work to do before we can enable warnings.
     28   1.1  christos WARNS=0
     29   1.3     joerg CWARNFLAGS.clang+=	-Wno-empty-body -Wno-unused-value -Wno-parentheses
     30   1.1  christos 
     31   1.6  christos CPPFLAGS+= -Dlib${LIB} -I. -I${OPENSSLSRC}/crypto -I${OPENSSLSRC}
     32  1.13  christos CPPFLAGS+= -I${OPENSSLSRC}/include -I${OPENSSLSRC}/crypto/include
     33   1.6  christos CPPFLAGS+= -I${OPENSSLSRC}/crypto/asn1 -I${OPENSSLSRC}/crypto/evp
     34  1.12       spz CPPFLAGS+= -I${OPENSSLSRC}/crypto/modes
     35  1.13  christos CPPFLAGS+= -I${OPENSSLSRC}/../include
     36   1.1  christos 
     37   1.1  christos CRYPTODIST=	${NETBSDSRCDIR}/crypto
     38   1.1  christos 
     39   1.1  christos .include "${NETBSDSRCDIR}/crypto/Makefile.openssl"
     40  1.13  christos .PATH: ${OPENSSLSRC} ${OPENSSLSRC}/include/openssl
     41  1.13  christos .PATH: ${OPENSSLSRC}/../include/openssl ${OPENSSLSRC}/include/internal
     42   1.1  christos 
     43   1.1  christos .include "srcs.inc"
     44   1.1  christos 
     45   1.1  christos AFLAGS+=-DELF
     46   1.1  christos LIBDPLIBS+= crypt ${NETBSDSRCDIR}/lib/libcrypt
     47   1.1  christos 
     48   1.1  christos OS_VERSION!= ${HOST_SH} ${NETBSDSRCDIR}/sys/conf/osrelease.sh
     49   1.1  christos 
     50   1.1  christos # XXX CFLAGS: While it would be nice to know which compiler flags
     51   1.1  christos # XXX the library was built with, we don't want pathname information
     52   1.1  christos # XXX for the host toolchain embedded in the image.
     53   1.1  christos ${SRCS}: buildinf.h
     54   1.1  christos buildinf.h: Makefile
     55   1.1  christos 	@echo "#ifndef MK1MF_BUILD" >buildinf.h
     56   1.5       mrg 	@echo "#define CFLAGS \"`${CC} -v 2>&1 | grep 'gcc version'`\"" >>buildinf.h
     57   1.1  christos 	@echo "#define PLATFORM \"NetBSD-${MACHINE_ARCH}\"" >>buildinf.h
     58   1.1  christos 	@echo "#define DATE \"NetBSD ${OS_VERSION}\"" >>buildinf.h
     59   1.1  christos 	@echo "#endif" >>buildinf.h
     60   1.1  christos 
     61   1.1  christos CLEANFILES+= buildinf.h
     62   1.1  christos 
     63   1.1  christos # This list is built from the contents of the include/openssl
     64   1.1  christos # directory in the OpenSSL source distribution.
     65   1.1  christos INCS+=	aes.h asn1.h asn1_mac.h asn1t.h bio.h blowfish.h bn.h \
     66   1.4       spz 	buffer.h cast.h cmac.h cms.h comp.h conf.h conf_api.h crypto.h des.h \
     67   1.1  christos 	dh.h dsa.h dso.h e_os2.h ebcdic.h ec.h ecdh.h ecdsa.h engine.h \
     68  1.13  christos 	err.h evp.h hmac.h lhash.h kdf.h md2.h md4.h md5.h modes.h \
     69   1.1  christos 	obj_mac.h objects.h ocsp.h opensslconf.h opensslv.h ossl_typ.h \
     70   1.1  christos 	pem.h pem2.h pkcs12.h pkcs7.h rand.h rc2.h rc4.h ripemd.h \
     71  1.13  christos 	rsa.h safestack.h sha.h srp.h stack.h symhacks.h ts.h txt_db.h \
     72  1.13  christos 	ui.h x509.h x509_vfy.h x509v3.h camellia.h \
     73  1.13  christos 	whrlpool.h seed.h ct.h
     74   1.1  christos #	des_old.h 
     75   1.1  christos 
     76   1.1  christos # IDEA - patented, but we install the header anyways
     77   1.1  christos INCS+=	idea.h
     78   1.1  christos 
     79   1.1  christos # RC5 - patented, but we install the header anyways
     80   1.1  christos INCS+=	rc5.h
     81   1.1  christos 
     82   1.1  christos # MDC2 - patented, but we install the header anyways
     83   1.1  christos INCS+=	mdc2.h
     84   1.1  christos 
     85   1.1  christos .if (${USE_FIPS} != "no")
     86   1.1  christos # FIPS
     87   1.1  christos # This part is always included, because OpenSSL does not protect
     88   1.1  christos # The FIPS include files
     89   1.1  christos .PATH: ${OPENSSLSRC}/fips ${OPENSSLSRC}/fips/rand
     90   1.1  christos INCS+=	fips.h fips_rand.h
     91   1.1  christos .endif
     92   1.1  christos 
     93   1.1  christos .if (${USE_FIPS} != "no")
     94   1.1  christos CPPFLAGS+=-DOPENSSL_FIPS
     95   1.1  christos .PATH: ${OPENSSLSRC}/fips/aes
     96   1.1  christos SRCS+=fips_aes_core.c fips_aes_selftest.c
     97   1.1  christos .PATH: ${OPENSSLSRC}/fips/des
     98   1.1  christos SRCS+=fips_des_enc.c fips_des_selftest.c fips_set_key.c
     99   1.1  christos # asm/fips-dx86-elf.s 
    100   1.1  christos .PATH: ${OPENSSLSRC}/fips/dh
    101   1.1  christos SRCS+=fips_dh_check.c fips_dh_gen.c fips_dh_key.c
    102   1.1  christos .PATH: ${OPENSSLSRC}/fips/dsa
    103   1.1  christos SRCS+=fips_dsa_ossl.c fips_dsa_gen.c fips_dsa_selftest.c
    104   1.1  christos #.PATH: ${OPENSSLSRC}/fips/rand
    105   1.1  christos SRCS+=fips_rand.c
    106   1.1  christos .PATH: ${OPENSSLSRC}/fips/rsa
    107   1.1  christos SRCS+=fips_rsa_eay.c fips_rsa_gen.c fips_rsa_selftest.c
    108   1.1  christos SRCS+=fips_sha1dgst.c fips_sha1_selftest.c
    109   1.1  christos # asm/sx86-elf.s
    110   1.1  christos .PATH: ${OPENSSLSRC}/fips/sha1
    111   1.1  christos #.PATH: ${OPENSSLSRC}/fips
    112   1.1  christos SRCS+=fips.c fips_err_wrapper.c
    113   1.1  christos 
    114   1.1  christos SRCS+=rc5_skey.c i_skey.c mdc2dgst.c
    115   1.1  christos .endif
    116   1.1  christos 
    117   1.1  christos COPTS.eng_padlock.c = -Wno-stack-protector
    118   1.1  christos 
    119   1.1  christos INCSDIR=/usr/include/openssl
    120   1.1  christos 
    121   1.7  christos PKGCONFIG=libcrypto
    122   1.7  christos .include "${.CURDIR}/../../pkgconfig.mk"
    123   1.7  christos 
    124   1.1  christos .include <bsd.lib.mk>
    125  1.11  christos # RC5 warning
    126  1.11  christos LDFLAGS+=-Wl,--no-fatal-warnings
    127