-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
28 lines (21 loc) · 726 Bytes
/
Makefile
File metadata and controls
28 lines (21 loc) · 726 Bytes
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
SHELL = /bin/bash
OBJS = main.o parser.bison.o lexer.o flex_lexer.o ast.o driver.o codegen_visitor.o stdlib.o
CC = g++
LLVM_CONFIG = `llvm-config --cxxflags`
main: ${OBJS}
${CC} `llvm-config --cxxflags --ldflags --system-libs --libs core native support orcjit executionengine` -o main ${OBJS}
parser.bison.o: parser.bison.cc
${CC} -Wno-deprecated-register -std=c++11 -c parser.bison.cc -o parser.bison.o
parser.bison.cc: parser.yy
bison -d -o parser.bison.cc parser.yy
flex_lexer.o: flex_lexer.cc
${CC} -Wno-deprecated-register -std=c++11 -c flex_lexer.cc -o flex_lexer.o
flex_lexer.cc: lexer.l
flex lexer.l
%.o: %.cpp
${CC} ${LLVM_CONFIG} -std=c++11 -c $<
.PHONY: clean
clean:
rm -f *.o
rm -f *.cc
rm -f *.hh