home *** CD-ROM | disk | FTP | other *** search
/ PC Extra Super CD 1998 January / PCPLUS131.iso / DJGPP / V2 / DJLSR201.ZIP / src / libc / posix / regex / makefile.bsd < prev    next >
Encoding:
Makefile  |  1994-12-23  |  2.6 KB  |  107 lines

  1. # You probably want to take -DREDEBUG out of CFLAGS, and put something like
  2. # -O in, *after* testing (-DREDEBUG strengthens testing by enabling a lot of
  3. # internal assertion checking and some debugging facilities).
  4. # Put -Dconst= in for a pre-ANSI compiler.
  5. # Do not take -DPOSIX_MISTAKE out.
  6. # REGCFLAGS isn't important to you (it's for my use in some special contexts).
  7. CFLAGS=-I. -I.. -DPOSIX_MISTAKE -DREDEBUG $(REGCFLAGS) -O2
  8.  
  9. # Flags for linking but not compiling, if any.
  10. LDFLAGS=
  11.  
  12. # Extra libraries for linking, if any.
  13. LIBS=
  14.  
  15. # Internal stuff, should not need changing.
  16. OBJPRODN=regcomp.o regexec.o regerror.o regfree.o
  17. OBJS=$(OBJPRODN) split.o debug.o main.o
  18. H=cclass.h cname.h regex2.h utils.h
  19. REGSRC=regcomp.c regerror.c regexec.c regfree.c
  20. ALLSRC=$(REGSRC) engine.c debug.c main.c split.c
  21.  
  22. # Stuff that matters only if you're trying to lint the package.
  23. LINTFLAGS=-I. -Dstatic= -Dconst= -DREDEBUG
  24. LINTC=regcomp.c regexec.c regerror.c regfree.c debug.c main.c
  25. JUNKLINT=possible pointer alignment|null effect
  26.  
  27. default:    lib
  28.  
  29. lib:    $(OBJPRODN)
  30.     rm -f ../libregex.a
  31.     ar crv ../libregex.a $(OBJPRODN)
  32.  
  33. # dependencies
  34. $(OBJPRODN) debug.o:    utils.h regex.h regex2.h
  35. regcomp.o:    cclass.h cname.h regcomp.ih
  36. regexec.o:    engine.c engine.ih
  37. regerror.o:    regerror.ih
  38. debug.o:    debug.ih
  39. main.o:    main.ih
  40.  
  41. # tester
  42. re:    $(OBJS)
  43.     $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) $(LIBS) -o $@
  44.  
  45. # regression test
  46. r:    re tests
  47.     go32 re <tests
  48.     go32 re -el <tests
  49.     go32 re -er <tests
  50.  
  51. # 57 variants, and other stuff, for development use -- not useful to you
  52. ra:    re tests
  53.     -go32 re <tests
  54.     -go32 re -el <tests
  55.     -go32 re -er <tests
  56.  
  57. rx:    re tests
  58.     go32 re -x <tests
  59.     go32 re -x -el <tests
  60.     go32 re -x -er <tests
  61.  
  62. t:    re tests
  63.     -time go32 re <tests
  64.     -time go32 re -cs <tests
  65.     -time go32 re -el <tests
  66.     -time go32 re -cs -el <tests
  67.  
  68. l:    $(LINTC)
  69.     lint $(LINTFLAGS) -h $(LINTC) 2>&1 | egrep -v '$(JUNKLINT)' | tee lint
  70.  
  71. fullprint:
  72.     ti README WHATSNEW notes todo | list
  73.     ti *.h | list
  74.     list *.c
  75.     list regex.3 regex.7
  76.  
  77. print:
  78.     ti README WHATSNEW notes todo | list
  79.     ti *.h | list
  80.     list reg*.c engine.c
  81.  
  82.  
  83. mf.tmp:    Makefile
  84.     sed '/^REGEXH=/s/=.*/=regex.h/' Makefile | sed '/#DEL$$/d' >$@
  85.  
  86. DTRH=cclass.h cname.h regex2.h utils.h
  87. PRE=COPYRIGHT README WHATSNEW
  88. POST=regex.3 regex.7 tests $(DTRH) $(ALLSRC) fake/*.[ch]
  89. FILES=$(PRE) Makefile $(POST)
  90. DTR=$(PRE) Makefile=mf.tmp $(POST)
  91. dtr:    $(FILES) mf.tmp
  92.     makedtr $(DTR) >$@
  93.     rm mf.tmp
  94.  
  95. cio:    $(FILES)
  96.     cio $(FILES)
  97.  
  98. rdf:    $(FILES)
  99.     rcsdiff -c $(FILES) 2>&1 | p
  100.  
  101. # various forms of cleanup
  102. tidy:
  103.     rm -f junk* core core.* *.core dtr *.tmp lint
  104.  
  105. clean:    tidy
  106.     rm -f *.o *.s re libregex.a
  107.