Merge pull request #142 from JuliaLang/sf/cflags

Set optimization level only if not already overridden
This commit is contained in:
Simon Byrne 2016-08-09 09:28:35 +01:00 committed by GitHub
commit 1492ff029a

View file

@ -99,8 +99,10 @@ ifeq ($(ARCH),x86_64)
override ARCH := amd64
endif
# The optimization flag may be overriden with the environment variable CFLAGS.
CFLAGS ?= -O3
# If CFLAGS does not contain a -O optimization flag, default to -O3
ifeq ($(findstring -O,$(CFLAGS)),)
CFLAGS_add += -O3
endif
ifneq (,$(findstring MINGW,$(OS)))
override OS=WINNT