swig.mk: Add -DJW_PHP_MAJOR to swig to allow conditional compilation

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2018-01-03 16:44:34 +00:00
commit cd82a0d1fc

View file

@ -7,7 +7,7 @@ ifeq ($(SWIG_TARGET),php)
PHP_MAJOR := $(shell php-config --version | cut -d. -f1) PHP_MAJOR := $(shell php-config --version | cut -d. -f1)
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) SWIG_OPTS ?= -$(PHP) -DJW_PHP_MAJOR=$(PHP_MAJOR)
SWIG_MODULE_TARGET_DIR = $(ENV_PREFIX)/usr/share/$(PHP) SWIG_MODULE_TARGET_DIR = $(ENV_PREFIX)/usr/share/$(PHP)
#SWIG_PHP_INCLUDE_DIR = /usr/include/$(PHP) #SWIG_PHP_INCLUDE_DIR = /usr/include/$(PHP)