-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.nmake
40 lines (30 loc) · 1.24 KB
/
Makefile.nmake
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
# NMAKE Makefile for pseudocode-compiler project
# note: run from within Visual Studio 2019/2022 command prompt
# "nmake /f Makefile.nmake"
# note: place the following in the same directory as this makefile or specify paths
Bison = win_bison.exe
Flex = win_flex.exe --wincompat
FlexLexer_h = /I.
CPP = cl
CPPFlags = /nologo /EHsc /std:c++20 /O2 /wd4005 $(FlexLexer_h)
Target = psc.exe
Objs = Lexer.obj Parser.obj main.obj
Autogen = Lexer.cpp Parser.hpp Parser.cpp Location.hpp
Progs = pscexamples.exe
ProgsObjs = pscexamples.obj
all: $(Target) $(Progs)
$(Autogen): scanner.l grammar.y
$(Bison) grammar.y
$(Flex) scanner.l
.cpp.obj:
$(CPP) $(CPPFlags) /c $*.cpp
$(Target): $(Autogen) $(Objs)
$(CPP) $(CPPFlags) /Fe$(Target) $(Objs)
$(Progs): $(ProgsObjs)
$(CPP) $(CPPFlags) /Fe$(Progs) $(ProgsObjs)
clean:
del $(Progs) $(ProgsObjs) $(Target) $(Objs) $(Autogen)
# Static dependencies
Lexer.obj: SymbolTypes.hpp Tree.hpp Expression.hpp Symbol.hpp Lexer.hpp Parser.hpp
Parser.obj: SymbolTypes.hpp Tree.hpp Expression.hpp If.hpp While.hpp For.hpp RepeatUntil.hpp InputOutput.hpp Utility.hpp Symbol.hpp Subroutine.hpp Lexer.hpp
main.obj: SymbolTypes.hpp Tree.hpp Expression.hpp Symbol.hpp Lexer.hpp Parser.hpp