📄 makefile
字号:
#@A (C) 1992 Allen I. Holub
#----------------------------------------------------------------------
# Make the compiler. Note that the tables and the actions are put into
# separate files, and the assumption is that you will be working on the
# actions, not on the grammar. Consequently, the tables are not remade
# automatically when you modify c.y. You must make them explicitly with
# a "make tables" before issuing the normal "make". That is:
#
# Manufacture the compiler by issuing: make tables
# and then make
#----------------------------------------------------------------------
CFLAGS = -Zi -c -Ox -Oa
LIBS = comp l curses termlib
.c.obj:
cc $(CFLAGS) $*.c
#----------------------------------------------------------------------
# The b macro is for bounds checker. Comment it out if you're not using
# this program.
# B = \lib\bc4.obj
#
#----------------------------------------------------------------------
OBJ1 = decl.obj gen.obj lexyy.obj local.obj main.obj op.obj switch.obj
OBJ2 = symtab.obj temp.obj value.obj yyact.obj
TABLES = yyout.obj
#----------------------------------------------------------------------
c.exe: $(OBJ1) $(OBJ2) $(TABLES)
sh -c rm -e "c?0*"
link /CP:1 /NOI /NOE /CO /M @<<
$(OBJ1) +
$(OBJ2) $(B) +
$(TABLES) yyoutab.obj
c
c.map
$(LIBS)
nul
<<
final: $(OBJ1) $(OBJ2) $(TABLES)
sh -c rm -e "c?0*"
link /CP:1 /NOI /NOE /EXEPACK /M @<<
$(OBJ1) +
$(OBJ2) $(B) +
$(TABLES) yyoutab.obj
c
c.map
$(LIBS)
nul
<<
#----------------------------------------------------------------------
yyout.obj: yyout.c yyoutab.c
cc $(CFLAGS) yyout.c
cc $(CFLAGS) yyoutab.c
#----------------------------------------------------------------------
# tables makes both yyout.c and yyoutab.c
tables:
occs -vlWDSTp c.y
#----------------------------------------------------------------------
yyact.obj: yyact.c proto.h symtab.h value.h
yyact.c: c.y
occs -vWDa c.y
yyact-l: c.y
occs -vWDal c.y
lexyy.obj: lexyy.c symtab.h yyout.h
lexyy.c: c.lex
lex -vl c.lex
decl.obj: decl.c symtab.h value.h proto.h
gen.obj: gen.c proto.h
local.obj: local.c symtab.h proto.h label.h
main.obj: main.c proto.h
op.obj: op.c symtab.h value.h proto.h label.h
switch.obj: switch.c symtab.h value.h proto.h label.h switch.h
symtab.obj: symtab.c symtab.h value.h proto.h label.h
temp.obj: temp.c symtab.h value.h proto.h
value.obj: value.c symtab.h value.h proto.h label.h
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -