Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'build/org.eclipse.cdt.make.core/templates/simple/Makefile')
-rw-r--r--build/org.eclipse.cdt.make.core/templates/simple/Makefile6
1 files changed, 5 insertions, 1 deletions
diff --git a/build/org.eclipse.cdt.make.core/templates/simple/Makefile b/build/org.eclipse.cdt.make.core/templates/simple/Makefile
index 404907713d..8214dabe9d 100644
--- a/build/org.eclipse.cdt.make.core/templates/simple/Makefile
+++ b/build/org.eclipse.cdt.make.core/templates/simple/Makefile
@@ -2,13 +2,17 @@ PROJECT_ROOT = $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
OBJS = ${projectName}.o
+ifeq ($(BUILD_MODE),debug)
+ CFLAGS += -g
+endif
+
all: ${projectName}
${projectName}: $(OBJS)
$(CXX) -o $@ $^
%.o: $(PROJECT_ROOT)%.cpp
- $(CXX) -c $(CFLAGS) $(CPPFLAGS) -o $@ $<
+ $(CXX) -c $(CFLAGS) $(CXXFLAGS) $(CPPFLAGS) -o $@ $<
%.o: $(PROJECT_ROOT)%.c
$(CC) -c $(CFLAGS) $(CPPFLAGS) -o $@ $<

Back to the top