mirror of
https://github.com/awslabs/aws-crt-php.git
synced 2026-08-17 17:47:12 +00:00
re-applied changes to makefile that were SOMEHOW lost
This commit is contained in:
+1
-28
@@ -1,7 +1,6 @@
|
||||
|
||||
INT_DIR=build/install
|
||||
GENERATE_STUBS=$(shell expr `php --version | head -1 | cut -f 2 -d' '` \>= 7.1)
|
||||
HAS_FFI=$(shell php -m | grep FFI | wc -l | xargs)
|
||||
|
||||
CMAKE = cmake3
|
||||
ifeq (, $(shell which cmake3))
|
||||
@@ -48,37 +47,11 @@ ext/api.h : src/api.h
|
||||
|
||||
ext/php_aws_crt.h: ext/awscrt_arginfo.h ext/api.h
|
||||
|
||||
# FFI target
|
||||
ffi: src/api.h src/libaws-crt-ffi.$(SHLIB_SUFFIX_NAME)
|
||||
|
||||
# configure for shared aws-crt-ffi.so
|
||||
build/aws-crt-ffi-shared/CMakeCache.txt:
|
||||
ifeq ($(HAS_FFI),1)
|
||||
$(CMAKE_CONFIGURE) -Hcrt/aws-crt-ffi -Bbuild/aws-crt-ffi-shared -DBUILD_SHARED_LIBS=ON
|
||||
endif
|
||||
|
||||
# build shared libaws-crt-ffi.so
|
||||
build/aws-crt-ffi-shared/libaws-crt-ffi.$(SHLIB_SUFFIX_NAME): build/aws-crt-ffi-shared/CMakeCache.txt
|
||||
ifeq ($(HAS_FFI),1)
|
||||
$(CMAKE_BUILD) build/aws-crt-ffi-shared $(CMAKE_TARGET)
|
||||
endif
|
||||
|
||||
# copy the lib into the src folder
|
||||
src/libaws-crt-ffi.$(SHLIB_SUFFIX_NAME): build/aws-crt-ffi-shared/libaws-crt-ffi.$(SHLIB_SUFFIX_NAME) src/api.h
|
||||
ifeq ($(HAS_FFI),1)
|
||||
cp -v build/aws-crt-ffi-shared/libaws-crt-ffi.$(SHLIB_SUFFIX_NAME) src/libaws-crt-ffi.$(SHLIB_SUFFIX_NAME)
|
||||
endif
|
||||
|
||||
vendor/bin/phpunit:
|
||||
composer update
|
||||
|
||||
test-ffi: vendor/bin/phpunit ffi
|
||||
ifeq ($(HAS_FFI),1)
|
||||
AWS_CRT_PHP_FFI=1 composer run test-ffi
|
||||
endif
|
||||
|
||||
test-extension: vendor/bin/phpunit extension
|
||||
AWS_CRT_PHP_EXTENSION=1 composer run test-extension
|
||||
|
||||
# Use PHPUnit to run tests
|
||||
test: test-ffi test-extension
|
||||
test: test-extension
|
||||
|
||||
@@ -2,4 +2,4 @@
|
||||
|
||||
set -ex
|
||||
|
||||
$PHP_BINARY -c php.ini vendor/bin/phpunit tests
|
||||
$PHP_BINARY -c php.ini vendor/bin/phpunit tests --debug
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
|
||||
@echo on
|
||||
|
||||
%PHP_BINARY% -c php-win.ini vendor/bin/phpunit tests
|
||||
%PHP_BINARY% -c php-win.ini vendor/bin/phpunit tests --debug
|
||||
|
||||
Reference in New Issue
Block a user