home *** CD-ROM | disk | FTP | other *** search
Makefile | 1993-11-07 | 2.2 KB | 83 lines |
- # makefile.mak -- Turbo C++ Makefile for c skeletons
-
- # NOTE: change CDIR depending on where you have installed Turbo C++
- CDIR=C:\TC
-
- # ALSO NOTE: change QP depending on where you have installed Qparser
- # In particular, certain files and includes are expected to reside
- # in directory $(QP)/LIB, and be available when this is run.
- QP=D:\QPARSER
-
- # You can select any grammar file by changing 'calc' below to something
- # else, or setting the 'make' command option -DGRM=<file>.
- GRM=calcc
-
- # Compiler model
- MODEL=l
-
- # tlink libraries, set up for LARGE model
- LIBS=$(QP)\lib\qp $(CDIR)\lib\emu $(CDIR)\lib\math$(MODEL) \
- $(CDIR)\lib\c$(MODEL)
-
- # Compiler options -- the following provides for:
- # 1. -O- suppresses optimizations for rapid prototyping
- # 2. Qparser debugging (/DDEBUG)
- # 3. Qparser QTREES building (/DQTREES)
- # 4. -v enables symbolic debugging tables
- DEBUG=1
- QTREES=0
-
- QOPTS=-DDEBUG=$(DEBUG) -DQTREES=$(QTREES)
- COPTS=$(QOPTS) -DTCC -m$(MODEL) -O- -v -I$(QP)\lib -I$(CDIR)\include -L$(CDIR)\lib
-
- # ------------------
- # The Make rules
-
- anyfile: main.exe
-
- # Generate table file from grammar and optimize the table
- $(GRM).tbl: $(GRM).grm
- $(QP)\lr1 $(GRM) $(GRM).rpt
- $(QP)\opt $(GRM)
-
- # Generate source files from skeletons
- decl.h: $(GRM).tbl skeldecl.h
- $(QP)\lr1p -mC $(GRM) skeldecl.h decl.h
-
- table.c: $(GRM).tbl skeltab.c
- $(QP)\lr1p -mC $(GRM) skeltab.c table.c
-
- eval.c: $(GRM).tbl skeleval.c
- $(QP)\lr1p -mC $(GRM) skeleval.c eval.c
-
- lex.c: $(GRM).tbl skellex.c
- $(QP)\lr1p -mC $(GRM) skellex.c lex.c
-
- # Compile all files
- table.obj: decl.h table.c
- $(CDIR)\bin\tcc -c $(COPTS) table.c
-
- debug.obj: decl.h debug.c
- $(CDIR)\bin\tcc -c $(COPTS) debug.c
-
- eval.obj: decl.h eval.c
- $(CDIR)\bin\tcc -c $(COPTS) eval.c
-
- lex.obj: decl.h lex.c
- $(CDIR)\bin\tcc -c $(COPTS) lex.c
-
- main.obj: decl.h main.c
- $(CDIR)\bin\tcc -c $(COPTS) main.c
-
- syms.obj: decl.h syms.c
- $(CDIR)\bin\tcc -c $(COPTS) syms.c
-
- pars.obj: decl.h pars.c
- $(CDIR)\bin\tcc -c $(COPTS) pars.c
-
- main.exe: main.obj lex.obj table.obj syms.obj \
- eval.obj debug.obj pars.obj
- $(CDIR)\bin\tlink -v $(CDIR)\lib\C0$(MODEL) main lex table syms eval debug pars \
- ,main,,$(LIBS)
-