From d48b6c3c77d33fab43a2816b218e7f03cbf58d0e Mon Sep 17 00:00:00 2001 From: Pedro Date: Fri, 31 Oct 2014 18:49:20 +0100 Subject: [PATCH] added build goal to makefile --- src/.gitignore | 1 + src/Makefile | 14 ++++++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/.gitignore b/src/.gitignore index 2edda76..d21e6e3 100644 --- a/src/.gitignore +++ b/src/.gitignore @@ -1,3 +1,4 @@ +build/ flex_lexer.c* flex_lexer.h bison_parser.c* diff --git a/src/Makefile b/src/Makefile index 09f57ca..fd54de5 100644 --- a/src/Makefile +++ b/src/Makefile @@ -16,17 +16,27 @@ CC = g++ CFLAGS = -g -O3 -Ilib/ -I./ -I$(PARSER)/ -std=c++11 -pthread -tests: $(LIB_FILES) $(TESTS_MAIN) - $(CC) $(CFLAGS) $(LIB_FILES) $(TESTS_MAIN) -o $(TESTS_BIN) +# release build is always using bison +build: clean + make -C bison + mkdir build/ + cp lib/* build/ + cp bison/*.h build/ + cp bison/*.cpp build/ execution: $(LIB_FILES) $(EXECUTION_MAIN) $(CC) $(CFLAGS) $(LIB_FILES) $(EXECUTION_MAIN) -o $(EXECUTION_BIN) +tests: $(LIB_FILES) $(TESTS_MAIN) + $(CC) $(CFLAGS) $(LIB_FILES) $(TESTS_MAIN) -o $(TESTS_BIN) + + bison/bison_parser.cpp: make -C bison/ + lemon/lemon_parser.cpp: make -C lemon/