-
Notifications
You must be signed in to change notification settings - Fork 7
/
makefile.mvc
128 lines (93 loc) · 2.47 KB
/
makefile.mvc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
# Constantin Knizhnik
# Moscow Software Center
# Pascal to C/C++ compiler.
#
DEFINES = -DYY_NO_UNISTD_H
CC = cl
# Debug
CFLAGS=-c -Zi -W3 $(DEFINES)
# Optimize
#CFLAGS=-c -Ox -Zi -W3 -nologo $(DEFINES)
LD = cl -nologo
LDFLAGS = -Zi
#LDFLAGS =
AR = lib
YACC = bison -d -p zz
LEX = flex -i -F -8
#
# Target.
#
all: ptoc.exe cganal.exe ptoc.lib winbgi.lib
#
# File lists.
#
INCS = main.h token.h token.dpp nmtbl.h bring.h tpexpr.h trnod.h util.h parser.h
SRCS = trnod.cxx nmtbl.cxx bring.cxx tpexpr.cxx util.cxx main.cxx parser.cxx lex.cxx token.cxx dprintf.cxx
OBJS = trnod.obj nmtbl.obj bring.obj tpexpr.obj util.obj main.obj parser.obj lex.obj token.obj dprintf.obj
LIB_SRCS = set.c paslib.c io.c
LIB_OBJS = set.obj paslib.obj io.obj
trnod.obj: trnod.cxx $(INCS)
$(CC) $(CFLAGS) trnod.cxx
nmtbl.obj: nmtbl.cxx $(INCS)
$(CC) $(CFLAGS) nmtbl.cxx
bring.obj: bring.cxx $(INCS)
$(CC) $(CFLAGS) bring.cxx
tpexpr.obj: tpexpr.cxx $(INCS)
$(CC) $(CFLAGS) tpexpr.cxx
util.obj: util.cxx $(INCS)
$(CC) $(CFLAGS) util.cxx
main.obj: main.cxx $(INCS)
$(CC) $(CFLAGS) main.cxx
parser.obj: parser.cxx $(INCS)
$(CC) $(CFLAGS) parser.cxx
lex.obj: lex.cxx $(INCS)
$(CC) $(CFLAGS) lex.cxx
token.obj: token.cxx $(INCS)
$(CC) $(CFLAGS) token.cxx
dprintf.obj: dprintf.cxx $(INCS)
$(CC) $(CFLAGS) dprintf.cxx
set.obj: set.c ptoc.h
$(CC) $(CFLAGS) set.c
paslib.obj: paslib.c ptoc.h
$(CC) $(CFLAGS) paslib.c
io.obj: io.c ptoc.h
$(CC) $(CFLAGS) io.c
analyse.obj: analyse.cxx main.h
$(CC) $(CFLAGS) analyse.cxx
parser.cxx parser.h : parser.y
SET BISON_SIMPLE=\bin\bison.simple
SET BISON_HAIRY=\bin\bison.hairy
$(YACC) parser.y
-@del parser.cxx
-@del parser.h
rename parser.tab.c parser.cxx
rename parser.tab.h parser.h
lex.cxx : lex.l
$(LEX) lex.l
-@del lex.cxx
rename lexyy.c lex.cxx
ptoc.exe: $(OBJS)
$(LD) $(LDFLAGS) /Feptoc.exe $(OBJS) $(LDLIB)
cganal.exe: analyse.obj
$(LD) $(LDFLAGS) /Fecganal.exe analyse.obj $(LDLIB)
ptoc.lib: $(LIB_OBJS)
-@del ptoc.lib
$(AR) $(AROPT) /OUT:ptoc.lib $(LIB_OBJS)
winbgi.lib:
cd WinBGI
nmake -f makefile.mvc
cd ..
clean:
-del ptoc,cganal,*.a,*.obj,*.ilk,*.zip,*.*~,*~,ptoc.pdb,cganal.pdb
cd examples
nmake -f makefile.mvc clean
cd ..
cd WinBGI
nmake -f makefile.mvc clean
cd ..
zip: clean
cd ..
-del ptoc.zip
zip -r ptoc.zip ptoc
copyzip: zip
copy ptoc.zip a: