diff --git a/Makefile b/Makefile index 198b3a8..4885988 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,13 @@ -CFLAGS = -std=c99 -O2 -DNDEBUG -fprofile-generate +CFLAGS = -std=c99 -O2 -DNDEBUG all: gc - .PHONY: all clean -ifneq (,$(wildcard *.gcda *.gcno)) +ifneq ($(PROFILE),no) +CFLAGS += -fprofile-generate +endif + +ifneq (,$(wildcard *.gcda)) CFLAGS += -fprofile-use dummy := $(shell rm -f gc) endif