jw-pkg/make/profiler-defs.mk
Jan Lindemann 49f269bdfe make: Modify only BUILD_*FLAGS in jw-build/make/*.mk
Assign only to BUILD_XXXFLAGS in jw-build/make/*.mk, and leave PROJECT_XXXFLAGS
and LOCAL_XXXFLAGS alone.

Signed-off-by: Jan Lindemann <jan@janware.com>
2019-04-10 06:43:40 +00:00

30 lines
859 B
Makefile

all:
clean:
PROF_EXE_PATH ?= $(EXE_PATH)
CALLGRIND_OUT ?= callgrind.out
OPROF_OUT_DIR ?= oprofile-data
ifeq ($(USE_GPROF),true)
BUILD_CXXFLAGS += -pg
BUILD_CFLAGS += -pg
BUILD_LDFLAGS += -pg
clean: clean.gprof
endif
ifeq ($(COMPILER_SUITE),gcc)
ifeq ($(USE_GCOV),true)
BUILD_CXXFLAGS += -fprofile-arcs -ftest-coverage
BUILD_CFLAGS += -fprofile-arcs -ftest-coverage
BUILD_LDFLAGS += -fprofile-arcs -ftest-coverage
clean: clean.gcov
endif
endif
ifeq ($(COMPILER_SUITE),clang)
ifeq ($(USE_XRAY),true)
BUILD_CXXFLAGS += -fxray-instrument -fxray-instruction-threshold=1
BUILD_CFLAGS += -fxray-instrument -fxray-instruction-threshold=1
#BUILD_LDFLAGS += -fxray-instrument
endif
endif