home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 15 / AACD15.ISO / AACD / Magazine / HomeAutomation / Apache / lib / php / build / rules_pear.mk < prev    next >
Encoding:
Makefile  |  2000-07-11  |  4.1 KB  |  117 lines

  1. # Copyright (c) 1999, 2000 Sascha Schumann. All rights reserved.
  2. #
  3. # Redistribution and use in source and binary forms, with or without
  4. # modification, are permitted provided that the following conditions
  5. # are met:
  6. # 1. Redistributions of source code must retain the above copyright
  7. #    notice, this list of conditions and the following disclaimer.
  8. # 2. Redistributions in binary form must reproduce the above copyright
  9. #    notice, this list of conditions and the following disclaimer in the
  10. #    documentation and/or other materials provided with the distribution.
  11. # THIS SOFTWARE IS PROVIDED BY SASCHA SCHUMANN ``AS IS'' AND ANY EXPRESS OR
  12. # IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  13. # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO
  14. # EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
  15. # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  16. # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
  17. # OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
  18. # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
  19. # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
  20. # EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  21. #
  22. ##############################################################################
  23. # $Id: rules_pear.mk,v 1.9 2000/06/11 19:53:19 rasmus Exp $ 
  24. #
  25.  
  26. include $(top_builddir)/config_vars.mk
  27.  
  28. COMPILE = $(CC) $(DEFS) $(INCLUDES) $(EXTRA_INCLUDES) $(CPPFLAGS) $(CFLAGS) $(EXTRA_CFLAGS)
  29. LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(EXTRA_INCLUDES) $(CPPFLAGS) $(CFLAGS) $(EXTRA_CFLAGS)
  30. CCLD = $(CC)
  31. LINK = $(LIBTOOL) --mode=link $(CCLD) $(CFLAGS) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@
  32. mkinstalldirs = $(top_srcdir)/build/shtool mkdir -f -p
  33. INSTALL = $(top_srcdir)/build/shtool install -c
  34. INSTALL_DATA = $(INSTALL) -m 644
  35. SHARED_COMPILE = $(SHARED_LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(EXTRA_INCLUDES) $(CPPFLAGS) $(CFLAGS) $(EXTRA_CFLAGS) -c $< && touch $@
  36. DEFS = -DHAVE_CONFIG_H -I. -I$(srcdir) -I$(top_builddir) -I$(top_builddir)/main
  37.  
  38. moduledir    = $(EXTENSION_DIR)
  39.  
  40. .SUFFIXES:
  41. .SUFFIXES: .slo .c .lo .o .s .y .l
  42.  
  43. .c.o:
  44.     $(COMPILE) -c $<
  45.  
  46. .s.o:
  47.     $(COMPILE) -c $<
  48.  
  49. .c.lo:
  50.     $(PHP_COMPILE)
  51.  
  52. .s.lo:
  53.     $(PHP_COMPILE)
  54.  
  55. .c.slo:
  56.     $(SHARED_COMPILE)
  57.  
  58. .y.c:
  59.     $(YACC) $(YFLAGS) $< && mv y.tab.c $*.c
  60.     if test -f y.tab.h; then \
  61.     if cmp -s y.tab.h $*.h; then rm -f y.tab.h; else mv y.tab.h $*.h; fi; \
  62.     else :; fi
  63.  
  64. .l.c:
  65.     $(LEX) $(LFLAGS) $< && mv $(LEX_OUTPUT_ROOT).c $@
  66.  
  67. install_targets = install-modules
  68.  
  69. all: all-recursive
  70. install: install-recursive
  71.  
  72. distclean-recursive depend-recursive clean-recursive all-recursive install-recursive:
  73.     @otarget=`echo $@|sed s/-recursive//`; \
  74.     list='$(SUBDIRS)'; for i in $$list; do \
  75.         target="$$otarget"; \
  76.         echo "Making $$target in $$i"; \
  77.         if test "$$i" = "."; then \
  78.             ok=yes; \
  79.             target="$$target-p"; \
  80.         fi; \
  81.         (cd $$i && $(MAKE) $$target) || exit 1; \
  82.     done; \
  83.     if test "$$otarget" = "all" && test -z '$(targets)'; then ok=yes; fi; \
  84.     if test "$$ok" != "yes"; then $(MAKE) "$$otarget-p" || exit 1; fi
  85.  
  86. all-p: $(targets)
  87. install-p: $(targets) $(install_targets)
  88. distclean-p depend-p clean-p:
  89.  
  90. depend: depend-recursive
  91.     test "`echo *.c`" = '*.c' || perl $(top_srcdir)/build/mkdep.perl $(CPP) $(INCLUDES) $(EXTRA_INCLUDES) *.c > $(builddir)/.deps
  92.  
  93. clean: clean-recursive clean-x
  94.  
  95. clean-x:
  96.     rm -f $(targets) *.lo *.slo *.la *.o $(CLEANFILES)
  97.     rm -rf .libs
  98.  
  99. distclean: distclean-recursive clean-x
  100.     rm -f config.cache config.log config.status config_vars.mk libtool \
  101.     php_config.h stamp-h Makefile build-defs.h php4.spec libphp4.module
  102.  
  103. install-modules:
  104.     @test -d modules && \
  105.     $(mkinstalldirs) $(moduledir) && \
  106.     echo "installing shared modules into $(moduledir)" && \
  107.     rm -f modules/*.la && \
  108.     cp modules/* $(moduledir) || true
  109.  
  110. include $(builddir)/.deps
  111.  
  112. .PHONY: all-recursive clean-recursive install-recursive \
  113. $(install_targets) install all clean depend depend-recursive shared \
  114. distclean-recursive distclean clean-x all-p install-p distclean-p \
  115. depend-p clean-p
  116.