Project

Profile

Help

How to connect?
Download (13.3 KB) Statistics
| Branch: | Tag: | Revision:

he / latest10 / hec / Saxon.C.API / Makefile @ 6304fb8b

1
srcdir = /home/ond1/work/svn/latest9.9-saxonc/Saxon.C.API
2
builddir = /home/ond1/work/svn/latest9.9-saxonc/Saxon.C.API
3
top_srcdir = /home/ond1/work/svn/latest9.9-saxonc/Saxon.C.API
4
top_builddir = /home/ond1/work/svn/latest9.9-saxonc/Saxon.C.API
5
EGREP = /bin/grep -E
6
SED = /bin/sed
7
CONFIGURE_COMMAND = './configure' '--enable-saxon'
8
CONFIGURE_OPTIONS = '--enable-saxon'
9
SHLIB_SUFFIX_NAME = so
10
SHLIB_DL_SUFFIX_NAME = so
11
ZEND_EXT_TYPE = zend_extension
12
RE2C = re2c
13
AWK = nawk
14
SAXON_SHARED_LIBADD = -lstdc++ -ldl
15
shared_objects_saxon = php7_saxon.lo SaxonProcessor.lo XQueryProcessor.lo XsltProcessor.lo Xslt30Processor.lo XPathProcessor.lo SchemaValidator.lo XdmValue.lo XdmItem.lo XdmNode.lo XdmAtomicValue.lo SaxonCGlue.lo SaxonCProcessor.lo SaxonCXPath.lo
16
PHP_PECL_EXTENSION = saxon
17
PHP_MODULES = $(phplibdir)/saxon.la
18
PHP_ZEND_EX =
19
all_targets = $(PHP_MODULES) $(PHP_ZEND_EX)
20
install_targets = install-modules install-headers
21
prefix = /usr
22
exec_prefix = $(prefix)
23
libdir = ${exec_prefix}/lib
24
prefix = /usr
25
phplibdir = /home/ond1/work/svn/latest9.9-saxonc/Saxon.C.API/modules
26
phpincludedir = /usr/include/php/20180731
27
CC = cc
28
CFLAGS = -g -O2
29
CFLAGS_CLEAN = $(CFLAGS)
30
CPP = cc -E
31
CPPFLAGS = -DHAVE_CONFIG_H
32
CXX = g++
33
CXXFLAGS = -g -O2
34
CXXFLAGS_CLEAN = $(CXXFLAGS)
35
EXTENSION_DIR = /usr/lib/php/20180731
36
PHP_EXECUTABLE = /usr/bin/php7.3
37
EXTRA_LDFLAGS =
38
EXTRA_LIBS =
39
INCLUDES = -I/usr/include/php/20180731 -I/usr/include/php/20180731/main -I/usr/include/php/20180731/TSRM -I/usr/include/php/20180731/Zend -I/usr/include/php/20180731/ext -I/usr/include/php/20180731/ext/date/lib -I/home/ond1/work/svn/latest9.9-saxonc/Saxon.C.API/jni
40
LFLAGS =
41
LDFLAGS =
42
SHARED_LIBTOOL =
43
LIBTOOL = $(SHELL) $(top_builddir)/libtool
44
SHELL = /bin/bash
45
INSTALL_HEADERS =
46
mkinstalldirs = $(top_srcdir)/build/shtool mkdir -p
47
INSTALL = $(top_srcdir)/build/shtool install -c
48
INSTALL_DATA = $(INSTALL) -m 644
49

    
50
DEFS = -DPHP_ATOM_INC -I$(top_builddir)/include -I$(top_builddir)/main -I$(top_srcdir)
51
COMMON_FLAGS = $(DEFS) $(INCLUDES) $(EXTRA_INCLUDES) $(CPPFLAGS) $(PHP_FRAMEWORKPATH)
52

    
53
all: $(all_targets)
54
	@echo
55
	@echo "Build complete."
56
	@echo "Don't forget to run 'make test'."
57
	@echo
58

    
59
build-modules: $(PHP_MODULES) $(PHP_ZEND_EX)
60

    
61
build-binaries: $(PHP_BINARIES)
62

    
63
libphp$(PHP_MAJOR_VERSION).la: $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS)
64
	$(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -rpath $(phptempdir) $(EXTRA_LDFLAGS) $(LDFLAGS) $(PHP_RPATHS) $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS) $(EXTRA_LIBS) $(ZEND_EXTRA_LIBS) -o $@
65
	-@$(LIBTOOL) --silent --mode=install cp $@ $(phptempdir)/$@ >/dev/nullptr 2>&1
66

    
67
libs/libphp$(PHP_MAJOR_VERSION).bundle: $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS)
68
	$(CC) $(MH_BUNDLE_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) $(EXTRA_LDFLAGS) $(PHP_GLOBAL_OBJS:.lo=.o) $(PHP_SAPI_OBJS:.lo=.o) $(PHP_FRAMEWORKS) $(EXTRA_LIBS) $(ZEND_EXTRA_LIBS) -o $@ && cp $@ libs/libphp$(PHP_MAJOR_VERSION).so
69

    
70
install: $(all_targets) $(install_targets)
71

    
72
install-sapi: $(OVERALL_TARGET)
73
	@echo "Installing PHP SAPI module:       $(PHP_SAPI)"
74
	-@$(mkinstalldirs) $(INSTALL_ROOT)$(bindir)
75
	-@if test ! -r $(phptempdir)/libphp$(PHP_MAJOR_VERSION).$(SHLIB_DL_SUFFIX_NAME); then \
76
		for i in 0.0.0 0.0 0; do \
77
			if test -r $(phptempdir)/libphp$(PHP_MAJOR_VERSION).$(SHLIB_DL_SUFFIX_NAME).$$i; then \
78
				$(LN_S) $(phptempdir)/libphp$(PHP_MAJOR_VERSION).$(SHLIB_DL_SUFFIX_NAME).$$i $(phptempdir)/libphp$(PHP_MAJOR_VERSION).$(SHLIB_DL_SUFFIX_NAME); \
79
				break; \
80
			fi; \
81
		done; \
82
	fi
83
	@$(INSTALL_IT)
84

    
85
install-binaries: build-binaries $(install_binary_targets)
86

    
87
install-modules: build-modules
88
	@test -d modules && \
89
	$(mkinstalldirs) $(INSTALL_ROOT)$(EXTENSION_DIR)
90
	@echo "Installing shared extensions:     $(INSTALL_ROOT)$(EXTENSION_DIR)/"
91
	@rm -f modules/*.la >/dev/nullptr 2>&1
92
	@$(INSTALL) modules/* $(INSTALL_ROOT)$(EXTENSION_DIR)
93

    
94
install-headers:
95
	-@if test "$(INSTALL_HEADERS)"; then \
96
		for i in `echo $(INSTALL_HEADERS)`; do \
97
			i=`$(top_srcdir)/build/shtool path -d $$i`; \
98
			paths="$$paths $(INSTALL_ROOT)$(phpincludedir)/$$i"; \
99
		done; \
100
		$(mkinstalldirs) $$paths && \
101
		echo "Installing header files:          $(INSTALL_ROOT)$(phpincludedir)/" && \
102
		for i in `echo $(INSTALL_HEADERS)`; do \
103
			if test "$(PHP_PECL_EXTENSION)"; then \
104
				src=`echo $$i | $(SED) -e "s#ext/$(PHP_PECL_EXTENSION)/##g"`; \
105
			else \
106
				src=$$i; \
107
			fi; \
108
			if test -f "$(top_srcdir)/$$src"; then \
109
				$(INSTALL_DATA) $(top_srcdir)/$$src $(INSTALL_ROOT)$(phpincludedir)/$$i; \
110
			elif test -f "$(top_builddir)/$$src"; then \
111
				$(INSTALL_DATA) $(top_builddir)/$$src $(INSTALL_ROOT)$(phpincludedir)/$$i; \
112
			else \
113
				(cd $(top_srcdir)/$$src && $(INSTALL_DATA) *.h $(INSTALL_ROOT)$(phpincludedir)/$$i; \
114
				cd $(top_builddir)/$$src && $(INSTALL_DATA) *.h $(INSTALL_ROOT)$(phpincludedir)/$$i) 2>/dev/nullptr || true; \
115
			fi \
116
		done; \
117
	fi
118

    
119
PHP_TEST_SETTINGS = -d 'open_basedir=' -d 'output_buffering=0' -d 'memory_limit=-1'
120
PHP_TEST_SHARED_EXTENSIONS =  ` \
121
	if test "x$(PHP_MODULES)" != "x"; then \
122
		for i in $(PHP_MODULES)""; do \
123
			. $$i; $(top_srcdir)/build/shtool echo -n -- " -d extension=$$dlname"; \
124
		done; \
125
	fi; \
126
	if test "x$(PHP_ZEND_EX)" != "x"; then \
127
		for i in $(PHP_ZEND_EX)""; do \
128
			. $$i; $(top_srcdir)/build/shtool echo -n -- " -d $(ZEND_EXT_TYPE)=$(top_builddir)/modules/$$dlname"; \
129
		done; \
130
	fi`
131
PHP_DEPRECATED_DIRECTIVES_REGEX = '^(magic_quotes_(gpc|runtime|sybase)?|(zend_)?extension(_debug)?(_ts)?)[\t\ ]*='
132

    
133
test: all
134
	@if test ! -z "$(PHP_EXECUTABLE)" && test -x "$(PHP_EXECUTABLE)"; then \
135
		INI_FILE=`$(PHP_EXECUTABLE) -d 'display_errors=stderr' -r 'echo php_ini_loaded_file();' 2> /dev/nullptr`; \
136
		if test "$$INI_FILE"; then \
137
			$(EGREP) -h -v $(PHP_DEPRECATED_DIRECTIVES_REGEX) "$$INI_FILE" > $(top_builddir)/tmp-php.ini; \
138
		else \
139
			echo > $(top_builddir)/tmp-php.ini; \
140
		fi; \
141
		INI_SCANNED_PATH=`$(PHP_EXECUTABLE) -d 'display_errors=stderr' -r '$$a = explode(",\n", trim(php_ini_scanned_files())); echo $$a[0];' 2> /dev/nullptr`; \
142
		if test "$$INI_SCANNED_PATH"; then \
143
			INI_SCANNED_PATH=`$(top_srcdir)/build/shtool path -d $$INI_SCANNED_PATH`; \
144
			$(EGREP) -h -v $(PHP_DEPRECATED_DIRECTIVES_REGEX) "$$INI_SCANNED_PATH"/*.ini >> $(top_builddir)/tmp-php.ini; \
145
		fi; \
146
		TEST_PHP_EXECUTABLE=$(PHP_EXECUTABLE) \
147
		TEST_PHP_SRCDIR=$(top_srcdir) \
148
		CC="$(CC)" \
149
			$(PHP_EXECUTABLE) -n -c $(top_builddir)/tmp-php.ini $(PHP_TEST_SETTINGS) $(top_srcdir)/run-tests.php -n -c $(top_builddir)/tmp-php.ini -d extension_dir=$(top_builddir)/modules/ $(PHP_TEST_SHARED_EXTENSIONS) $(TESTS); \
150
		TEST_RESULT_EXIT_CODE=$$?; \
151
		rm $(top_builddir)/tmp-php.ini; \
152
		exit $$TEST_RESULT_EXIT_CODE; \
153
	else \
154
		echo "ERROR: Cannot run tests without CLI sapi."; \
155
	fi
156

    
157
clean:
158
	find . -name \*.gcno -o -name \*.gcda | xargs rm -f
159
	find . -name \*.lo -o -name \*.o | xargs rm -f
160
	find . -name \*.la -o -name \*.a | xargs rm -f
161
	find . -name \*.so | xargs rm -f
162
	find . -name .libs -a -type d|xargs rm -rf
163
	rm -f libphp$(PHP_MAJOR_VERSION).la $(SAPI_CLI_PATH) $(SAPI_CGI_PATH) $(SAPI_LITESPEED_PATH) $(SAPI_FPM_PATH) $(OVERALL_TARGET) modules/* libs/*
164

    
165
distclean: clean
166
	rm -f Makefile config.cache config.log config.status Makefile.objects Makefile.fragments libtool main/php_config.h main/internal_functions_cli.c main/internal_functions.c stamp-h buildmk.stamp Zend/zend_dtrace_gen.h Zend/zend_dtrace_gen.h.bak Zend/zend_config.h TSRM/tsrm_config.h
167
	rm -f php7.spec main/build-defs.h scripts/phpize
168
	rm -f ext/date/lib/timelib_config.h ext/mbstring/oniguruma/config.h ext/mbstring/libmbfl/config.h ext/oci8/oci8_dtrace_gen.h ext/oci8/oci8_dtrace_gen.h.bak
169
	rm -f scripts/man1/phpize.1 scripts/php-config scripts/man1/php-config.1 sapi/cli/php.1 sapi/cgi/php-cgi.1 sapi/phpdbg/phpdbg.1 ext/phar/phar.1 ext/phar/phar.phar.1
170
	rm -f sapi/fpm/php-fpm.conf sapi/fpm/init.d.php-fpm sapi/fpm/php-fpm.service sapi/fpm/php-fpm.8 sapi/fpm/status.html
171
	rm -f ext/iconv/php_have_bsd_iconv.h ext/iconv/php_have_glibc_iconv.h ext/iconv/php_have_ibm_iconv.h ext/iconv/php_have_iconv.h ext/iconv/php_have_libiconv.h ext/iconv/php_iconv_aliased_libiconv.h ext/iconv/php_iconv_supports_errno.h ext/iconv/php_php_iconv_h_path.h ext/iconv/php_php_iconv_impl.h
172
	rm -f ext/phar/phar.phar ext/phar/phar.php
173
	if test "$(srcdir)" != "$(builddir)"; then \
174
	  rm -f ext/phar/phar/phar.inc; \
175
	fi
176
	$(EGREP) define'.*include/php' $(top_srcdir)/configure | $(SED) 's/.*>//'|xargs rm -f
177

    
178
prof-gen:
179
	CCACHE_DISABLE=1 $(MAKE) PROF_FLAGS=-fprofile-generate all
180

    
181
prof-clean:
182
	find . -name \*.lo -o -name \*.o | xargs rm -f
183
	find . -name \*.la -o -name \*.a | xargs rm -f
184
	find . -name \*.so | xargs rm -f
185
	rm -f libphp$(PHP_MAJOR_VERSION).la $(SAPI_CLI_PATH) $(SAPI_CGI_PATH) $(SAPI_LITESPEED_PATH) $(SAPI_FPM_PATH) $(OVERALL_TARGET) modules/* libs/*
186

    
187
prof-use:
188
	CCACHE_DISABLE=1 $(MAKE) PROF_FLAGS=-fprofile-use all
189

    
190

    
191
.PHONY: all clean install distclean test prof-gen prof-clean prof-use
192
.NOEXPORT:
193
php7_saxon.lo: /home/ond1/work/svn/latest9.9-saxonc/Saxon.C.API/php7_saxon.cpp
194
	$(LIBTOOL) --mode=compile $(CXX)  -I. -I/home/ond1/work/svn/latest9.9-saxonc/Saxon.C.API $(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)  -c /home/ond1/work/svn/latest9.9-saxonc/Saxon.C.API/php7_saxon.cpp -o php7_saxon.lo 
195
SaxonProcessor.lo: /home/ond1/work/svn/latest9.9-saxonc/Saxon.C.API/SaxonProcessor.cpp
196
	$(LIBTOOL) --mode=compile $(CXX)  -I. -I/home/ond1/work/svn/latest9.9-saxonc/Saxon.C.API $(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)  -c /home/ond1/work/svn/latest9.9-saxonc/Saxon.C.API/SaxonProcessor.cpp -o SaxonProcessor.lo 
197
XQueryProcessor.lo: /home/ond1/work/svn/latest9.9-saxonc/Saxon.C.API/XQueryProcessor.cpp
198
	$(LIBTOOL) --mode=compile $(CXX)  -I. -I/home/ond1/work/svn/latest9.9-saxonc/Saxon.C.API $(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)  -c /home/ond1/work/svn/latest9.9-saxonc/Saxon.C.API/XQueryProcessor.cpp -o XQueryProcessor.lo 
199
XsltProcessor.lo: /home/ond1/work/svn/latest9.9-saxonc/Saxon.C.API/XsltProcessor.cpp
200
	$(LIBTOOL) --mode=compile $(CXX)  -I. -I/home/ond1/work/svn/latest9.9-saxonc/Saxon.C.API $(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)  -c /home/ond1/work/svn/latest9.9-saxonc/Saxon.C.API/XsltProcessor.cpp -o XsltProcessor.lo 
201
Xslt30Processor.lo: /home/ond1/work/svn/latest9.9-saxonc/Saxon.C.API/Xslt30Processor.cpp
202
	$(LIBTOOL) --mode=compile $(CXX)  -I. -I/home/ond1/work/svn/latest9.9-saxonc/Saxon.C.API $(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)  -c /home/ond1/work/svn/latest9.9-saxonc/Saxon.C.API/Xslt30Processor.cpp -o Xslt30Processor.lo 
203
XPathProcessor.lo: /home/ond1/work/svn/latest9.9-saxonc/Saxon.C.API/XPathProcessor.cpp
204
	$(LIBTOOL) --mode=compile $(CXX)  -I. -I/home/ond1/work/svn/latest9.9-saxonc/Saxon.C.API $(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)  -c /home/ond1/work/svn/latest9.9-saxonc/Saxon.C.API/XPathProcessor.cpp -o XPathProcessor.lo 
205
SchemaValidator.lo: /home/ond1/work/svn/latest9.9-saxonc/Saxon.C.API/SchemaValidator.cpp
206
	$(LIBTOOL) --mode=compile $(CXX)  -I. -I/home/ond1/work/svn/latest9.9-saxonc/Saxon.C.API $(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)  -c /home/ond1/work/svn/latest9.9-saxonc/Saxon.C.API/SchemaValidator.cpp -o SchemaValidator.lo 
207
XdmValue.lo: /home/ond1/work/svn/latest9.9-saxonc/Saxon.C.API/XdmValue.cpp
208
	$(LIBTOOL) --mode=compile $(CXX)  -I. -I/home/ond1/work/svn/latest9.9-saxonc/Saxon.C.API $(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)  -c /home/ond1/work/svn/latest9.9-saxonc/Saxon.C.API/XdmValue.cpp -o XdmValue.lo 
209
XdmItem.lo: /home/ond1/work/svn/latest9.9-saxonc/Saxon.C.API/XdmItem.cpp
210
	$(LIBTOOL) --mode=compile $(CXX)  -I. -I/home/ond1/work/svn/latest9.9-saxonc/Saxon.C.API $(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)  -c /home/ond1/work/svn/latest9.9-saxonc/Saxon.C.API/XdmItem.cpp -o XdmItem.lo 
211
XdmNode.lo: /home/ond1/work/svn/latest9.9-saxonc/Saxon.C.API/XdmNode.cpp
212
	$(LIBTOOL) --mode=compile $(CXX)  -I. -I/home/ond1/work/svn/latest9.9-saxonc/Saxon.C.API $(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)  -c /home/ond1/work/svn/latest9.9-saxonc/Saxon.C.API/XdmNode.cpp -o XdmNode.lo 
213
XdmAtomicValue.lo: /home/ond1/work/svn/latest9.9-saxonc/Saxon.C.API/XdmAtomicValue.cpp
214
	$(LIBTOOL) --mode=compile $(CXX)  -I. -I/home/ond1/work/svn/latest9.9-saxonc/Saxon.C.API $(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)  -c /home/ond1/work/svn/latest9.9-saxonc/Saxon.C.API/XdmAtomicValue.cpp -o XdmAtomicValue.lo 
215
SaxonCGlue.lo: /home/ond1/work/svn/latest9.9-saxonc/Saxon.C.API/SaxonCGlue.c
216
	$(LIBTOOL) --mode=compile $(CC)  -I. -I/home/ond1/work/svn/latest9.9-saxonc/Saxon.C.API $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)  -c /home/ond1/work/svn/latest9.9-saxonc/Saxon.C.API/SaxonCGlue.c -o SaxonCGlue.lo 
217
SaxonCProcessor.lo: /home/ond1/work/svn/latest9.9-saxonc/Saxon.C.API/SaxonCProcessor.c
218
	$(LIBTOOL) --mode=compile $(CC)  -I. -I/home/ond1/work/svn/latest9.9-saxonc/Saxon.C.API $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)  -c /home/ond1/work/svn/latest9.9-saxonc/Saxon.C.API/SaxonCProcessor.c -o SaxonCProcessor.lo 
219
SaxonCXPath.lo: /home/ond1/work/svn/latest9.9-saxonc/Saxon.C.API/SaxonCXPath.c
220
	$(LIBTOOL) --mode=compile $(CC)  -I. -I/home/ond1/work/svn/latest9.9-saxonc/Saxon.C.API $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)  -c /home/ond1/work/svn/latest9.9-saxonc/Saxon.C.API/SaxonCXPath.c -o SaxonCXPath.lo 
221
$(phplibdir)/saxon.la: ./saxon.la
222
	$(LIBTOOL) --mode=install cp ./saxon.la $(phplibdir)
223

    
224
./saxon.la: $(shared_objects_saxon) $(SAXON_SHARED_DEPENDENCIES)
225
	$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS)  -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_saxon) $(SAXON_SHARED_LIBADD)
226

    
(3-3/49)