mirror of
https://github.com/awslabs/aws-crt-php.git
synced 2026-08-18 01:57:13 +00:00
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:
+2
-19
@@ -10,30 +10,13 @@ ifeq (, $(shell which cmake3))
|
|||||||
CMAKE = cmake
|
CMAKE = cmake
|
||||||
endif
|
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_CONFIGURE = $(CMAKE) -DCMAKE_INSTALL_PREFIX=$(INT_DIR) -DCMAKE_PREFIX_PATH=$(INT_DIR) -DBUILD_TESTING=OFF
|
||||||
CMAKE_BUILD = $(CMAKE) --build
|
CMAKE_BUILD = $(CMAKE) --build
|
||||||
CMAKE_BUILD_TYPE ?= RelWithDebInfo
|
CMAKE_BUILD_TYPE ?= RelWithDebInfo
|
||||||
CMAKE_TARGET = --config $(CMAKE_BUILD_TYPE) --target install
|
CMAKE_TARGET = --config $(CMAKE_BUILD_TYPE) --target install
|
||||||
|
|
||||||
# configure for shared aws-crt-ffi.so
|
# 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
|
$(CMAKE_CONFIGURE) -Hcrt/aws-crt-ffi -Bbuild/aws-crt-ffi-shared -DBUILD_SHARED_LIBS=ON
|
||||||
|
|
||||||
# build shared libaws-crt-ffi.so
|
# 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)
|
$(CMAKE_BUILD) build/aws-crt-ffi-shared $(CMAKE_TARGET)
|
||||||
|
|
||||||
# configure for static aws-crt-ffi.a
|
# 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
|
$(CMAKE_CONFIGURE) -Hcrt/aws-crt-ffi -Bbuild/aws-crt-ffi-static -DBUILD_SHARED_LIBS=OFF
|
||||||
|
|
||||||
# build static libaws-crt-ffi.a
|
# build static libaws-crt-ffi.a
|
||||||
|
|||||||
@@ -8,8 +8,8 @@ PHP_ARG_WITH(awscrt)
|
|||||||
if test "$PHP_AWSCRT" != "no"; then
|
if test "$PHP_AWSCRT" != "no"; then
|
||||||
# force lib paths to be absolute, or PHP will mangle them
|
# force lib paths to be absolute, or PHP will mangle them
|
||||||
cwd=`pwd`
|
cwd=`pwd`
|
||||||
CRT_LIBPATHS="-L${cwd}/build/install/lib"
|
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-cal -laws-c-io -laws-c-compression -laws-c-common -ls2n -l:libcrypto.a"
|
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_ADD_INCLUDE(${cwd}/build/install/include)
|
||||||
PHP_EVAL_LIBLINE([$CRT_LIBPATHS $CRT_LIBS], AWSCRT_SHARED_LIBADD)
|
PHP_EVAL_LIBLINE([$CRT_LIBPATHS $CRT_LIBS], AWSCRT_SHARED_LIBADD)
|
||||||
|
|
||||||
|
|||||||
+1
-1
Submodule crt/aws-crt-ffi updated: 56b60e586b...ea85a85a82
Reference in New Issue
Block a user