aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorPjotr Prins2021-08-16 10:55:32 +0200
committerPjotr Prins2021-08-16 10:55:32 +0200
commit42de3667c90964206c3764be1867527d8eeb8cfc (patch)
tree8c9f857a185581ee0628406ede082df17915171b /Makefile
parent81c7036c05215359478140d9f7585dcb7d20e66b (diff)
downloadpangemma-42de3667c90964206c3764be1867527d8eeb8cfc.tar.gz
Adding profiler support
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile6
1 files changed, 4 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 0cf3097..fd0e55b 100644
--- a/Makefile
+++ b/Makefile
@@ -143,7 +143,7 @@ endif
debug check fast-check: CPPFLAGS += -g $(GCC_FLAGS) $(GSL_INCLUDE_PATH) -Icontrib/catch-1.9.7 -Isrc
-profile: CPPFLAGS += -pg
+profile: CPPFLAGS += -g $(GCC_FLAGS) $(GSL_INCLUDE_PATH) -Icontrib/catch-1.9.7 -Isrc
release: CPPFLAGS += -DNDEBUG -O3 $(GCC_FLAGS) $(GSL_INCLUDE_PATH) -Icontrib/catch-1.9.7 -Isrc
@@ -181,6 +181,8 @@ ifdef EXTRA_FLAGS
LIBS += $(EXTRA_FLAGS)
endif
+profile: LIBS += -Wl,--no-as-needed -lprofiler -Wl,--as-needed
+
.PHONY: all test
OUTPUT = $(BIN_DIR)/gemma
@@ -213,7 +215,7 @@ release: $(OUTPUT)
static: $(OUTPUT)
-debug: $(OUTPUT)
+debug profile: $(OUTPUT)
./src/version.h: ./VERSION
$(shell bash $(VGEN) $(GUIX_PROFILE) > src/version.h)