-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
27 lines (18 loc) · 1.2 KB
/
Makefile
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
.PHONY: clean all
all: kcomp
kcomp: driver.o parser.o scanner.o kcomp.o
clang++ -o kcomp driver.o parser.o scanner.o kcomp.o `llvm-config --cxxflags --ldflags --libs --libfiles --system-libs`
kcomp.o: kcomp.cpp driver.hpp
clang++ -c kcomp.cpp -I/opt/homebrew/opt/llvm\@16/include/ -std=c++17 -fno-exceptions -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
parser.o: parser.cpp
clang++ -c parser.cpp -I/opt/homebrew/opt/llvm\@16/include/ -std=c++17 -fno-exceptions -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
scanner.o: scanner.cpp parser.hpp
clang++ -c scanner.cpp -I/opt/homebrew/opt/llvm\@16/include/ -std=c++17 -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
driver.o: driver.cpp parser.hpp driver.hpp
clang++ -c driver.cpp -I/opt/homebrew/opt/llvm\@16/include/ -std=c++17 -fno-exceptions -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
parser.cpp, parser.hpp: parser.yy
bison -o parser.cpp parser.yy
scanner.cpp: scanner.ll
flex -o scanner.cpp scanner.ll
clean:
rm -f *~ driver.o scanner.o parser.o kcomp.o kcomp scanner.cpp parser.cpp parser.hpp