summaryrefslogtreecommitdiff
path: root/impl/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'impl/Makefile')
-rw-r--r--impl/Makefile9
1 files changed, 6 insertions, 3 deletions
diff --git a/impl/Makefile b/impl/Makefile
index 492528d..831857d 100644
--- a/impl/Makefile
+++ b/impl/Makefile
@@ -2,8 +2,8 @@ CC=gcc
CPP=g++
BUILD=build
PARSER=parser
-FLAGS= -lantlr3c -fno-exceptions -lrt
-#-Wall -Werror -Wextra -pedantic -lantlr3c -fno-exceptions -lrt
+CHECKER_FLAGS=-Wall -Werror -Wextra -pedantic
+FLAGS=-lantlr3c -fno-exceptions -lrt $(CHECKER_FLAGS)
NORMAL_FLAGS=$(FLAGS) -g -pg
OPTIMISED_FLAGS=$(FLAGS) -O3
@@ -14,12 +14,15 @@ fast: $(BUILD)/fast
.PHONY: check-syntax
check-syntax: $(PARSER)
- -$(CPP) $(FLAGS) -o /tmp/null -x c++ $(CHK_SOURCES)
+ -$(CPP) $(CHECKER_FLAGS) -o /tmp/null -x c++ $(CHK_SOURCES)
# the - is to ignore the return code.
$(BUILD)/main: $(BUILD) $(PARSER) main.o MCFSimplex.o
$(CPP) main.o MCFSimplex.o $(PARSER)/*.o -o $(BUILD)/main $(NORMAL_FLAGS)
+$(BUILD)/fast: $(BUILD) $(PARSER) main.o MCFSimplex.o
+ $(CPP) main.o MCFSimplex.o $(PARSER)/*.o -o $(BUILD)/fast $(OPTIMISED_FLAGS)
+
main.o: main.cpp *.hpp *.h
$(CPP) -c main.cpp $(NORMAL_FLAGS)