0
|
1 SOURCES = Script.cpp compiler.cpp node.cpp vm.cpp script-parser.yy script-scanner.ll
|
|
2 OBJ = Script.o compiler.o node.o vm.o script-parser.o script-scanner.o
|
|
3 BISON_OUTPUT = script-parser.cc script-parser.hh location.hh position.hh
|
|
4
|
|
5 CFLAGS = -O2
|
|
6
|
|
7 all: script.exe
|
|
8
|
|
9 .SUFFIXES:
|
|
10 .SUFFIXES: .cpp .cc .ll .yy .o
|
|
11
|
|
12 script.exe: $(OBJ)
|
|
13 $(CC) $(LDFLAGS) -o $@ $(OBJ) -lstdc++
|
|
14
|
|
15 .cpp.o:
|
|
16 $(CC) -c $(CFLAGS) -o $@ $<
|
|
17
|
|
18 .cc.o:
|
|
19 $(CC) -c $(CFLAGS) -o $@ $<
|
|
20
|
|
21 depend:
|
|
22 makedepend -- $(SOURCES)
|
|
23
|
|
24 $(BISON_OUTPUT): script-parser.yy
|
|
25 bison -d -ra -oscript-parser.cc script-parser.yy
|
|
26
|
|
27 script-scanner.cc: script-scanner.ll
|
|
28 flex -8 -oscript-scanner.cc script-scanner.ll
|
|
29
|
|
30 Script.o: compiler.h vm.h
|
|
31 compiler.o: script-parser.hh compiler.h
|
|
32 node.o: location.hh vm.h
|
|
33 vm.o: vm.h
|
|
34 script-parser.o: $(BISON_OUTPUT)
|
|
35 script-scanner.o: script-scanner.cc script-parser.hh
|