re-applied changes to makefile that were SOMEHOW lost

This commit is contained in:
Justin Boswell
2021-08-17 22:56:53 +00:00
parent e4f5b52d6a
commit fb4814c4e1
3 changed files with 3 additions and 30 deletions
+1 -28
View File
@@ -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
+1 -1
View File
@@ -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
View File
@@ -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