Skip to content

Commit

Permalink
CBS Makefile template cleanup.
Browse files Browse the repository at this point in the history
Removed BUILD_MODE="linuxtools". There is no launch mode "linuxtools".

Added -O0 to BUILD_MODE=debug.
  • Loading branch information
ewaterlander committed Jan 17, 2025
1 parent 3439e0e commit 491971b
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions build/org.eclipse.cdt.make.core/templates/simple/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,9 @@ PROJECT_ROOT = $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
OBJS = ${projectName}.o

ifeq ($(BUILD_MODE),debug)
CFLAGS += -g
CFLAGS += -g -O0
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
EXTRA_CLEAN += ${projectName}.gcda ${projectName}.gcno $(PROJECT_ROOT)gmon.out
EXTRA_CMDS = rm -rf ${projectName}.gcda
else
$(error Build mode $(BUILD_MODE) not supported by this Makefile)
endif
Expand All @@ -19,7 +14,6 @@ all: ${projectName}

${projectName}: $(OBJS)
$(CXX) $(LDFLAGS) -o $@ $^
$(EXTRA_CMDS)

%.o: $(PROJECT_ROOT)%.cpp
$(CXX) -c $(CFLAGS) $(CXXFLAGS) $(CPPFLAGS) -o $@ $<
Expand All @@ -28,4 +22,4 @@ ${projectName}: $(OBJS)
$(CC) -c $(CFLAGS) $(CPPFLAGS) -o $@ $<

clean:
rm -fr ${projectName} $(OBJS) $(EXTRA_CLEAN)
rm -fr ${projectName} $(OBJS)

0 comments on commit 491971b

Please sign in to comment.