X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fnetradiant.git;a=blobdiff_plain;f=Makefile;h=7bd232ccc2ecaf5632905af08c9cf86c79b89d49;hp=3abddbaef4a73a75be7719e89fc0e55dc96a6ea8;hb=3027648679138c3d16920211ea5b4b0215a19a8c;hpb=04397d579b012df7cadb31202303e55342737b5b diff --git a/Makefile b/Makefile index 3abddbae..7bd232cc 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ # user customizable stuf # you may override this in Makefile.conf or the environment BUILD ?= debug -# or: release +# or: release, or: extradebug, or: profile OS ?= $(shell uname) # or: Linux, Win32, Darwin LDFLAGS ?= @@ -104,6 +104,18 @@ ifeq ($(findstring $(CFLAGS),-g),) endif CPPFLAGS_COMMON += -D_DEBUG LDFLAGS_COMMON += +else ifeq ($(BUILD),profile) +ifeq ($(findstring $(CFLAGS),-g),) + CFLAGS_COMMON += -g + # only add -g if no -g flag is in $(CFLAGS) +endif +ifeq ($(findstring $(CFLAGS),-O),) + CFLAGS_COMMON += -O + # only add -O if no -O flag is in $(CFLAGS) +endif + CFLAGS_COMMON += -pg + CPPFLAGS_COMMON += + LDFLAGS_COMMON += -pg else ifeq ($(BUILD),release) ifeq ($(findstring $(CFLAGS),-O),) CFLAGS_COMMON += -O3