-
Notifications
You must be signed in to change notification settings - Fork 161
/
Copy pathMakefile
193 lines (177 loc) · 13.3 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
srcdir = /root/.netbeans/remote/192.168.20.131/localhost-MacOSX-x86_64/Users/guoxinhua/Documents/connect_pool
builddir = /root/.netbeans/remote/192.168.20.131/localhost-MacOSX-x86_64/Users/guoxinhua/Documents/connect_pool
top_srcdir = /root/.netbeans/remote/192.168.20.131/localhost-MacOSX-x86_64/Users/guoxinhua/Documents/connect_pool
top_builddir = /root/.netbeans/remote/192.168.20.131/localhost-MacOSX-x86_64/Users/guoxinhua/Documents/connect_pool
EGREP = /bin/grep -E
SED = /bin/sed
CONFIGURE_COMMAND = './configure' '--with-php-config=/xinhua/bin/php-config'
CONFIGURE_OPTIONS = '--with-php-config=/xinhua/bin/php-config'
SHLIB_SUFFIX_NAME = so
SHLIB_DL_SUFFIX_NAME = so
ZEND_EXT_TYPE = zend_extension
RE2C = re2c
AWK = gawk
shared_objects_connect_pool = connect_pool.lo Server.lo Worker.lo connect_pool_client.lo cpFunction.lo cpMemory.lo NetWork.lo ClientNet.lo msgpack/msgpack.lo msgpack/msgpack_pack.lo msgpack/msgpack_unpack.lo msgpack/msgpack_convert.lo
PHP_PECL_EXTENSION = connect_pool
PHP_MODULES = $(phplibdir)/connect_pool.la
PHP_ZEND_EX =
all_targets = $(PHP_MODULES) $(PHP_ZEND_EX)
install_targets = install-modules install-headers
prefix = /xinhua
exec_prefix = $(prefix)
libdir = ${exec_prefix}/lib
prefix = /xinhua
phplibdir = /root/.netbeans/remote/192.168.20.131/localhost-MacOSX-x86_64/Users/guoxinhua/Documents/connect_pool/modules
phpincludedir = /xinhua/include/php
CC = cc
CFLAGS = -g
CFLAGS_CLEAN = $(CFLAGS)
CPP = cc -E
CPPFLAGS = -DHAVE_CONFIG_H
CXX =
CXXFLAGS =
CXXFLAGS_CLEAN = $(CXXFLAGS)
EXTENSION_DIR = /xinhua/lib/php/extensions/no-debug-non-zts-20090626
PHP_EXECUTABLE = /xinhua/bin/php
EXTRA_LDFLAGS =
EXTRA_LIBS =
INCLUDES = -I/xinhua/include/php -I/xinhua/include/php/main -I/xinhua/include/php/TSRM -I/xinhua/include/php/Zend -I/xinhua/include/php/ext -I/xinhua/include/php/ext/date/lib -I/root/.netbeans/remote/192.168.20.131/localhost-MacOSX-x86_64/Users/guoxinhua/Documents/connect_pool/include
LFLAGS =
LDFLAGS =
SHARED_LIBTOOL =
LIBTOOL = $(SHELL) $(top_builddir)/libtool
SHELL = /bin/bash
INSTALL_HEADERS =
mkinstalldirs = $(top_srcdir)/build/shtool mkdir -p
INSTALL = $(top_srcdir)/build/shtool install -c
INSTALL_DATA = $(INSTALL) -m 644
DEFS = -DPHP_ATOM_INC -I$(top_builddir)/include -I$(top_builddir)/main -I$(top_srcdir)
COMMON_FLAGS = $(DEFS) $(INCLUDES) $(EXTRA_INCLUDES) $(CPPFLAGS) $(PHP_FRAMEWORKPATH)
all: $(all_targets)
@echo
@echo "Build complete."
@echo "Don't forget to run 'make test'."
@echo
build-modules: $(PHP_MODULES) $(PHP_ZEND_EX)
libphp$(PHP_MAJOR_VERSION).la: $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS)
$(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 $@
-@$(LIBTOOL) --silent --mode=install cp $@ $(phptempdir)/$@ >/dev/null 2>&1
libs/libphp$(PHP_MAJOR_VERSION).bundle: $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS)
$(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
install: $(all_targets) $(install_targets)
install-sapi: $(OVERALL_TARGET)
@echo "Installing PHP SAPI module: $(PHP_SAPI)"
-@$(mkinstalldirs) $(INSTALL_ROOT)$(bindir)
-@if test ! -r $(phptempdir)/libphp$(PHP_MAJOR_VERSION).$(SHLIB_DL_SUFFIX_NAME); then \
for i in 0.0.0 0.0 0; do \
if test -r $(phptempdir)/libphp$(PHP_MAJOR_VERSION).$(SHLIB_DL_SUFFIX_NAME).$$i; then \
$(LN_S) $(phptempdir)/libphp$(PHP_MAJOR_VERSION).$(SHLIB_DL_SUFFIX_NAME).$$i $(phptempdir)/libphp$(PHP_MAJOR_VERSION).$(SHLIB_DL_SUFFIX_NAME); \
break; \
fi; \
done; \
fi
@$(INSTALL_IT)
install-modules: build-modules
@test -d modules && \
$(mkinstalldirs) $(INSTALL_ROOT)$(EXTENSION_DIR)
@echo "Installing shared extensions: $(INSTALL_ROOT)$(EXTENSION_DIR)/"
@rm -f modules/*.la >/dev/null 2>&1
@$(INSTALL) modules/* $(INSTALL_ROOT)$(EXTENSION_DIR)
install-headers:
-@if test "$(INSTALL_HEADERS)"; then \
for i in `echo $(INSTALL_HEADERS)`; do \
i=`$(top_srcdir)/build/shtool path -d $$i`; \
paths="$$paths $(INSTALL_ROOT)$(phpincludedir)/$$i"; \
done; \
$(mkinstalldirs) $$paths && \
echo "Installing header files: $(INSTALL_ROOT)$(phpincludedir)/" && \
for i in `echo $(INSTALL_HEADERS)`; do \
if test "$(PHP_PECL_EXTENSION)"; then \
src=`echo $$i | $(SED) -e "s#ext/$(PHP_PECL_EXTENSION)/##g"`; \
else \
src=$$i; \
fi; \
if test -f "$(top_srcdir)/$$src"; then \
$(INSTALL_DATA) $(top_srcdir)/$$src $(INSTALL_ROOT)$(phpincludedir)/$$i; \
elif test -f "$(top_builddir)/$$src"; then \
$(INSTALL_DATA) $(top_builddir)/$$src $(INSTALL_ROOT)$(phpincludedir)/$$i; \
else \
(cd $(top_srcdir)/$$src && $(INSTALL_DATA) *.h $(INSTALL_ROOT)$(phpincludedir)/$$i; \
cd $(top_builddir)/$$src && $(INSTALL_DATA) *.h $(INSTALL_ROOT)$(phpincludedir)/$$i) 2>/dev/null || true; \
fi \
done; \
fi
PHP_TEST_SETTINGS = -d 'open_basedir=' -d 'output_buffering=0' -d 'memory_limit=-1'
PHP_TEST_SHARED_EXTENSIONS = ` \
if test "x$(PHP_MODULES)" != "x"; then \
for i in $(PHP_MODULES)""; do \
. $$i; $(top_srcdir)/build/shtool echo -n -- " -d extension=$$dlname"; \
done; \
fi; \
if test "x$(PHP_ZEND_EX)" != "x"; then \
for i in $(PHP_ZEND_EX)""; do \
. $$i; $(top_srcdir)/build/shtool echo -n -- " -d $(ZEND_EXT_TYPE)=$(top_builddir)/modules/$$dlname"; \
done; \
fi`
PHP_DEPRECATED_DIRECTIVES_REGEX = '^(define_syslog_variables|register_(globals|long_arrays)?|safe_mode|magic_quotes_(gpc|runtime|sybase)?|(zend_)?extension(_debug)?(_ts)?)[\t\ ]*='
test: all
-@if test ! -z "$(PHP_EXECUTABLE)" && test -x "$(PHP_EXECUTABLE)"; then \
INI_FILE=`$(PHP_EXECUTABLE) -d 'display_errors=stderr' -r 'echo php_ini_loaded_file();' 2> /dev/null`; \
if test "$$INI_FILE"; then \
$(EGREP) -h -v $(PHP_DEPRECATED_DIRECTIVES_REGEX) "$$INI_FILE" > $(top_builddir)/tmp-php.ini; \
else \
echo > $(top_builddir)/tmp-php.ini; \
fi; \
INI_SCANNED_PATH=`$(PHP_EXECUTABLE) -d 'display_errors=stderr' -r '$$a = explode(",\n", trim(php_ini_scanned_files())); echo $$a[0];' 2> /dev/null`; \
if test "$$INI_SCANNED_PATH"; then \
INI_SCANNED_PATH=`$(top_srcdir)/build/shtool path -d $$INI_SCANNED_PATH`; \
$(EGREP) -h -v $(PHP_DEPRECATED_DIRECTIVES_REGEX) "$$INI_SCANNED_PATH"/*.ini >> $(top_builddir)/tmp-php.ini; \
fi; \
TEST_PHP_EXECUTABLE=$(PHP_EXECUTABLE) \
TEST_PHP_SRCDIR=$(top_srcdir) \
CC="$(CC)" \
$(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); \
rm $(top_builddir)/tmp-php.ini; \
else \
echo "ERROR: Cannot run tests without CLI sapi."; \
fi
clean:
find . -name \*.gcno -o -name \*.gcda | xargs rm -f
find . -name \*.lo -o -name \*.o | xargs rm -f
find . -name \*.la -o -name \*.a | xargs rm -f
find . -name \*.so | xargs rm -f
find . -name .libs -a -type d|xargs rm -rf
rm -f libphp$(PHP_MAJOR_VERSION).la $(SAPI_CLI_PATH) $(OVERALL_TARGET) modules/* libs/*
distclean: clean
rm -f Makefile config.cache config.log config.status Makefile.objects Makefile.fragments libtool main/php_config.h stamp-h sapi/apache/libphp$(PHP_MAJOR_VERSION).module buildmk.stamp
$(EGREP) define'.*include/php' $(top_srcdir)/configure | $(SED) 's/.*>//'|xargs rm -f
.PHONY: all clean install distclean test
.NOEXPORT:
connect_pool.lo: /root/.netbeans/remote/192.168.20.131/localhost-MacOSX-x86_64/Users/guoxinhua/Documents/connect_pool/connect_pool.c
$(LIBTOOL) --mode=compile $(CC) -I. -I/root/.netbeans/remote/192.168.20.131/localhost-MacOSX-x86_64/Users/guoxinhua/Documents/connect_pool $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) -c /root/.netbeans/remote/192.168.20.131/localhost-MacOSX-x86_64/Users/guoxinhua/Documents/connect_pool/connect_pool.c -o connect_pool.lo
Server.lo: /root/.netbeans/remote/192.168.20.131/localhost-MacOSX-x86_64/Users/guoxinhua/Documents/connect_pool/Server.c
$(LIBTOOL) --mode=compile $(CC) -I. -I/root/.netbeans/remote/192.168.20.131/localhost-MacOSX-x86_64/Users/guoxinhua/Documents/connect_pool $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) -c /root/.netbeans/remote/192.168.20.131/localhost-MacOSX-x86_64/Users/guoxinhua/Documents/connect_pool/Server.c -o Server.lo
Worker.lo: /root/.netbeans/remote/192.168.20.131/localhost-MacOSX-x86_64/Users/guoxinhua/Documents/connect_pool/Worker.c
$(LIBTOOL) --mode=compile $(CC) -I. -I/root/.netbeans/remote/192.168.20.131/localhost-MacOSX-x86_64/Users/guoxinhua/Documents/connect_pool $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) -c /root/.netbeans/remote/192.168.20.131/localhost-MacOSX-x86_64/Users/guoxinhua/Documents/connect_pool/Worker.c -o Worker.lo
connect_pool_client.lo: /root/.netbeans/remote/192.168.20.131/localhost-MacOSX-x86_64/Users/guoxinhua/Documents/connect_pool/connect_pool_client.c
$(LIBTOOL) --mode=compile $(CC) -I. -I/root/.netbeans/remote/192.168.20.131/localhost-MacOSX-x86_64/Users/guoxinhua/Documents/connect_pool $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) -c /root/.netbeans/remote/192.168.20.131/localhost-MacOSX-x86_64/Users/guoxinhua/Documents/connect_pool/connect_pool_client.c -o connect_pool_client.lo
cpFunction.lo: /root/.netbeans/remote/192.168.20.131/localhost-MacOSX-x86_64/Users/guoxinhua/Documents/connect_pool/cpFunction.c
$(LIBTOOL) --mode=compile $(CC) -I. -I/root/.netbeans/remote/192.168.20.131/localhost-MacOSX-x86_64/Users/guoxinhua/Documents/connect_pool $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) -c /root/.netbeans/remote/192.168.20.131/localhost-MacOSX-x86_64/Users/guoxinhua/Documents/connect_pool/cpFunction.c -o cpFunction.lo
cpMemory.lo: /root/.netbeans/remote/192.168.20.131/localhost-MacOSX-x86_64/Users/guoxinhua/Documents/connect_pool/cpMemory.c
$(LIBTOOL) --mode=compile $(CC) -I. -I/root/.netbeans/remote/192.168.20.131/localhost-MacOSX-x86_64/Users/guoxinhua/Documents/connect_pool $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) -c /root/.netbeans/remote/192.168.20.131/localhost-MacOSX-x86_64/Users/guoxinhua/Documents/connect_pool/cpMemory.c -o cpMemory.lo
NetWork.lo: /root/.netbeans/remote/192.168.20.131/localhost-MacOSX-x86_64/Users/guoxinhua/Documents/connect_pool/NetWork.c
$(LIBTOOL) --mode=compile $(CC) -I. -I/root/.netbeans/remote/192.168.20.131/localhost-MacOSX-x86_64/Users/guoxinhua/Documents/connect_pool $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) -c /root/.netbeans/remote/192.168.20.131/localhost-MacOSX-x86_64/Users/guoxinhua/Documents/connect_pool/NetWork.c -o NetWork.lo
ClientNet.lo: /root/.netbeans/remote/192.168.20.131/localhost-MacOSX-x86_64/Users/guoxinhua/Documents/connect_pool/ClientNet.c
$(LIBTOOL) --mode=compile $(CC) -I. -I/root/.netbeans/remote/192.168.20.131/localhost-MacOSX-x86_64/Users/guoxinhua/Documents/connect_pool $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) -c /root/.netbeans/remote/192.168.20.131/localhost-MacOSX-x86_64/Users/guoxinhua/Documents/connect_pool/ClientNet.c -o ClientNet.lo
msgpack/msgpack.lo: /root/.netbeans/remote/192.168.20.131/localhost-MacOSX-x86_64/Users/guoxinhua/Documents/connect_pool/msgpack/msgpack.c
$(LIBTOOL) --mode=compile $(CC) -I. -I/root/.netbeans/remote/192.168.20.131/localhost-MacOSX-x86_64/Users/guoxinhua/Documents/connect_pool $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) -c /root/.netbeans/remote/192.168.20.131/localhost-MacOSX-x86_64/Users/guoxinhua/Documents/connect_pool/msgpack/msgpack.c -o msgpack/msgpack.lo
msgpack/msgpack_pack.lo: /root/.netbeans/remote/192.168.20.131/localhost-MacOSX-x86_64/Users/guoxinhua/Documents/connect_pool/msgpack/msgpack_pack.c
$(LIBTOOL) --mode=compile $(CC) -I. -I/root/.netbeans/remote/192.168.20.131/localhost-MacOSX-x86_64/Users/guoxinhua/Documents/connect_pool $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) -c /root/.netbeans/remote/192.168.20.131/localhost-MacOSX-x86_64/Users/guoxinhua/Documents/connect_pool/msgpack/msgpack_pack.c -o msgpack/msgpack_pack.lo
msgpack/msgpack_unpack.lo: /root/.netbeans/remote/192.168.20.131/localhost-MacOSX-x86_64/Users/guoxinhua/Documents/connect_pool/msgpack/msgpack_unpack.c
$(LIBTOOL) --mode=compile $(CC) -I. -I/root/.netbeans/remote/192.168.20.131/localhost-MacOSX-x86_64/Users/guoxinhua/Documents/connect_pool $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) -c /root/.netbeans/remote/192.168.20.131/localhost-MacOSX-x86_64/Users/guoxinhua/Documents/connect_pool/msgpack/msgpack_unpack.c -o msgpack/msgpack_unpack.lo
msgpack/msgpack_convert.lo: /root/.netbeans/remote/192.168.20.131/localhost-MacOSX-x86_64/Users/guoxinhua/Documents/connect_pool/msgpack/msgpack_convert.c
$(LIBTOOL) --mode=compile $(CC) -I. -I/root/.netbeans/remote/192.168.20.131/localhost-MacOSX-x86_64/Users/guoxinhua/Documents/connect_pool $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) -c /root/.netbeans/remote/192.168.20.131/localhost-MacOSX-x86_64/Users/guoxinhua/Documents/connect_pool/msgpack/msgpack_convert.c -o msgpack/msgpack_convert.lo
$(phplibdir)/connect_pool.la: ./connect_pool.la
$(LIBTOOL) --mode=install cp ./connect_pool.la $(phplibdir)
./connect_pool.la: $(shared_objects_connect_pool) $(CONNECT_POOL_SHARED_DEPENDENCIES)
$(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_connect_pool) $(CONNECT_POOL_SHARED_LIBADD)