From 675e8972384e808f2b622922df5e8deef418e165 Mon Sep 17 00:00:00 2001 From: tomsmeding Date: Fri, 22 May 2015 21:12:45 +0200 Subject: Debug branch in Makefile --- Makefile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index acef217..35ec6a2 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,9 @@ -CXXFLAGS = -Wall -O2 -std=c++11 +CXXFLAGS_BASE = -Wall -std=c++11 +ifdef DEBUG + CXXFLAGS = $(CXXFLAGS_BASE) -g +else + CXXFLAGS = $(CXXFLAGS_BASE) -O2 +endif CXX = g++ BINARIES = engine @@ -17,7 +22,9 @@ remake: clean all engine: $(OBJ_FILES) $(CXX) $(CXXFLAGS) -o $@ $(OBJ_FILES) +ifndef DEBUG strip $@ +endif %.o: %.cpp %.h $(CXX) $(CXXFLAGS) -c -o $*.o $*.cpp -- cgit v1.2.3-54-g00ecf