]> de.git.xonotic.org Git - xonotic/netradiant.git/commitdiff
BUILD=native
authorRudolf Polzer <divverent@xonotic.org>
Fri, 13 Sep 2013 10:48:56 +0000 (12:48 +0200)
committerRudolf Polzer <divverent@xonotic.org>
Fri, 13 Sep 2013 10:48:56 +0000 (12:48 +0200)
Makefile

index debc2e4b8d2495e00290bf8792166d1abab14e02..9eee12128f465bbbc5945ae2e63f1f3fa7ce379e 100644 (file)
--- 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)