aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile14
1 files changed, 9 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 6db0c9b..4fd4faf 100644
--- a/Makefile
+++ b/Makefile
@@ -2,14 +2,18 @@ LIB_FILES = src/nodes.cc src/tree.cc src/parser.cc
PROG_FILES = main.cc
TEST_FILES = test.cc
-FLAGS = -std=c++11 -W -Wall -Wextra -pedantic
+FLAGS = -std=c++11 -W -Wall -Wextra -pedantic
+PARSER = -o bin/parser $(FLAGS) $(PROG_FILES) $(LIB_FILES)
-all: parser test
+all: dev test
-parser: $(PROG_FILES) $(LIB_FILES)
- g++ -g -o bin/parser $(FLAGS) $(PROG_FILES) $(LIB_FILES)
+dev: $(PROG_FILES) $(LIB_FILES)
+ g++ -g $(PARSER)
+
+release: $(PROG_FILES) $(LIB_FILES)
+ g++ -O3 $(PARSER)
test: $(LIB_FILES) $(TEST_FILES)
- g++ -O3 -o bin/test -lgtest $(FLAGS) $(LIB_FILES) $(TEST_FILES)
+ g++ -O3 -o bin/test -lgtest $(TEST_FILES) $(FLAGS) $(LIB_FILES)
./bin/test