From 17b3e6c1a676c036de973c325817f07de063a0a5 Mon Sep 17 00:00:00 2001 From: Jeff Johnston Date: Thu, 3 Sep 2020 18:24:21 -0400 Subject: [PATCH] Bug 566658 - [build] Core Make project does not support profiling - fix Core Make Makefile template to add one for linuxtools build mode which is used for Linux Tools profiling - fix the error default to change tab indent to spaces so make won't treat error message as recipe - add some default profiling flags for gcov and gprof support when Linux Tools profiling Change-Id: I29c2247c9e2b00a4e1c1952198faf881abd7a66a --- build/org.eclipse.cdt.make.core/templates/simple/Makefile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/build/org.eclipse.cdt.make.core/templates/simple/Makefile b/build/org.eclipse.cdt.make.core/templates/simple/Makefile index 7fe5793f75b..f1d2266445a 100644 --- a/build/org.eclipse.cdt.make.core/templates/simple/Makefile +++ b/build/org.eclipse.cdt.make.core/templates/simple/Makefile @@ -6,14 +6,17 @@ ifeq ($(BUILD_MODE),debug) CFLAGS += -g else ifeq ($(BUILD_MODE),run) CFLAGS += -O2 +else ifeq ($(BUILD_MODE),linuxtools) + CFLAGS += -g -pg -fprofile-arcs -ftest-coverage + LDFLAGS += -pg -fprofile-arcs -ftest-coverage else - $(error Build mode $(BUILD_MODE) not supported by this Makefile) + $(error Build mode $(BUILD_MODE) not supported by this Makefile) endif all: ${projectName} ${projectName}: $(OBJS) - $(CXX) -o $@ $^ + $(CXX) $(LDFLAGS) -o $@ $^ %.o: $(PROJECT_ROOT)%.cpp $(CXX) -c $(CFLAGS) $(CXXFLAGS) $(CPPFLAGS) -o $@ $<