home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-385-Vol-1of3.iso / p / pccts.zip / tutorial / makefile.1 < prev    next >
Makefile  |  1992-12-08  |  551b  |  23 lines

  1. #
  2. # Makefile for 1.0x tutorial (no symbol table stuff): tut1.g
  3. # ANTLR creates parser.dlg, err.c, tut1.c, tokens.h
  4. # DLG creates scan.c, mode.h
  5. #
  6. CFLAGS= -I. -I../h
  7. GRM=tut1
  8. ANTLR=../bin/antlr
  9. DLG=../bin/dlg
  10. SRC=scan.c $(GRM).c err.c
  11. OBJ=scan.o $(GRM).o err.o
  12.  
  13. tutorial: $(OBJ) $(SRC)
  14.     cc -o $(GRM) $(OBJ)
  15.  
  16. # build a parser and lexical description from a language description
  17. $(GRM).c parser.dlg : $(GRM).g
  18.     $(ANTLR) -k 2 $(GRM).g
  19.  
  20. # build the scanner from a lexical description
  21. scan.c : parser.dlg
  22.     $(DLG) -C2 parser.dlg scan.c
  23.