1
0
Fork 0
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:
Jeff Johnston 2020-09-03 18:24:21 -04:00
parent c378a6747a
commit 17b3e6c1a6

View file

@ -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 $@ $<