add support for a profiling build
git-svn-id: svn://svn.icculus.org/netradiant/trunk@92 61c419a2-8eb2-4b30-bcec-8cead039b335
This commit is contained in:
parent
d9f68dedb0
commit
9035361429
11
Makefile
11
Makefile
|
|
@ -4,7 +4,7 @@
|
||||||
# user customizable stuf
|
# user customizable stuf
|
||||||
# you may override this in Makefile.conf or the environment
|
# you may override this in Makefile.conf or the environment
|
||||||
BUILD ?= debug
|
BUILD ?= debug
|
||||||
# or: release
|
# or: release, or: extradebug, or: profile
|
||||||
OS ?= $(shell uname)
|
OS ?= $(shell uname)
|
||||||
# or: Linux, Win32, Darwin
|
# or: Linux, Win32, Darwin
|
||||||
LDFLAGS ?=
|
LDFLAGS ?=
|
||||||
|
|
@ -104,6 +104,15 @@ ifeq ($(findstring $(CFLAGS),-g),)
|
||||||
endif
|
endif
|
||||||
CPPFLAGS_COMMON += -D_DEBUG
|
CPPFLAGS_COMMON += -D_DEBUG
|
||||||
LDFLAGS_COMMON +=
|
LDFLAGS_COMMON +=
|
||||||
|
else ifeq ($(BUILD),profile)
|
||||||
|
ifeq ($(findstring $(CFLAGS),-O),)
|
||||||
|
CFLAGS_COMMON += -O
|
||||||
|
# only add -O3 if no -O flag is in $(CFLAGS)
|
||||||
|
# to allow overriding the optimizations
|
||||||
|
endif
|
||||||
|
CFLAGS_COMMON += -pg
|
||||||
|
CPPFLAGS_COMMON +=
|
||||||
|
LDFLAGS_COMMON += -pg
|
||||||
else ifeq ($(BUILD),release)
|
else ifeq ($(BUILD),release)
|
||||||
ifeq ($(findstring $(CFLAGS),-O),)
|
ifeq ($(findstring $(CFLAGS),-O),)
|
||||||
CFLAGS_COMMON += -O3
|
CFLAGS_COMMON += -O3
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user