swig.mk: Using PHP5 on ubuntu, since swig doesn't support the -php7 switch

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2018-01-04 15:08:42 +00:00
commit 59d3414550

View file

@ -4,7 +4,11 @@ ifeq ($(SWIG_TARGET),php)
SWIG_LANG ?= php SWIG_LANG ?= php
SWIG_TARGET_EXT ?= php SWIG_TARGET_EXT ?= php
PHP_MAJOR := $(shell php-config --version | cut -d. -f1) ifeq ($(OS_NAME),ubuntu)
PHP_MAJOR ?= 5
else
PHP_MAJOR ?= $(shell php-config --version | cut -d. -f1)
endif
PHP ?= php$(PHP_MAJOR) PHP ?= php$(PHP_MAJOR)
#PHP ?= $(firstword $(notdir $(wildcard /usr/share/php*))) #PHP ?= $(firstword $(notdir $(wildcard /usr/share/php*)))
SWIG_OPTS ?= -$(PHP) -DJW_PHP_MAJOR=$(PHP_MAJOR) SWIG_OPTS ?= -$(PHP) -DJW_PHP_MAJOR=$(PHP_MAJOR)