Skip to main content
summaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
Diffstat (limited to 'build')
-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 404907713d5..8214dabe9d1 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