summaryrefslogtreecommitdiff
path: root/impl/Makefile
diff options
context:
space:
mode:
authorCarlo Zancanaro <carlo@pc-4w14-0.cs.usyd.edu.au>2012-11-09 16:39:12 +1100
committerCarlo Zancanaro <carlo@pc-4w14-0.cs.usyd.edu.au>2012-11-09 16:39:12 +1100
commit9710d8c7a3307fd9477fb426ea1bab7804c6ef37 (patch)
treeb6e1462e3d3b0ed414edafc2242e01822ceb22cd /impl/Makefile
parentb19bd8d8a41664328f33c9b459b2b0100f0b303f (diff)
A bunch of changes to make it build nicer
In particular: - fix up the MCF sovler to get rid of all the warnings/errors - make the build with Wall and Werror and whatnot again
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)