aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorTeddy <[email protected]>2014-03-25 04:11:54 +0800
committerTeddy <[email protected]>2014-03-25 04:11:54 +0800
commit4f90efb9a08b697b7ef270a4d2ee067dc853f251 (patch)
tree229eb348ca132a3969b1906dec90e29edd8cd06a /Makefile
parentda3bf74ba8946f88b892907361f86f567301be83 (diff)
move out the main function to a seperate file
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile10
1 files changed, 6 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 04edd68..cfb1849 100644
--- a/Makefile
+++ b/Makefile
@@ -1,17 +1,19 @@
all: cibic
run:
- ./cibic
+ ./cibic --ast
-debug:
+db:
gdb cibic
-cibic: lex.yy.o cibic.tab.o ast.o
- gcc -o cibic lex.yy.o cibic.tab.o ast.o
+cibic: lex.yy.o cibic.tab.o ast.o main.o
+ gcc -o cibic lex.yy.o cibic.tab.o ast.o main.o
lex.yy.o: lex.yy.c
gcc -c lex.yy.c
cibic.tab.o: cibic.tab.c
gcc -c cibic.tab.c
+main.o: main.c
+ gcc -c main.c -g -Wall -Wextra
ast.o: ast.c
gcc -c ast.c -g -Wall -Wextra -DCNODE_DEBUG
lex.yy.c: cibic.l