aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
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