Added the faster but unportable native_release configuration

This commit is contained in:
Lior Halphon 2017-02-24 18:35:31 +02:00
parent 371b575d2e
commit ce05b5f7f0
2 changed files with 9 additions and 3 deletions

View File

@ -34,6 +34,12 @@ else
MKDIR := mkdir
endif
ifeq ($(CONF),native_release)
override CONF := release
LDFLAGS += -march=native -mtune=native
CFLAGS += -march=native -mtune=native
endif
# Set compilation and linkage flags based on target, platform and configuration
CFLAGS += -Werror -Wall -std=gnu11 -ICore -D_GNU_SOURCE -DVERSION="$(VERSION)" -I. -D_USE_MATH_DEFINES
@ -70,7 +76,7 @@ LDFLAGS += -flto
CFLAGS += -flto
endif
else
$(error Invalid value for CONF: $(CONF). Use "debug" or "release")
$(error Invalid value for CONF: $(CONF). Use "debug", "release" or "native_release")
endif
# Define our targets

View File

@ -46,6 +46,6 @@ On Windows, SameBoy also requires:
* [GnuWin](http://gnuwin32.sourceforge.net/)
* Running vcvars32 before running make. Make sure all required tools and libraries are in %PATH% and %lib%, repsectively.
To compile, simply run `make`. The targets are cocoa (Default for OS X), sdl (Default for everything else), bootroms and tester. You may also specify CONF=debug (default) or CONF=release to control optimization and symbols, and specify BOOTROMS_DIR=... to a directory containing precompiled dmg_boot.bin and cgb_boot.bin files, otherwise the build system will compile and use SameBoy's own boot ROMs.
To compile, simply run `make`. The targets are cocoa (Default for OS X), sdl (Default for everything else), bootroms and tester. You may also specify CONF=debug (default), CONF=release or CONF=native_release to control optimization and symbols. native_release is faster than release, but is optimized to the host's CPU and therefore is not portable. You may set BOOTROMS_DIR=... to a directory containing precompiled dmg_boot.bin and cgb_boot.bin files, otherwise the build system will compile and use SameBoy's own boot ROMs.
SameBoy was compiled and tested on OS X, Ubuntu and Windows 7 32-bit.
SameBoy was compiled and tested on macOS, Ubuntu and 32-bit Windows 7.