home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / misc / volume19 / wacco / part01 / Makefile < prev    next >
Makefile  |  1991-05-19  |  2KB  |  62 lines

  1. # Copyright (c) 1991 by Parag Patel.  All Rights Reserved.
  2. # $Header: Makefile,v 1.27 91/05/17 16:29:50 hmgr Exp $
  3.  
  4. CXX = CC
  5. .SUFFIXES: .C
  6. .C.o:
  7.     $(CXX) $(CFLAGS) -c $<
  8.  
  9. # system-dependent options - use any appropriate -D<sys> macros
  10. # -DBSD             for a BSD derivative (Sun)
  11. # -Dpid_t=long        if your headers don't define a pid_t type
  12. # -DFREE_TAKES_CHAR    if you have a free(char*) instead of free(void*) (Sun)
  13. CFLAGS = -g
  14. LIBS = libwacco.a
  15.  
  16. SRCS =    README Makefile wacco.1 wacco.doc wacco.doc.iw wacco.doc.ps wacco.w \
  17.     defs.h toks.h boolean.h bitset.h darray.h table.h \
  18.     bitset.C tgram.w tgram.good tgram.bad \
  19.     main.C sym.C parse.C scan.C build.C check.C read.C gen.C \
  20.     io.C version.C
  21.  
  22. OBJS =    main.o sym.o parse.o scan.o build.o check.o read.o gen.o bitset.o
  23.  
  24. wacco : $(OBJS) libwacco.a
  25.     $(CXX) $(CFLAGS) -o wacco $(OBJS) $(LIBS)
  26.  
  27. libwacco.a : io.o version.o
  28.      ar ru libwacco.a $(?)
  29.      -[ -x /usr/bin/ranlib ] && ranlib libwacco.a
  30.  
  31. tst: parser.o scanner.o
  32.     $(CXX) $(CFLAGS) -o tst parser.o scanner.o $(LIBS) $(LFLAGS) -ll
  33.     -./tst <tgram.bad
  34.     ./tst <tgram.good
  35.  
  36. parser.C scanner.l: tgram.w wacco
  37.     ./wacco tgram.w
  38.  
  39. tar: $(SRCS)
  40.     tar -cvf - $(SRCS) | compress >wacco.tar.Z 
  41.  
  42. shar: $(SRCS)
  43.     shar -ac -nwacco -l50 -owacco-shar $(SRCS)
  44.  
  45. clean:
  46.     rm -f wacco *.o libwacco.a wacco.tar.Z* wacch.shar* tst parser.C scanner.l
  47.  
  48. files:
  49.     @echo $(SRCS)
  50.  
  51. main.o : main.C toks.h defs.h boolean.h darray.h table.h bitset.h
  52. sym.o : sym.C defs.h boolean.h darray.h table.h bitset.h
  53. parse.o : parse.C toks.h defs.h boolean.h darray.h table.h bitset.h
  54. scan.o : scan.C toks.h defs.h boolean.h darray.h table.h bitset.h
  55. build.o : build.C defs.h boolean.h darray.h table.h bitset.h
  56. check.o : check.C defs.h boolean.h darray.h table.h bitset.h
  57. read.o : read.C toks.h defs.h boolean.h darray.h table.h bitset.h
  58. gen.o : gen.C toks.h defs.h boolean.h darray.h table.h bitset.h
  59. io.o : io.C toks.h defs.h boolean.h darray.h table.h bitset.h
  60. version.o : version.C
  61. bitset.o : bitset.C bitset.h boolean.h
  62.