summaryrefslogtreecommitdiff
path: root/impl/Makefile
diff options
context:
space:
mode:
authorCarlo Zancanaro <carlo@carlo-laptop>2012-05-03 15:35:39 +1000
committerCarlo Zancanaro <carlo@carlo-laptop>2012-05-03 15:35:39 +1000
commitfcecd0e7dc0bf103986c02e2f29fb518cd5571c5 (patch)
tree518bf3fcb3733bb8cc2ef584346aa409ea618a77 /impl/Makefile
parent9fd34b8cdc98ee757fc047216bd51c698cb7b82f (diff)
Add a parser for linear equations
(Also add the antlr jar and C runtime)
Diffstat (limited to 'impl/Makefile')
-rw-r--r--impl/Makefile20
1 files changed, 16 insertions, 4 deletions
diff --git a/impl/Makefile b/impl/Makefile
index 05e4a83..7df94a0 100644
--- a/impl/Makefile
+++ b/impl/Makefile
@@ -1,9 +1,21 @@
-CC=g++
+CC=gcc
+CPP=g++
BUILD=build/
-FLAGS=-Wall -Werror -g
+FLAGS=-Wall -Werror -g -lantlr3c
-all: build-dir
- $(CC) main.cpp $(FLAGS) -o $(BUILD)/main
+all: main
+
+main: build-dir grammar
+ $(CPP) main.cpp *.o -o $(BUILD)/main $(FLAGS)
+
+grammar: build-dir
+ java -jar antlr/antlr-3.4-complete.jar EquationSystem.g
+ $(CC) *.c -c -lantrl3c
build-dir:
mkdir -p $(BUILD)
+
+clean:
+ rm -rf $(BUILD)
+ rm *.o *.c *.h *.tokens
+ # antlr o, c, h and tokens files