summaryrefslogtreecommitdiff
path: root/impl
diff options
context:
space:
mode:
Diffstat (limited to 'impl')
-rw-r--r--impl/Makefile16
1 files changed, 8 insertions, 8 deletions
diff --git a/impl/Makefile b/impl/Makefile
index f056d1f..ab604d9 100644
--- a/impl/Makefile
+++ b/impl/Makefile
@@ -1,31 +1,31 @@
CC=gcc
CPP=g++
-BUILD=build/
+BUILD=build
FLAGS=-Wall -Werror -Wextra -pedantic -lantlr3c -std=c++11
NORMAL_FLAGS=$(FLAGS) -g -pg
OPTIMISED_FLAGS=$(FLAGS) -O3
-all: main
+all: $(BUILD)/main
.PHONY: check-syntax
check-syntax:
-$(CPP) $(FLAGS) -o /tmp/null -x c++ $(CHK_SOURCES)
# the - is to ignore the return code.
-main: build-dir grammar
+$(BUILD)/main: $(BUILD) EquationSystemParser.o main.cpp *.hpp
$(CPP) main.cpp *.o -o $(BUILD)/main $(NORMAL_FLAGS)
-fastest-main: build-dir grammar
- $(CPP) main.cpp *.o -o $(BUILD)/main $(OPTIMISED_FLAGS)
+#fastest-main: $(BUILD) grammar
+# $(CPP) main.cpp *.o -o $(BUILD)/main $(OPTIMISED_FLAGS)
-grammar: build-dir
+EquationSystemParser.o: EquationSystem.g
java -jar ../antlr/antlr-3.4-complete.jar EquationSystem.g
$(CC) *.c -c -lantrl3c
-build-dir:
+$(BUILD):
mkdir -p $(BUILD)
-test: main
+test: $(BUILD)/main
bash ./test/run ./build/main
clean: