aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorTeddy <[email protected]>2014-03-24 12:40:12 +0800
committerTeddy <[email protected]>2014-03-24 12:40:12 +0800
commitccab148f1310b3cadffb99005941e39fa932d295 (patch)
tree114ec338d11d7d691769138defafe9570d1caa5f /Makefile
parent4edd0c4745ed0683867b116dc8ac33c65bf0b99a (diff)
AST construction for expressions
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile12
1 files changed, 9 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index b6eeb33..4cf057a 100644
--- a/Makefile
+++ b/Makefile
@@ -3,12 +3,18 @@ all: cibic
run:
./cibic
-cibic: lex.yy.c cibic.tab.c
- gcc -o cibic lex.yy.c cibic.tab.c
+cibic: lex.yy.o cibic.tab.o ast.o
+ gcc -o cibic lex.yy.o cibic.tab.o ast.o
+lex.yy.o: lex.yy.c
+ gcc -c lex.yy.c
+cibic.tab.o: cibic.tab.c
+ gcc -c cibic.tab.c
+ast.o: ast.c
+ gcc -c ast.c -g
lex.yy.c: cibic.l
flex cibic.l
cibic.tab.c: cibic.y
bison -d cibic.y
clean:
- rm -f cibic lex.yy.c cibic.tab.c
+ rm -f cibic lex.yy.c cibic.tab.c *.o