Commits

ecsv committed acc6c59

Set changeable default compiler optimization option

Comments (0)

Files changed (1)

projects/unix/Makefile

 endif
 
 # base CFLAGS, LDLIBS, and LDFLAGS
-CFLAGS += -Wall -ffast-math -msse -fno-strict-aliasing -fvisibility=hidden -I../../src -I../../src/wrapper -DGCC
+OPTFLAGS ?= -O3
+CFLAGS += $(OPTFLAGS) -Wall -ffast-math -msse -fno-strict-aliasing -fvisibility=hidden -I../../src -I../../src/wrapper -DGCC
 CXXFLAGS += -fvisibility-inlines-hidden
 LDFLAGS += $(SHARED)
 
 	@echo "    BITS=32       == build 32-bit binaries on 64-bit machine"
 	@echo "    NO_ASM=1      == build without inline assembly code (x86 MMX/SSE)"
 	@echo "    APIDIR=path   == path to find Mupen64Plus Core headers"
+	@echo "    OPTFLAGS=flag == compiler optimization (default: -O3)"
 	@echo "  Install Options:"
 	@echo "    PREFIX=path   == install/uninstall prefix (default: /usr/local)"
 	@echo "    SHAREDIR=path == path to install shared data files (default: PREFIX/share/mupen64plus)"