mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-22 06:02:11 +02:00
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
This commit is contained in:
parent
c378a6747a
commit
17b3e6c1a6
1 changed files with 5 additions and 2 deletions
|
@ -6,6 +6,9 @@ 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)
|
||||
endif
|
||||
|
@ -13,7 +16,7 @@ endif
|
|||
all: ${projectName}
|
||||
|
||||
${projectName}: $(OBJS)
|
||||
$(CXX) -o $@ $^
|
||||
$(CXX) $(LDFLAGS) -o $@ $^
|
||||
|
||||
%.o: $(PROJECT_ROOT)%.cpp
|
||||
$(CXX) -c $(CFLAGS) $(CXXFLAGS) $(CPPFLAGS) -o $@ $<
|
||||
|
|
Loading…
Add table
Reference in a new issue