You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

76 lines
3.0 KiB

24 years ago
24 years ago
  1. mkinstalldirs = $(top_srcdir)/build/shtool mkdir -p
  2. INSTALL = $(top_srcdir)/build/shtool install -c
  3. INSTALL_DATA = $(INSTALL) -m 644
  4. DEFS = -DPHP_ATOM_INC -I$(top_builddir)/include -I$(top_builddir)/main -I$(top_srcdir)
  5. COMMON_FLAGS = $(DEFS) $(INCLUDES) $(EXTRA_INCLUDES) $(CPPFLAGS) $(PHP_FRAMEWORKPATH)
  6. all: $(all_targets)
  7. @echo
  8. @echo "Build complete."
  9. @echo "(It is safe to ignore warnings about tempnam and tmpnam)."
  10. @echo
  11. build-modules: $(PHP_MODULES)
  12. libphp5.la: $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS)
  13. $(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 $@
  14. -@$(LIBTOOL) --silent --mode=install cp libphp5.la $(phptempdir)/libphp5.la >/dev/null 2>&1
  15. libs/libphp5.bundle: $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS)
  16. $(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/libphp5.so
  17. install: $(all_targets) $(install_targets)
  18. install-sapi: $(OVERALL_TARGET)
  19. @echo "Installing PHP SAPI module: $(PHP_SAPI)"
  20. -@$(mkinstalldirs) $(INSTALL_ROOT)$(bindir)
  21. -@if test ! -r $(phptempdir)/libphp5.$(SHLIB_SUFFIX_NAME); then \
  22. for i in 0.0.0 0.0 0; do \
  23. if test -r $(phptempdir)/libphp5.$(SHLIB_SUFFIX_NAME).$$i; then \
  24. $(LN_S) $(phptempdir)/libphp5.$(SHLIB_SUFFIX_NAME).$$i $(phptempdir)/libphp5.$(SHLIB_SUFFIX_NAME); \
  25. break; \
  26. fi; \
  27. done; \
  28. fi
  29. @$(INSTALL_IT)
  30. install-modules: build-modules
  31. @test -d modules && \
  32. $(mkinstalldirs) $(INSTALL_ROOT)$(EXTENSION_DIR)
  33. @echo "Installing shared extensions: $(INSTALL_ROOT)$(EXTENSION_DIR)/"
  34. @rm -f modules/*.la >/dev/null 2>&1
  35. @$(INSTALL) modules/* $(INSTALL_ROOT)$(EXTENSION_DIR)
  36. install-tester:
  37. @echo "Installing regression tester: $(INSTALL_ROOT)$(PEAR_INSTALLDIR)/"
  38. @$(mkinstalldirs) $(INSTALL_ROOT)$(PEAR_INSTALLDIR)
  39. @$(INSTALL) -m 755 $(top_srcdir)/run-tests.php $(INSTALL_ROOT)$(PEAR_INSTALLDIR)
  40. install-su: install-pear install-tester
  41. test:
  42. -@if test -x $(SAPI_CLI_PATH) && test ! -z $(SAPI_CLI_PATH); then \
  43. TEST_PHP_EXECUTABLE=$(top_builddir)/$(SAPI_CLI_PATH) \
  44. TEST_PHP_SRCDIR=$(top_srcdir) \
  45. CC="$(CC)" \
  46. $(top_builddir)/$(SAPI_CLI_PATH) -d 'open_basedir=' -d 'safe_mode=0' -d 'output_buffering=0' $(top_srcdir)/run-tests.php $(TESTS); \
  47. else \
  48. echo "ERROR: Cannot run tests without CLI sapi."; \
  49. fi
  50. clean:
  51. find . -name \*.lo -o -name \*.o | xargs rm -f
  52. find . -name \*.la -o -name \*.a | xargs rm -f
  53. find . -name \*.so | xargs rm -f
  54. find . -name .libs -a -type d|xargs rm -rf
  55. rm -f libphp5.la $(SAPI_CLI_PATH) $(OVERALL_TARGET) modules/* libs/*
  56. distclean: clean
  57. rm -f config.cache config.log config.status Makefile.objects Makefile.fragments libtool main/php_config.h stamp-h php5.spec sapi/apache/libphp5.module buildmk.stamp
  58. egrep define'.*include/php' configure|sed 's/.*>//'|xargs rm -f
  59. find . -name Makefile | xargs rm -f
  60. .PHONY: all clean install distclean test
  61. .NOEXPORT: