Updated aws-crt-ffi to v0.1.0 (#14)

* Updated aws-crt-ffi to v0.1.0

* make/config changes

* Updated aws-crt-ffi to v0.1.1
This commit is contained in:
Justin Boswell
2021-03-03 15:37:32 -08:00
committed by GitHub
parent 5eaaa70cf1
commit 7d76b6f3d9
3 changed files with 5 additions and 22 deletions
+2 -19
View File
@@ -10,30 +10,13 @@ ifeq (, $(shell which cmake3))
CMAKE = cmake
endif
# download and build libcrypto.a for the CRT with -fPIC
$(DEPS_DIR)/openssl:
@echo Fetching libcrypto source
git clone --depth=1 --single-branch --branch OpenSSL_1_1_1-stable https://github.com/openssl/openssl.git $(DEPS_DIR)/openssl
$(INT_DIR)/lib/libcrypto.a: $(DEPS_DIR)/openssl
@echo Building libcrypto
cd $(DEPS_DIR)/openssl && \
./config -fPIC no-md2 no-rc5 no-rfc3779 no-sctp no-ssl-trace no-zlib no-hw no-mdc2 no-seed no-idea \
no-camellia no-bf no-dsa no-ssl3 no-capieng \
-DSSL_FORBID_ENULL -DOPENSSL_NO_DTLS1 -DOPENSSL_NO_HEARTBEATS \
--prefix=$(INT_DIR) --openssldir=$(INT_DIR) && \
make -j && \
make install_sw
mkdir -p $(INT_DIR)/lib
ln -s $(INT_DIR)/lib64/libcrypto.a $(INT_DIR)/lib/libcrypto.a || true
CMAKE_CONFIGURE = $(CMAKE) -DCMAKE_INSTALL_PREFIX=$(INT_DIR) -DCMAKE_PREFIX_PATH=$(INT_DIR) -DBUILD_TESTING=OFF
CMAKE_BUILD = $(CMAKE) --build
CMAKE_BUILD_TYPE ?= RelWithDebInfo
CMAKE_TARGET = --config $(CMAKE_BUILD_TYPE) --target install
# configure for shared aws-crt-ffi.so
$(BUILD_DIR)/aws-crt-ffi-shared/CMakeCache.txt: $(INT_DIR)/lib/libcrypto.a
$(BUILD_DIR)/aws-crt-ffi-shared/CMakeCache.txt:
$(CMAKE_CONFIGURE) -Hcrt/aws-crt-ffi -Bbuild/aws-crt-ffi-shared -DBUILD_SHARED_LIBS=ON
# build shared libaws-crt-ffi.so
@@ -41,7 +24,7 @@ $(BUILD_DIR)/aws-crt-ffi-shared/libaws-crt-ffi.so: $(BUILD_DIR)/aws-crt-ffi-shar
$(CMAKE_BUILD) build/aws-crt-ffi-shared $(CMAKE_TARGET)
# configure for static aws-crt-ffi.a
$(BUILD_DIR)/aws-crt-ffi-static/CMakeCache.txt: $(INT_DIR)/lib/libcrypto.a
$(BUILD_DIR)/aws-crt-ffi-static/CMakeCache.txt:
$(CMAKE_CONFIGURE) -Hcrt/aws-crt-ffi -Bbuild/aws-crt-ffi-static -DBUILD_SHARED_LIBS=OFF
# build static libaws-crt-ffi.a
+2 -2
View File
@@ -8,8 +8,8 @@ PHP_ARG_WITH(awscrt)
if test "$PHP_AWSCRT" != "no"; then
# force lib paths to be absolute, or PHP will mangle them
cwd=`pwd`
CRT_LIBPATHS="-L${cwd}/build/install/lib"
CRT_LIBS="-laws-crt-ffi -laws-c-auth -laws-c-http -laws-c-cal -laws-c-io -laws-c-compression -laws-c-common -ls2n -l:libcrypto.a"
CRT_LIBPATHS="-L${cwd}/build/install/lib -L${cwd}/build/install/lib64"
CRT_LIBS="-laws-crt-ffi -laws-c-auth -laws-c-http -laws-c-io -laws-c-cal -laws-c-compression -laws-c-common -ls2n -l:libcrypto.a"
PHP_ADD_INCLUDE(${cwd}/build/install/include)
PHP_EVAL_LIBLINE([$CRT_LIBPATHS $CRT_LIBS], AWSCRT_SHARED_LIBADD)