📄 makefile.dos
字号:
############################################################### Copyright (c) 1993-1995 by Paul Long All rights reserved.################################################################ MS-DOS makefile for Metre# (Tested with Borland and Microsoft make.)## Initially set up for the Borland C compiler, MKS lex/yacc, and to# regenerate the parser files when needed (not use the ones in the# distribution).## Note: This is the make file that I use most often. As the developer# of Metre, I need to regenerate the parser files, ytab.c, ytab.h, and# lex_yy.c when needed. You, however, as basically a user of Metre,# should probably use the parser files included in the distribution.# Therefore, comment out the macro definitions for "IF able to# regenerate...," below, and uncomment the definitions for "ELSE IF use# existing..."## To make Metre: make -f makefile.dos metre.exe# Mtree: make -f makefile.dos mtree.exe# both: make -f makefile.dos# To test Metre: make -f makefile.dos metre.tst# Mtree: make -f makefile.dos mtree.tst# both: make -f makefile.dos all.tst# To delete# intermediate files: make -f makefile.dos clean# Temporary file used when testing a tool.TMP_FILE=tmp.tmp# IF Borland C compiler:CC=bccCFLAGS=-A -w-rch -w-ccc -w-effLKFLAGS=-e## ELSE IF Microsoft C compiler:#CC=cl#CFLAGS=-Za -w#LKFLAGS=-FeYTAB=ytabLEXYY=lex_yyMOVE_YTABH=# IF MKS lex/yacc:LEX=lexYACC=yaccYFLAGS=-d# IF be able to regenerate parser files (needed only if you modify parser):# DEL_LEXYACC_OUT is for cleaning up intermediate parser files since you# must be able to regenerate them.# Note: This will delete the parser files included in the Metre distribution.# Therefore, make sure you have some way to regenerate them or have some kind# of back up for these files if you think you may want to go back to using# them in the future.DEL_LEXYACC_OUT=del $(LEXYY).c $(YTAB).c $(YTAB).h## ELSE IF use existing parser files (recommended):#DEL_LEXYACC_OUT=#LEX=@echo *** lex not executed *** #YACC=@echo *** yacc not executed *** # Dummy target to make both tools.all: metre.exe mtree.exemetre.exe: metrules.obj $(YTAB).obj $(LEXYY).obj $(CC) $(LKFLAGS)metre.exe metrules.obj $(YTAB).obj $(LEXYY).objmtree.exe: trerules.obj $(YTAB).obj $(LEXYY).obj $(CC) $(LKFLAGS)mtree.exe trerules.obj $(YTAB).obj $(LEXYY).obj$(YTAB).obj: $(YTAB).c metreint.h $(CC) $(CFLAGS) -c $(YTAB).c$(LEXYY).obj: $(LEXYY).c ytab.h metreint.h $(CC) $(CFLAGS) -c $(LEXYY).cmetrules.obj: metrules.c metre.h $(CC) $(CFLAGS) -c metrules.ctrerules.obj: trerules.c metre.h $(CC) $(CFLAGS) -c trerules.c$(YTAB).c ytab.h: gram.y $(YACC) $(YFLAGS) gram.y $(MOVE_YTABH)$(LEXYY).c: scan.l $(LEX) scan.lmetreint.h: metre.h# Test both or individually.all.tst: metre.tst mtree.tstmetre.tst: metre.exe .\metre -DBOOLEAN=int -Dva_list=int -H -a metrules.c >$(TMP_FILE) -fc metrules.out $(TMP_FILE) del $(TMP_FILE)mtree.tst: mtree.exe .\mtree -DBOOLEAN=int -l -t -rrules trerules.c >$(TMP_FILE) -fc trerules.out $(TMP_FILE) del $(TMP_FILE)# Clean up intermediate files.clean: -$(DEL_LEXYACC_OUT) -del *.obj
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -