diff options
author | Sascha Schumann <sas@php.net> | 2002-03-07 14:20:02 +0000 |
---|---|---|
committer | Sascha Schumann <sas@php.net> | 2002-03-07 14:20:02 +0000 |
commit | 9d9d39a0de3bec962c343051011f5a2ed7d7b242 (patch) | |
tree | 09eb178e4b55da1d73d059067a5ed96ecb2c6464 /Makefile.global | |
parent | 0e17eea049ba7c77351d2166e89524388922ce80 (diff) | |
download | php-git-9d9d39a0de3bec962c343051011f5a2ed7d7b242.tar.gz |
Please welcome the new build system.
If you encounter any problems, please make sure to email sas@php.net
directly.
An introduction can be found on
http://schumann.cx/buildv5.txt
Diffstat (limited to 'Makefile.global')
-rw-r--r-- | Makefile.global | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/Makefile.global b/Makefile.global new file mode 100644 index 0000000000..3f82f72524 --- /dev/null +++ b/Makefile.global @@ -0,0 +1,71 @@ + +mkinstalldirs = $(top_srcdir)/build/shtool mkdir -p +INSTALL = $(top_srcdir)/build/shtool install -c +INSTALL_DATA = $(INSTALL) -m 644 + +DEFS = -I$(top_builddir)/main -I$(top_srcdir) +COMMON_FLAGS = $(DEFS) $(INCLUDES) $(EXTRA_INCLUDES) $(CPPFLAGS) + + +all: $(all_targets) + +build-modules: $(PHP_MODULES) + +libphp4.la: $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS) + $(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS) $(EXTRA_CFLAGS) -rpath $(phptempdir) $(EXTRA_LDFLAGS) $(LDFLAGS) $(PHP_RPATHS) $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS) $(EXTRA_LIBS) -o $@ + +php: $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS) + $(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(EXTRA_LDFLAGS) $(LDFLAGS) $(PHP_RPATHS) $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS) $(EXTRA_LIBS) -o $@ + +sapi/cli/php: $(PHP_GLOBAL_OBJS) $(PHP_CLI_OBJS) + $(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(EXTRA_LDFLAGS) $(LDFLAGS) $(PHP_RPATHS) $(PHP_GLOBAL_OBJS) $(PHP_CLI_OBJS) $(EXTRA_LIBS) -o $@ + +install: $(install_targets) + + +install-cli: + $(INSTALL_CLI) + +install-sapi: + -@$(LIBTOOL) --silent --mode=install cp libphp4.la $(phptempdir)/libphp4.la >/dev/null 2>&1 + -@$(mkinstalldirs) $(INSTALL_ROOT)$(bindir) + -@if test ! -r $(phptempdir)/libphp4.$(SHLIB_SUFFIX_NAME); then \ + for i in 0.0.0 0.0 0; do \ + if test -r $(phptempdir)/libphp4.$(SHLIB_SUFFIX_NAME).$$i; then \ + $(LN_S) $(phptempdir)/libphp4.$(SHLIB_SUFFIX_NAME).$$i $(phptempdir)/libphp4.$(SHLIB_SUFFIX_NAME); \ + break; \ + fi; \ + done; \ + fi + $(INSTALL_IT) + +install-modules: + @test -d modules && \ + $(mkinstalldirs) $(INSTALL_ROOT)$(EXTENSION_DIR) && \ + echo "installing shared modules into $(EXTENSION_DIR)" && \ + rm -f modules/*.la && \ + cp modules/* $(INSTALL_ROOT)$(EXTENSION_DIR) >/dev/null 2>&1 || true + +install-tester: + @echo "Installing regression tester" + @$(mkinstalldirs) $(PEAR_INSTALLDIR) + @$(INSTALL) -m 755 $(top_srcdir)/run-tests.php $(INSTALL_ROOT)$(PEAR_INSTALLDIR) + +install-su: install-pear install-tester + +test: php + TOP_BUILDDIR=$(top_builddir) TOP_SRCDIR=$(top_srcdir) \ + $(top_builddir)/php -C -q $(top_srcdir)/run-tests.php \ + $(top_srcdir) + +clean: + find . -name \*.lo -o -name \*.o -o -name \*.la -o -name \*.a| xargs rm -f + find . -name .libs -a -type d|xargs rm -rf + rm -f libphp4.la php sapi/cli/php modules/* libs/* + +distclean: clean + rm -f config.cache config.log config.status Makefile.objects Makefile.fragments libtool main/php_config.h stamp-h php4.spec sapi/apache/libphp4.module buildmk.stamp + find . -name Makefile | xargs rm -f + +.PHONY: all clean install distclean test +.NOEXPORT: |