summaryrefslogtreecommitdiff
path: root/impl/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'impl/Makefile')
-rw-r--r--impl/Makefile17
1 files changed, 11 insertions, 6 deletions
diff --git a/impl/Makefile b/impl/Makefile
index ca0b37d..492528d 100644
--- a/impl/Makefile
+++ b/impl/Makefile
@@ -2,7 +2,8 @@ CC=gcc
CPP=g++
BUILD=build
PARSER=parser
-FLAGS=-Wall -Werror -Wextra -pedantic -lantlr3c -fno-exceptions -lrt
+FLAGS= -lantlr3c -fno-exceptions -lrt
+#-Wall -Werror -Wextra -pedantic -lantlr3c -fno-exceptions -lrt
NORMAL_FLAGS=$(FLAGS) -g -pg
OPTIMISED_FLAGS=$(FLAGS) -O3
@@ -16,16 +17,19 @@ check-syntax: $(PARSER)
-$(CPP) $(FLAGS) -o /tmp/null -x c++ $(CHK_SOURCES)
# the - is to ignore the return code.
-$(BUILD)/main: $(BUILD) $(PARSER) main.cpp *.hpp
- $(CPP) main.cpp $(PARSER)/*.o -o $(BUILD)/main $(NORMAL_FLAGS)
+$(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.cpp *.hpp
- $(CPP) main.cpp $(PARSER)/*.o -o $(BUILD)/fast $(OPTIMISED_FLAGS)
+main.o: main.cpp *.hpp *.h
+ $(CPP) -c main.cpp $(NORMAL_FLAGS)
+
+MCFSimplex.o: MCFSimplex.cpp *.h
+ $(CPP) -c MCFSimplex.cpp $(NORMAL_FLAGS)
$(PARSER): EquationSystem.g
mkdir -p $(PARSER)
java -jar ../antlr/antlr-3.4-complete.jar -o $(PARSER) EquationSystem.g
- cd $(PARSER); $(CC) *.c -c -lantrl3c
+ cd $(PARSER); $(CC) *.c -c -lantlr3c
$(BUILD):
mkdir -p $(BUILD)
@@ -37,3 +41,4 @@ test: $(BUILD)/main
clean:
rm -rf $(BUILD)
rm -rf $(PARSER)
+ rm -rf *.o