Try to detect if we have GCC 4.2 or higher for enabling -march=native

This commit is contained in:
Tor Arne Vestbø
2013-02-07 22:25:18 +01:00
parent fda9993aea
commit e3bc65fa6d

View File

@@ -1,7 +1,13 @@
TARGET = sparsebundlefs
PKG_CONFIG = pkg-config
CFLAGS = -Wall -O2 -march=native
CFLAGS = -Wall -O2
GCC_4_2_OR_HIGHER := $(shell expr `$(CXX) -dumpversion | sed 's/\.//g'` \>= 420)
ifeq "$(GCC_4_2_OR_HIGHER)" "1"
CFLAGS += -march=native
endif
DEFINES = -DFUSE_USE_VERSION=26
ifeq ($(shell uname), Darwin)