Add rules to control generation and use of profile data.

This commit is contained in:
Jesse D. McDonald 2009-10-24 19:48:29 -05:00
parent 9fa0a09509
commit a464397e64
1 changed files with 6 additions and 3 deletions

View File

@ -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