Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDoug Schaefer2017-11-20 15:09:26 -0500
committerDoug Schaefer2017-11-20 15:55:39 -0500
commita90655bc049f296b3e661e6aabd4ffe6bc6dd98d (patch)
tree348033258cf4f2dc690404a8ccc1d715163392bd /build/org.eclipse.cdt.make.core
parentdc4be72b1ae13020fcbd8dbb46f8c6f9b9eb973b (diff)
downloadorg.eclipse.cdt-a90655bc049f296b3e661e6aabd4ffe6bc6dd98d.tar.gz
org.eclipse.cdt-a90655bc049f296b3e661e6aabd4ffe6bc6dd98d.tar.xz
org.eclipse.cdt-a90655bc049f296b3e661e6aabd4ffe6bc6dd98d.zip
Set CC and CXX variables to toolchain compileCommands in std build.
Also set BUILD_MODE to the launch mode so the makefile can do different things based on the mode. Change template to add -g option for debug. Also fix a deadlock I detected due to side affect build folder creation. Change-Id: Ic7b13ba3238e6ef201cccb1b2bfc8dcc6956ea3a
Diffstat (limited to 'build/org.eclipse.cdt.make.core')
-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