home *** CD-ROM | disk | FTP | other *** search
/ PC Online 1999 April / PCO0499.ISO / filesbbs / os2 / apach134.arj / APACH134.ZIP / src / Makefile < prev    next >
Encoding:
Makefile  |  1999-01-10  |  5.2 KB  |  170 lines

  1. ##
  2. ##  Apache Makefile, automatically generated by Configure script.
  3. ##  Hand-edited changes will be lost if the Configure script is re-run.
  4. ##  Sources: - ./Makefile.config (via Configuration)
  5. ##           - ./Makefile.tmpl
  6. ##
  7.  
  8. MODULES= \
  9.   modules/standard/libstandard.a
  10.  
  11. SUBDIRS=regex os/os2 ap main modules
  12. SUBTARGET=target_static
  13. SHLIB_SUFFIX_NAME=
  14. SHLIB_SUFFIX_LIST=
  15.  
  16. ##
  17. ##  Inherited Makefile options from Configure script
  18. ##  (Begin of automatically generated section)
  19. ##
  20. SRCDIR=.
  21. EXTRA_CFLAGS=
  22. EXTRA_LDFLAGS=-s
  23. EXTRA_LIBS=
  24. EXTRA_INCLUDES=
  25. EXTRA_DEPS=
  26. OPTIM=-O2
  27. OSDIR=$(SRCDIR)/os/os2
  28. INCDIR=$(SRCDIR)/include
  29. INCLUDES0=-I$(OSDIR) -I$(INCDIR)
  30. SHELL=sh
  31. CC=gcc
  32. CPP=gcc -E
  33. TARGET=httpd
  34. CFLAGS1= -DOS2 -Zbsd-signals -Zbin-files -DTCPIPV4 -g -DUSE_HSREGEX
  35. INCLUDES1=
  36. LIBS_SHLIB=
  37. LDFLAGS1= -Zexe
  38. MFLAGS_STATIC=--no-print-directory
  39. REGLIB=regex/libregex.a
  40. RANLIB=true
  41. LIBS1= -lsocket -lufc -lbsd
  42. ##
  43. ##  (End of automatically generated section)
  44. ##
  45.  
  46.  
  47. CFLAGS=$(OPTIM) $(CFLAGS1) $(EXTRA_CFLAGS)
  48. LIBS=$(EXTRA_LIBS) $(LIBS1)
  49. INCLUDES=$(INCLUDES1) $(INCLUDES0) $(EXTRA_INCLUDES)
  50. LDFLAGS=$(LDFLAGS1) $(EXTRA_LDFLAGS)
  51.  
  52. OBJS= \
  53.   modules.o \
  54.   $(MODULES) \
  55.   main/libmain.a \
  56.   $(OSDIR)/libos.a \
  57.   ap/libap.a
  58.  
  59. .c.o:
  60.     $(CC) -c $(INCLUDES) $(CFLAGS) $<
  61.  
  62. all: Configuration $(TARGET)
  63.  
  64. Configuration: Configuration.tmpl
  65.     @echo "++ File 'Configuration' older than 'Configuration.tmpl',"
  66.     @echo "++ or still doesn't exist. Please consider copying 'Configuration.tmpl'"
  67.     @echo "++ to 'Configuration', editing and rerunning 'Configure'."
  68.     @echo "++ If not, you will at least have to touch 'Configuration'."
  69.     @false
  70.  
  71. $(TARGET): $(EXTRA_DEPS) $(SUBTARGET)
  72.  
  73. target_static: subdirs modules.o
  74.     $(CC) -c $(INCLUDES) $(CFLAGS) buildmark.c
  75.     $(CC) $(CFLAGS) $(LDFLAGS) $(LDFLAGS_SHLIB_EXPORT) \
  76.           -o $(TARGET) buildmark.o $(OBJS) $(REGLIB) $(LIBS)
  77.  
  78. target_compile_only: subdirs modules.o
  79.     $(CC) -c $(INCLUDES) $(CFLAGS) buildmark.c
  80.  
  81. target_shared: lib$(TARGET).ep
  82.     $(CC) $(INCLUDES) $(CFLAGS) $(LDFLAGS) $(LDFLAGS_SHLIB_EXPORT) \
  83.           -o $(TARGET) -DSHARED_CORE_BOOTSTRAP main/http_main.c
  84.  
  85. lib$(TARGET).ep: lib$(TARGET).$(SHLIB_SUFFIX_NAME)
  86.     $(CC) $(INCLUDES) $(CFLAGS) $(LDFLAGS) $(LDFLAGS_SHLIB_EXPORT) \
  87.           -o lib$(TARGET).ep -DSHARED_CORE_TIESTATIC main/http_main.c \
  88.           -L. -l$(TARGET) $(LIBS)
  89.  
  90. lib$(TARGET).$(SHLIB_SUFFIX_NAME): subdirs modules.o
  91.     $(CC) -c $(INCLUDES) $(CFLAGS) buildmark.c
  92.     $(LD_SHLIB) $(LDFLAGS_SHLIB) -o lib$(TARGET).$(SHLIB_SUFFIX_NAME) buildmark.o $(OBJS) $(REGLIB)
  93.     @if [ ".$(SHLIB_SUFFIX_LIST)" != . ]; then \
  94.         rm -f lib$(TARGET).$(SHLIB_SUFFIX_NAME).*; \
  95.         for suffix in $(SHLIB_SUFFIX_LIST) ""; do \
  96.             [ ".$$suffix" = . ] && continue; \
  97.             echo "ln lib$(TARGET).$(SHLIB_SUFFIX_NAME) lib$(TARGET).$(SHLIB_SUFFIX_NAME).$$suffix"; \
  98.             ln lib$(TARGET).$(SHLIB_SUFFIX_NAME) lib$(TARGET).$(SHLIB_SUFFIX_NAME).$$suffix; \
  99.         done; \
  100.     fi
  101.  
  102. subdirs:
  103.     @for i in $(SUBDIRS); do \
  104.         echo "===> $(SDP)$$i"; \
  105.         ( cd $$i && $(MAKE) $(MFLAGS_STATIC) SDP='$(SDP)' CC='$(CC)' AUX_CFLAGS='$(CFLAGS)' RANLIB='$(RANLIB)') || exit 1; \
  106.         echo "<=== $(SDP)$$i"; \
  107.     done
  108.  
  109. support: support-dir
  110.  
  111. support-dir:
  112.     @echo "===> $(SDP)support"; \
  113.     cd support; $(MAKE) $(MFLAGS_STATIC) SDP='$(SDP)' CC='$(CC)' AUX_CFLAGS='$(CFLAGS)' RANLIB='$(RANLIB)'; \
  114.     echo "<=== $(SDP)support"
  115.  
  116. clean:
  117.     -rm -f $(TARGET) lib$(TARGET).* *.o
  118.     @for i in $(SUBDIRS); do \
  119.         echo "===> $(SDP)$$i"; \
  120.         ( cd $$i && $(MAKE) $(MFLAGS_STATIC) SDP='$(SDP)' $@ ) || exit 1; \
  121.         echo "<=== $(SDP)$$i"; \
  122.     done
  123.  
  124. distclean:
  125.     -rm -f $(TARGET) lib$(TARGET).* *.o
  126.     @for i in $(SUBDIRS); do \
  127.         echo "===> $(SDP)$$i"; \
  128.         ( cd $$i && $(MAKE) $(MFLAGS_STATIC) SDP='$(SDP)' $@ ) || exit 1; \
  129.         echo "<=== $(SDP)$$i"; \
  130.     done
  131.     -rm -f include/ap_config_auto.h
  132.     -rm -f modules.c
  133.     -rm -f modules/Makefile
  134.     -rm -f regex/Makefile
  135.     -rm -f Makefile.config
  136.     -rm -f Makefile
  137.  
  138. install:
  139.     @echo "++ Sorry, no installation procedure available at this level."
  140.     @echo "++ Go to the parent directory for an 'install' target."
  141.  
  142. # We really don't expect end users to use this rule.  It works only with
  143. # gcc, and rebuilds Makefile.tmpl.  You have to re-run Configure after
  144. # using it.
  145. depend:
  146.     cp Makefile.tmpl Makefile.tmpl.bak \
  147.         && sed -ne '1,/^# DO NOT REMOVE/p' Makefile.tmpl > Makefile.new \
  148.         && gcc -MM $(INCLUDES) $(CFLAGS) *.c >> Makefile.new \
  149.         && sed -e '1,$$s: $(INCDIR)/: $$(INCDIR)/:g' \
  150.                -e '1,$$s: $(OSDIR)/: $$(OSDIR)/:g' Makefile.new \
  151.         > Makefile.tmpl \
  152.         && rm Makefile.new
  153.     for i in $(SUBDIRS); do \
  154.         ( cd $$i && $(MAKE) CC='$(CC)' AUX_CFLAGS='$(CFLAGS)' RANLIB='$(RANLIB)' depend ) || exit 1; \
  155.     done
  156.  
  157. #Dependencies
  158.  
  159. $(OBJS): Makefile subdirs
  160.  
  161. # DO NOT REMOVE
  162. buildmark.o: buildmark.c include/ap_config.h include/ap_mmn.h \
  163.  include/ap_config_auto.h os/unix/os.h include/ap_ctype.h \
  164.  include/hsregex.h include/httpd.h include/alloc.h include/buff.h \
  165.  include/ap.h include/util_uri.h
  166. modules.o: modules.c include/httpd.h include/ap_config.h \
  167.  include/ap_mmn.h include/ap_config_auto.h os/unix/os.h \
  168.  include/ap_ctype.h include/hsregex.h include/alloc.h include/buff.h \
  169.  include/ap.h include/util_uri.h include/http_config.h
  170.