add BUILD_NATIVE option to the makefiles. This will squeeze a bit more out of gcc when optimising for your machine. Only really useful for people doing their own builds but it does seem to make a difference on my machine at least
This commit is contained in:
parent
95973d12ad
commit
5f1819939b
3
makefile
3
makefile
|
@ -24,6 +24,9 @@ UNICODE = 1
|
|||
# Include x86 Assembly routines
|
||||
BUILD_X86_ASM = 1
|
||||
|
||||
# Include GCC optmisations for your CPU e.g use -march=native. WARNING: This might mean that the generated binaries will not run on other peoples (older) machines!
|
||||
#BUILD_NATIVE = 1
|
||||
|
||||
# Build for x64 targets (MinGW64 and MSVC only, this will undefine BUILD_A68K and BUILD_X86_ASM)
|
||||
#BUILD_X64_EXE = 1
|
||||
|
||||
|
|
|
@ -270,6 +270,12 @@ ifdef BUILD_X86_ASM
|
|||
CXXFLAGS += -mmmx
|
||||
endif
|
||||
|
||||
ifdef BUILD_NATIVE
|
||||
CFLAGS += -march=native -mtune=native
|
||||
CXXFLAGS += -march=native -mtune=native
|
||||
endif
|
||||
|
||||
|
||||
# For zlib
|
||||
DEF := $(DEF) -DNO_VIZ -D_LARGEFILE64_SOURCE=0 -D_FILE_OFFSET_BITS=32
|
||||
|
||||
|
|
|
@ -379,6 +379,11 @@ ifdef BUILD_X86_ASM
|
|||
CXXFLAGS += -mmmx
|
||||
endif
|
||||
|
||||
ifdef BUILD_NATIVE
|
||||
CFLAGS += -march=native -mtune=native
|
||||
CXXFLAGS += -march=native -mtune=native
|
||||
endif
|
||||
|
||||
# For zlib
|
||||
DEF := $(DEF) -DNO_VIZ -D_LARGEFILE64_SOURCE=0 -D_FILE_OFFSET_BITS=32
|
||||
|
||||
|
|
|
@ -256,6 +256,11 @@ else
|
|||
LDFLAGS += -s
|
||||
endif
|
||||
|
||||
ifdef BUILD_NATIVE
|
||||
CFLAGS += -march=native -mtune=native
|
||||
CXXFLAGS += -march=native -mtune=native
|
||||
endif
|
||||
|
||||
# For zlib
|
||||
DEF := $(DEF) -DNO_VIZ -D_LARGEFILE64_SOURCE=0 -D_FILE_OFFSET_BITS=32
|
||||
|
||||
|
|
|
@ -277,6 +277,11 @@ else
|
|||
LDFLAGS += -s
|
||||
endif
|
||||
|
||||
ifdef BUILD_NATIVE
|
||||
CFLAGS += -march=native -mtune=native
|
||||
CXXFLAGS += -march=native -mtune=native
|
||||
endif
|
||||
|
||||
# For zlib
|
||||
DEF := $(DEF) -DNO_VIZ -D_LARGEFILE64_SOURCE=0 -D_FILE_OFFSET_BITS=32
|
||||
|
||||
|
|
Loading…
Reference in New Issue