From: Rudolf Polzer Date: Fri, 13 Sep 2013 10:48:56 +0000 (+0200) Subject: BUILD=native X-Git-Tag: xonotic-v0.8.0~6 X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fnetradiant.git;a=commitdiff_plain;h=f0df907b1936808bd7102f8432dd08bd79cee623 BUILD=native --- diff --git a/Makefile b/Makefile index debc2e4b..9eee1212 100644 --- a/Makefile +++ b/Makefile @@ -155,17 +155,27 @@ ifeq ($(BUILD),release) ifeq ($(findstring $(CFLAGS),-O),) CFLAGS_COMMON += -O3 # only add -O3 if no -O flag is in $(CFLAGS) - # to allow overriding the optimizations endif CPPFLAGS_COMMON += LDFLAGS_COMMON += -s else +ifeq ($(BUILD),native) +ifeq ($(findstring $(CFLAGS),-O),) + CFLAGS_COMMON += -O3 + # only add -O3 if no -O flag is in $(CFLAGS) +endif + CFLAGS_COMMON += -march=native -mcpu=native + CPPFLAGS_COMMON += + LDFLAGS_COMMON += -s +else + $(error Unsupported build type: $(BUILD)) endif endif endif endif +endif INSTALLDIR_BASE := $(INSTALLDIR)