From 10114566c43d8d6a3db1373868443b9ab233ce29 Mon Sep 17 00:00:00 2001 From: jkim Date: Thu, 20 Sep 2018 21:59:47 +0000 Subject: [PATCH] Connect engines to the build. --- secure/lib/libcrypto/engines/Makefile | 7 +++++-- secure/lib/libcrypto/engines/Makefile.inc | 20 ++++++++++++++++--- .../engines/{libcapi => capi}/Makefile | 3 ++- .../lib/libcrypto/engines/lib4758cca/Makefile | 7 ------- .../engines/lib4758cca/Makefile.depend | 18 ----------------- secure/lib/libcrypto/engines/libaep/Makefile | 6 ------ .../libcrypto/engines/libaep/Makefile.depend | 18 ----------------- .../lib/libcrypto/engines/libatalla/Makefile | 6 ------ .../engines/libatalla/Makefile.depend | 18 ----------------- .../libcrypto/engines/libcapi/Makefile.depend | 18 ----------------- secure/lib/libcrypto/engines/libchil/Makefile | 6 ------ .../libcrypto/engines/libchil/Makefile.depend | 18 ----------------- .../lib/libcrypto/engines/libcswift/Makefile | 6 ------ .../engines/libcswift/Makefile.depend | 18 ----------------- secure/lib/libcrypto/engines/libgost/Makefile | 9 --------- .../libcrypto/engines/libgost/Makefile.depend | 18 ----------------- .../lib/libcrypto/engines/libnuron/Makefile | 6 ------ .../engines/libnuron/Makefile.depend | 18 ----------------- .../libcrypto/engines/libsureware/Makefile | 6 ------ .../engines/libsureware/Makefile.depend | 18 ----------------- .../lib/libcrypto/engines/libubsec/Makefile | 6 ------ .../engines/libubsec/Makefile.depend | 18 ----------------- secure/lib/libcrypto/engines/padlock/Makefile | 14 +++++++++++++ 23 files changed, 38 insertions(+), 244 deletions(-) rename secure/lib/libcrypto/engines/{libcapi => capi}/Makefile (68%) delete mode 100644 secure/lib/libcrypto/engines/lib4758cca/Makefile delete mode 100644 secure/lib/libcrypto/engines/lib4758cca/Makefile.depend delete mode 100644 secure/lib/libcrypto/engines/libaep/Makefile delete mode 100644 secure/lib/libcrypto/engines/libaep/Makefile.depend delete mode 100644 secure/lib/libcrypto/engines/libatalla/Makefile delete mode 100644 secure/lib/libcrypto/engines/libatalla/Makefile.depend delete mode 100644 secure/lib/libcrypto/engines/libcapi/Makefile.depend delete mode 100644 secure/lib/libcrypto/engines/libchil/Makefile delete mode 100644 secure/lib/libcrypto/engines/libchil/Makefile.depend delete mode 100644 secure/lib/libcrypto/engines/libcswift/Makefile delete mode 100644 secure/lib/libcrypto/engines/libcswift/Makefile.depend delete mode 100644 secure/lib/libcrypto/engines/libgost/Makefile delete mode 100644 secure/lib/libcrypto/engines/libgost/Makefile.depend delete mode 100644 secure/lib/libcrypto/engines/libnuron/Makefile delete mode 100644 secure/lib/libcrypto/engines/libnuron/Makefile.depend delete mode 100644 secure/lib/libcrypto/engines/libsureware/Makefile delete mode 100644 secure/lib/libcrypto/engines/libsureware/Makefile.depend delete mode 100644 secure/lib/libcrypto/engines/libubsec/Makefile delete mode 100644 secure/lib/libcrypto/engines/libubsec/Makefile.depend create mode 100644 secure/lib/libcrypto/engines/padlock/Makefile diff --git a/secure/lib/libcrypto/engines/Makefile b/secure/lib/libcrypto/engines/Makefile index ccf7c6c0a087..7cd9a8fa02f5 100644 --- a/secure/lib/libcrypto/engines/Makefile +++ b/secure/lib/libcrypto/engines/Makefile @@ -1,6 +1,9 @@ # $FreeBSD$ -#SUBDIR= lib4758cca libaep libatalla libcapi libchil libcswift libgost \ -# libnuron libsureware libubsec +SUBDIR= capi +.if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" +SUBDIR+= padlock +.endif SUBDIR_PARALLEL= + .include diff --git a/secure/lib/libcrypto/engines/Makefile.inc b/secure/lib/libcrypto/engines/Makefile.inc index 06800513668e..fd9e9f9bcc9f 100644 --- a/secure/lib/libcrypto/engines/Makefile.inc +++ b/secure/lib/libcrypto/engines/Makefile.inc @@ -1,6 +1,20 @@ # $FreeBSD$ -LCRYPTO_SRC= ${SRCTOP}/crypto/openssl -.PATH: ${LCRYPTO_SRC}/engines ${LCRYPTO_SRC}/engines/ccgost - SHLIBDIR?= /usr/lib/engines + +LCRYPTO_SRC= ${SRCTOP}/crypto/openssl + +CFLAGS+= -I${LCRYPTO_SRC}/engines +CFLAGS+= -I${LCRYPTO_SRC}/include +CFLAGS+= -I${OBJTOP}/secure/lib/libcrypto + +.include + +.if ${TARGET_ENDIANNESS} == 1234 +CFLAGS+= -DL_ENDIAN +.elif ${TARGET_ENDIANNESS} == 4321 +CFLAGS+= -DB_ENDIAN +.endif +CFLAGS+= -DNDEBUG + +.PATH: ${LCRYPTO_SRC}/engines diff --git a/secure/lib/libcrypto/engines/libcapi/Makefile b/secure/lib/libcrypto/engines/capi/Makefile similarity index 68% rename from secure/lib/libcrypto/engines/libcapi/Makefile rename to secure/lib/libcrypto/engines/capi/Makefile index 48543abfdca1..85b509e7b633 100644 --- a/secure/lib/libcrypto/engines/libcapi/Makefile +++ b/secure/lib/libcrypto/engines/capi/Makefile @@ -1,6 +1,7 @@ # $FreeBSD$ -SHLIB_NAME?= libcapi.so +SHLIB_NAME?= capi.so + SRCS= e_capi.c .include diff --git a/secure/lib/libcrypto/engines/lib4758cca/Makefile b/secure/lib/libcrypto/engines/lib4758cca/Makefile deleted file mode 100644 index 3606c459bfeb..000000000000 --- a/secure/lib/libcrypto/engines/lib4758cca/Makefile +++ /dev/null @@ -1,7 +0,0 @@ -# $FreeBSD$ - -SHLIB_NAME?= lib4758cca.so -SRCS= e_4758cca.c -MAN= - -.include diff --git a/secure/lib/libcrypto/engines/lib4758cca/Makefile.depend b/secure/lib/libcrypto/engines/lib4758cca/Makefile.depend deleted file mode 100644 index cdd96948933d..000000000000 --- a/secure/lib/libcrypto/engines/lib4758cca/Makefile.depend +++ /dev/null @@ -1,18 +0,0 @@ -# $FreeBSD$ -# Autogenerated - do NOT edit! - -DIRDEPS = \ - gnu/lib/csu \ - include \ - include/xlocale \ - lib/${CSU_DIR} \ - lib/libc \ - lib/libcompiler_rt \ - secure/lib/libcrypto \ - - -.include - -.if ${DEP_RELDIR} == ${_DEP_RELDIR} -# local dependencies - needed for -jN in clean tree -.endif diff --git a/secure/lib/libcrypto/engines/libaep/Makefile b/secure/lib/libcrypto/engines/libaep/Makefile deleted file mode 100644 index 66997dffffea..000000000000 --- a/secure/lib/libcrypto/engines/libaep/Makefile +++ /dev/null @@ -1,6 +0,0 @@ -# $FreeBSD$ - -SHLIB_NAME?= libaep.so -SRCS= e_aep.c - -.include diff --git a/secure/lib/libcrypto/engines/libaep/Makefile.depend b/secure/lib/libcrypto/engines/libaep/Makefile.depend deleted file mode 100644 index cdd96948933d..000000000000 --- a/secure/lib/libcrypto/engines/libaep/Makefile.depend +++ /dev/null @@ -1,18 +0,0 @@ -# $FreeBSD$ -# Autogenerated - do NOT edit! - -DIRDEPS = \ - gnu/lib/csu \ - include \ - include/xlocale \ - lib/${CSU_DIR} \ - lib/libc \ - lib/libcompiler_rt \ - secure/lib/libcrypto \ - - -.include - -.if ${DEP_RELDIR} == ${_DEP_RELDIR} -# local dependencies - needed for -jN in clean tree -.endif diff --git a/secure/lib/libcrypto/engines/libatalla/Makefile b/secure/lib/libcrypto/engines/libatalla/Makefile deleted file mode 100644 index 6223dea79d07..000000000000 --- a/secure/lib/libcrypto/engines/libatalla/Makefile +++ /dev/null @@ -1,6 +0,0 @@ -# $FreeBSD$ - -SHLIB_NAME?= libatalla.so -SRCS= e_atalla.c - -.include diff --git a/secure/lib/libcrypto/engines/libatalla/Makefile.depend b/secure/lib/libcrypto/engines/libatalla/Makefile.depend deleted file mode 100644 index cdd96948933d..000000000000 --- a/secure/lib/libcrypto/engines/libatalla/Makefile.depend +++ /dev/null @@ -1,18 +0,0 @@ -# $FreeBSD$ -# Autogenerated - do NOT edit! - -DIRDEPS = \ - gnu/lib/csu \ - include \ - include/xlocale \ - lib/${CSU_DIR} \ - lib/libc \ - lib/libcompiler_rt \ - secure/lib/libcrypto \ - - -.include - -.if ${DEP_RELDIR} == ${_DEP_RELDIR} -# local dependencies - needed for -jN in clean tree -.endif diff --git a/secure/lib/libcrypto/engines/libcapi/Makefile.depend b/secure/lib/libcrypto/engines/libcapi/Makefile.depend deleted file mode 100644 index cdd96948933d..000000000000 --- a/secure/lib/libcrypto/engines/libcapi/Makefile.depend +++ /dev/null @@ -1,18 +0,0 @@ -# $FreeBSD$ -# Autogenerated - do NOT edit! - -DIRDEPS = \ - gnu/lib/csu \ - include \ - include/xlocale \ - lib/${CSU_DIR} \ - lib/libc \ - lib/libcompiler_rt \ - secure/lib/libcrypto \ - - -.include - -.if ${DEP_RELDIR} == ${_DEP_RELDIR} -# local dependencies - needed for -jN in clean tree -.endif diff --git a/secure/lib/libcrypto/engines/libchil/Makefile b/secure/lib/libcrypto/engines/libchil/Makefile deleted file mode 100644 index 14972c9f7763..000000000000 --- a/secure/lib/libcrypto/engines/libchil/Makefile +++ /dev/null @@ -1,6 +0,0 @@ -# $FreeBSD$ - -SHLIB_NAME?= libchil.so -SRCS= e_chil.c - -.include diff --git a/secure/lib/libcrypto/engines/libchil/Makefile.depend b/secure/lib/libcrypto/engines/libchil/Makefile.depend deleted file mode 100644 index cdd96948933d..000000000000 --- a/secure/lib/libcrypto/engines/libchil/Makefile.depend +++ /dev/null @@ -1,18 +0,0 @@ -# $FreeBSD$ -# Autogenerated - do NOT edit! - -DIRDEPS = \ - gnu/lib/csu \ - include \ - include/xlocale \ - lib/${CSU_DIR} \ - lib/libc \ - lib/libcompiler_rt \ - secure/lib/libcrypto \ - - -.include - -.if ${DEP_RELDIR} == ${_DEP_RELDIR} -# local dependencies - needed for -jN in clean tree -.endif diff --git a/secure/lib/libcrypto/engines/libcswift/Makefile b/secure/lib/libcrypto/engines/libcswift/Makefile deleted file mode 100644 index 38b00455cb78..000000000000 --- a/secure/lib/libcrypto/engines/libcswift/Makefile +++ /dev/null @@ -1,6 +0,0 @@ -# $FreeBSD$ - -SHLIB_NAME?= libcswift.so -SRCS= e_cswift.c - -.include diff --git a/secure/lib/libcrypto/engines/libcswift/Makefile.depend b/secure/lib/libcrypto/engines/libcswift/Makefile.depend deleted file mode 100644 index cdd96948933d..000000000000 --- a/secure/lib/libcrypto/engines/libcswift/Makefile.depend +++ /dev/null @@ -1,18 +0,0 @@ -# $FreeBSD$ -# Autogenerated - do NOT edit! - -DIRDEPS = \ - gnu/lib/csu \ - include \ - include/xlocale \ - lib/${CSU_DIR} \ - lib/libc \ - lib/libcompiler_rt \ - secure/lib/libcrypto \ - - -.include - -.if ${DEP_RELDIR} == ${_DEP_RELDIR} -# local dependencies - needed for -jN in clean tree -.endif diff --git a/secure/lib/libcrypto/engines/libgost/Makefile b/secure/lib/libcrypto/engines/libgost/Makefile deleted file mode 100644 index ca1c7164e818..000000000000 --- a/secure/lib/libcrypto/engines/libgost/Makefile +++ /dev/null @@ -1,9 +0,0 @@ -# $FreeBSD$ - -SHLIB_NAME?= libgost.so -SRCS= e_gost_err.c gost2001.c gost2001_keyx.c gost89.c gost94_keyx.c \ - gost_ameth.c gost_asn1.c gost_crypt.c gost_ctl.c gost_eng.c \ - gost_keywrap.c gost_md.c gost_params.c gost_pmeth.c gost_sign.c \ - gosthash.c - -.include diff --git a/secure/lib/libcrypto/engines/libgost/Makefile.depend b/secure/lib/libcrypto/engines/libgost/Makefile.depend deleted file mode 100644 index cdd96948933d..000000000000 --- a/secure/lib/libcrypto/engines/libgost/Makefile.depend +++ /dev/null @@ -1,18 +0,0 @@ -# $FreeBSD$ -# Autogenerated - do NOT edit! - -DIRDEPS = \ - gnu/lib/csu \ - include \ - include/xlocale \ - lib/${CSU_DIR} \ - lib/libc \ - lib/libcompiler_rt \ - secure/lib/libcrypto \ - - -.include - -.if ${DEP_RELDIR} == ${_DEP_RELDIR} -# local dependencies - needed for -jN in clean tree -.endif diff --git a/secure/lib/libcrypto/engines/libnuron/Makefile b/secure/lib/libcrypto/engines/libnuron/Makefile deleted file mode 100644 index 82aab9b3a58b..000000000000 --- a/secure/lib/libcrypto/engines/libnuron/Makefile +++ /dev/null @@ -1,6 +0,0 @@ -# $FreeBSD$ - -SHLIB_NAME?= libnuron.so -SRCS= e_nuron.c - -.include diff --git a/secure/lib/libcrypto/engines/libnuron/Makefile.depend b/secure/lib/libcrypto/engines/libnuron/Makefile.depend deleted file mode 100644 index cdd96948933d..000000000000 --- a/secure/lib/libcrypto/engines/libnuron/Makefile.depend +++ /dev/null @@ -1,18 +0,0 @@ -# $FreeBSD$ -# Autogenerated - do NOT edit! - -DIRDEPS = \ - gnu/lib/csu \ - include \ - include/xlocale \ - lib/${CSU_DIR} \ - lib/libc \ - lib/libcompiler_rt \ - secure/lib/libcrypto \ - - -.include - -.if ${DEP_RELDIR} == ${_DEP_RELDIR} -# local dependencies - needed for -jN in clean tree -.endif diff --git a/secure/lib/libcrypto/engines/libsureware/Makefile b/secure/lib/libcrypto/engines/libsureware/Makefile deleted file mode 100644 index 4d176ee50ca8..000000000000 --- a/secure/lib/libcrypto/engines/libsureware/Makefile +++ /dev/null @@ -1,6 +0,0 @@ -# $FreeBSD$ - -SHLIB_NAME?= libsureware.so -SRCS= e_sureware.c - -.include diff --git a/secure/lib/libcrypto/engines/libsureware/Makefile.depend b/secure/lib/libcrypto/engines/libsureware/Makefile.depend deleted file mode 100644 index cdd96948933d..000000000000 --- a/secure/lib/libcrypto/engines/libsureware/Makefile.depend +++ /dev/null @@ -1,18 +0,0 @@ -# $FreeBSD$ -# Autogenerated - do NOT edit! - -DIRDEPS = \ - gnu/lib/csu \ - include \ - include/xlocale \ - lib/${CSU_DIR} \ - lib/libc \ - lib/libcompiler_rt \ - secure/lib/libcrypto \ - - -.include - -.if ${DEP_RELDIR} == ${_DEP_RELDIR} -# local dependencies - needed for -jN in clean tree -.endif diff --git a/secure/lib/libcrypto/engines/libubsec/Makefile b/secure/lib/libcrypto/engines/libubsec/Makefile deleted file mode 100644 index e02efaba64fc..000000000000 --- a/secure/lib/libcrypto/engines/libubsec/Makefile +++ /dev/null @@ -1,6 +0,0 @@ -# $FreeBSD$ - -SHLIB_NAME?= libubsec.so -SRCS= e_ubsec.c - -.include diff --git a/secure/lib/libcrypto/engines/libubsec/Makefile.depend b/secure/lib/libcrypto/engines/libubsec/Makefile.depend deleted file mode 100644 index cdd96948933d..000000000000 --- a/secure/lib/libcrypto/engines/libubsec/Makefile.depend +++ /dev/null @@ -1,18 +0,0 @@ -# $FreeBSD$ -# Autogenerated - do NOT edit! - -DIRDEPS = \ - gnu/lib/csu \ - include \ - include/xlocale \ - lib/${CSU_DIR} \ - lib/libc \ - lib/libcompiler_rt \ - secure/lib/libcrypto \ - - -.include - -.if ${DEP_RELDIR} == ${_DEP_RELDIR} -# local dependencies - needed for -jN in clean tree -.endif diff --git a/secure/lib/libcrypto/engines/padlock/Makefile b/secure/lib/libcrypto/engines/padlock/Makefile new file mode 100644 index 000000000000..b7b72ac076aa --- /dev/null +++ b/secure/lib/libcrypto/engines/padlock/Makefile @@ -0,0 +1,14 @@ +# $FreeBSD$ + +SHLIB_NAME?= padlock.so + +SRCS= e_padlock.c +.if ${MACHINE_CPUARCH} == "amd64" +SRCS+= e_padlock-x86_64.S +.elif ${MACHINE_CPUARCH} == "i386" +SRCS+= e_padlock-x86.S +.endif + +.include + +.PATH: ${.CURDIR:H:H}/${MACHINE_CPUARCH}