libcrypto: use platform specific mk files

Instead of checking the target platform in the mk file use the common
pattern of providing a mk file for each platform.

Fixes #1236.
This commit is contained in:
Josef Söntgen 2014-08-21 12:47:43 +02:00 committed by Norman Feske
parent 5322714183
commit 1f1b7f7158
4 changed files with 23 additions and 17 deletions

View File

@ -0,0 +1,6 @@
# has to be the first path because it includes openssl/opensslconf.h
INC_DIR += $(REP_DIR)/src/lib/openssl/arm
CC_OPTS += -DL_ENDIAN
include $(REP_DIR)/lib/mk/libcrypto.inc

View File

@ -188,22 +188,6 @@ INC_DIR += $(LIBCRYPTO_DIR)/evp
INC_DIR += $(LIBCRYPTO_DIR)/modes INC_DIR += $(LIBCRYPTO_DIR)/modes
INC_DIR += $(LIBCRYPTO_DIR) INC_DIR += $(LIBCRYPTO_DIR)
INC_DIR += $(LIBCRYPTO_DIR)/../ INC_DIR += $(LIBCRYPTO_DIR)/../
CC_OPTS += -DL_ENDIAN
ifeq ($(filter-out $(SPECS),x86_32),)
TARGET_CPUARCH=x86_32
else ifeq ($(filter-out $(SPECS),x86_64),)
TARGET_CPUARCH=x86_64
SRC_S += modexp512.s
SRC_S += rc4_md5.s
else ifeq ($(filter-out $(SPECS),arm),)
TARGET_CPUARCH=arm
endif
INC_DIR += $(REP_DIR)/src/lib/openssl/$(TARGET_CPUARCH)/
INC_DIR += $(OPENSSL_PORT_DIR)/src/lib/openssl/$(TARGET_CPUARCH)/
INC_DIR += $(OPENSSL_PORT_DIR)/include INC_DIR += $(OPENSSL_PORT_DIR)/include
@ -220,5 +204,4 @@ buildinf.h:
echo " #define PLATFORM \"FreeBSD-$(TARGET_CPUARCH)\""; \ echo " #define PLATFORM \"FreeBSD-$(TARGET_CPUARCH)\""; \
echo "#endif" ) > $@ echo "#endif" ) > $@
vpath %.s $(call select_from_ports,openssl)/src/lib/openssl/$(TARGET_CPUARCH)
vpath %.c $(LIBCRYPTO_DIR) vpath %.c $(LIBCRYPTO_DIR)

View File

@ -0,0 +1,6 @@
# has to be the first path because it includes openssl/opensslconf.h
INC_DIR += $(REP_DIR)/src/lib/openssl/x86_32
CC_OPTS += -DL_ENDIAN
include $(REP_DIR)/lib/mk/libcrypto.inc

View File

@ -0,0 +1,11 @@
# has to be the first path because it includes openssl/opensslconf.h
INC_DIR += $(REP_DIR)/src/lib/openssl/x86_64
CC_OPTS += -DL_ENDIAN
SRC_S += modexp512.s
SRC_S += rc4_md5.s
vpath %.s $(call select_from_ports,openssl)/src/lib/openssl/x86_64
include $(REP_DIR)/lib/mk/libcrypto.inc