From fcecd0e7dc0bf103986c02e2f29fb518cd5571c5 Mon Sep 17 00:00:00 2001 From: Carlo Zancanaro Date: Thu, 3 May 2012 15:35:39 +1000 Subject: Add a parser for linear equations (Also add the antlr jar and C runtime) --- impl/Makefile | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'impl/Makefile') 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 -- cgit v1.2.3