From a464397e64369c0ad0715216cb38ceb3f99bca42 Mon Sep 17 00:00:00 2001 From: Jesse McDonald Date: Sat, 24 Oct 2009 19:48:29 -0500 Subject: [PATCH] Add rules to control generation and use of profile data. --- Makefile | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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