jw-pkg/make/profiler-defs.mk

30 lines
859 B
Makefile
Raw Normal View History

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