home *** CD-ROM | disk | FTP | other *** search
/ PC Online 1999 April / PCO0499.ISO / filesbbs / os2 / apach134.arj / APACH134.ZIP / src / regex / Makefile < prev    next >
Encoding:
Makefile  |  1999-01-10  |  4.3 KB  |  181 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. ##
  9. ##  Inherited Makefile options from Configure script
  10. ##  (Begin of automatically generated section)
  11. ##
  12. SRCDIR=..
  13. EXTRA_CFLAGS=
  14. EXTRA_LDFLAGS=-s
  15. EXTRA_LIBS=
  16. EXTRA_INCLUDES=
  17. EXTRA_DEPS=
  18. OPTIM=-O2
  19. OSDIR=$(SRCDIR)/os/os2
  20. INCDIR=$(SRCDIR)/include
  21. INCLUDES0=-I$(OSDIR) -I$(INCDIR)
  22. SHELL=sh
  23. CC=gcc
  24. CPP=gcc -E
  25. TARGET=httpd
  26. CFLAGS1= -DOS2 -Zbsd-signals -Zbin-files -DTCPIPV4 -g -DUSE_HSREGEX
  27. INCLUDES1=
  28. LIBS_SHLIB=
  29. LDFLAGS1= -Zexe
  30. MFLAGS_STATIC=--no-print-directory
  31. REGLIB=regex/libregex.a
  32. RANLIB=true
  33. LIBS1= -lsocket -lufc -lbsd
  34. ##
  35. ##  (End of automatically generated section)
  36. ##
  37.  
  38.  
  39. # You probably want to take -DREDEBUG out of CFLAGS, and put something like
  40. # -O in, *after* testing (-DREDEBUG strengthens testing by enabling a lot of
  41. # internal assertion checking and some debugging facilities).
  42. # Put -Dconst= in for a pre-ANSI compiler.
  43. # Do not take -DPOSIX_MISTAKE out.
  44. # REGCFLAGS isn't important to you (it's for my use in some special contexts).
  45. INCLUDES=$(INCLUDES1) $(INCLUDES0) $(EXTRA_INCLUDES)
  46. CFLAGS=-I. $(INCLUDES) $(OPTIM) $(CFLAGS1) $(EXTRA_CFLAGS) -DPOSIX_MISTAKE
  47.  
  48. # If you have a pre-ANSI compiler, put -o into MKHFLAGS.  If you want
  49. # the Berkeley __P macro, put -b in.
  50. MKHFLAGS=
  51.  
  52. # Flags for linking but not compiling, if any.
  53. LDFLAGS=$(LDFLAGS1) $(EXTRA_LDFLAGS) -L$(SRCDIR)/ap
  54.  
  55. # Extra libraries for linking, if any.
  56. LIBS=$(EXTRA_LIBS) $(LIBS1) -lap
  57.  
  58. # Internal stuff, should not need changing.
  59. OBJPRODN=regcomp.o regexec.o regerror.o regfree.o
  60. OBJS=$(OBJPRODN) split.o debug.o main.o
  61. H=cclass.h cname.h regex2.h utils.h
  62. REGSRC=regcomp.c regerror.c regexec.c regfree.c
  63. ALLSRC=$(REGSRC) engine.c debug.c main.c split.c
  64.  
  65. # Stuff that matters only if you're trying to lint the package.
  66. LINTFLAGS=-I. -Dstatic= -Dconst= -DREDEBUG
  67. LINTC=regcomp.c regexec.c regerror.c regfree.c debug.c main.c
  68. JUNKLINT=possible pointer alignment|null effect
  69.  
  70. # arrangements to build forward-reference header files
  71. .SUFFIXES:    .ih .h
  72. .c.ih:
  73.     sh ./mkh $(MKHFLAGS) -p $< >$@
  74.  
  75. all lib: libregex.a
  76.  
  77. libregex.a: $(OBJPRODN)
  78.     rm -f libregex.a
  79.     ar cr libregex.a $(OBJPRODN)
  80.     $(RANLIB) libregex.a
  81.  
  82. default:    r
  83.  
  84. purge:
  85.     rm -f *.o
  86.  
  87. # stuff to build regex.h
  88. REGEXH=../include/hsregex.h
  89. REGEXHSRC=regex2.h $(REGSRC)
  90. $(REGEXH):    $(REGEXHSRC) mkh
  91.     sh ./mkh $(MKHFLAGS) -i _REGEX_H_ $(REGEXHSRC) > $(REGEXH)
  92.  
  93. #    cmp -s regex.tmp regex.h 2>/dev/null || cp regex.tmp regex.h
  94. #    rm -f regex.tmp
  95.  
  96. # no automatic dependencies here
  97. depend:
  98.  
  99. # dependencies
  100. $(OBJPRODN) debug.o:    utils.h $(REGEXH) regex2.h
  101. regcomp.o:    cclass.h cname.h regcomp.ih
  102. regexec.o:    engine.c engine.ih
  103. regerror.o:    regerror.ih
  104. debug.o:    debug.ih
  105. main.o:    main.ih
  106.  
  107. # tester
  108. re:    $(OBJS)
  109.     $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) $(LIBS) -o $@
  110.  
  111. # regression test
  112. r:    re tests
  113.     ./re <tests
  114.     ./re -el <tests
  115.     ./re -er <tests
  116.  
  117. # 57 variants, and other stuff, for development use -- not useful to you
  118. ra:    ./re tests
  119.     -./re <tests
  120.     -./re -el <tests
  121.     -./re -er <tests
  122.  
  123. rx:    ./re tests
  124.     ./re -x <tests
  125.     ./re -x -el <tests
  126.     ./re -x -er <tests
  127.  
  128. t:    ./re tests
  129.     -time ./re <tests
  130.     -time ./re -cs <tests
  131.     -time ./re -el <tests
  132.     -time ./re -cs -el <tests
  133.  
  134. l:    $(LINTC)
  135.     lint $(LINTFLAGS) -h $(LINTC) 2>&1 | egrep -v '$(JUNKLINT)' | tee lint
  136.  
  137. fullprint:
  138.     ti README WHATSNEW notes todo | list
  139.     ti *.h | list
  140.     list *.c
  141.     list regex.3 regex.7
  142.  
  143. print:
  144.     ti README WHATSNEW notes todo | list
  145.     ti *.h | list
  146.     list reg*.c engine.c
  147.  
  148.  
  149. mf.tmp:    Makefile
  150.     sed '/^REGEXH=/s/=.*/=..\/include\\hsregex.h/' Makefile \
  151.     | sed '/#DEL$$/d' >$@
  152.  
  153. DTRH=cclass.h cname.h regex2.h utils.h
  154. PRE=COPYRIGHT README WHATSNEW
  155. POST=mkh regex.3 regex.7 tests $(DTRH) $(ALLSRC) fake/*.[ch]
  156. FILES=$(PRE) Makefile $(POST)
  157. DTR=$(PRE) Makefile=mf.tmp $(POST)
  158. dtr:    $(FILES) mf.tmp
  159.     makedtr $(DTR) >$@
  160.     rm mf.tmp
  161.  
  162. cio:    $(FILES)
  163.     cio $(FILES)
  164.  
  165. rdf:    $(FILES)
  166.     rcsdiff -c $(FILES) 2>&1 | p
  167.  
  168. # various forms of cleanup
  169. tidy:
  170.     rm -f junk* core core.* *.core dtr *.tmp lint
  171.  
  172. clean:    tidy
  173.     rm -f *.o *.s re libregex.a
  174.  
  175. distclean: clean
  176.     -rm -f Makefile
  177.  
  178. # don't do this one unless you know what you're doing
  179. spotless:    clean
  180.     rm -f mkh ../include/hsregex.h
  181.