From 8709f9128b1e2d843b5a65e922e04b1316fcef45 Mon Sep 17 00:00:00 2001 From: Cyrill Gorcunov Date: Wed, 4 May 2016 14:56:00 +0300 Subject: [PATCH] build: Add ability to generate gprof output Suitable for profiling. We've had this before 2.0. As earlier, pie code is not profiled as well as syscalls library. So simply build as "make GMON=1". Signed-off-by: Cyrill Gorcunov Reviewed-by: Dmitry Safonov Signed-off-by: Pavel Emelyanov --- Makefile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Makefile b/Makefile index 059af3a37..037d38fc8 100644 --- a/Makefile +++ b/Makefile @@ -101,6 +101,12 @@ else CFLAGS += -O2 -g endif +ifeq ($(GMON),1) + CFLAGS += -pg + GMONLDOPT += -pg +export GMON GMONLDOPT +endif + CFLAGS += $(WARNINGS) $(DEFINES) #