]> git.sesse.net Git - stockfish/blobdiff - src/Makefile
Fix fallouts from previous patch
[stockfish] / src / Makefile
index 3fd601ffe20c96cee61c94c1ab9ec5e2a8aa2078..8c2c6a7028392642c5156cd92ee4329c72b4b899 100644 (file)
@@ -175,6 +175,7 @@ endif
 ifeq ($(COMP),mingw)
        comp=mingw
        CXX=g++
+       prefetch = yes
        profile_prepare = gcc-profile-prepare
        profile_make = gcc-profile-make
        profile_use = gcc-profile-use
@@ -184,6 +185,7 @@ endif
 ifeq ($(COMP),gcc)
        comp=gcc
        CXX=g++
+       prefetch = yes
        profile_prepare = gcc-profile-prepare
        profile_make = gcc-profile-make
        profile_use = gcc-profile-use
@@ -202,6 +204,7 @@ endif
 ifeq ($(COMP),clang)
        comp=clang
        CXX=clang++
+       prefetch = yes
        profile_prepare = gcc-profile-prepare
        profile_make = gcc-profile-make
        profile_use = gcc-profile-use
@@ -321,11 +324,13 @@ endif
 ### This is a mix of compile and link time options because the lto link phase
 ### needs access to the optimization flags.
 ifeq ($(comp),gcc)
-       GCC_MAJOR := `$(CXX) -dumpversion | cut -f1 -d.`
-       GCC_MINOR := `$(CXX) -dumpversion | cut -f2 -d.`
-       ifeq (1,$(shell expr \( $(GCC_MAJOR) \> 4 \) \| \( $(GCC_MAJOR) \= 4 \& $(GCC_MINOR) \>= 5 \)))
-               CXXFLAGS += -flto
-               LDFLAGS += $(CXXFLAGS)
+       ifeq ($(optimize),yes)
+               GCC_MAJOR := `$(CXX) -dumpversion | cut -f1 -d.`
+               GCC_MINOR := `$(CXX) -dumpversion | cut -f2 -d.`
+               ifeq (1,$(shell expr \( $(GCC_MAJOR) \> 4 \) \| \( $(GCC_MAJOR) \= 4 \& $(GCC_MINOR) \>= 5 \)))
+                       CXXFLAGS += -flto
+                       LDFLAGS += $(CXXFLAGS)
+               endif
        endif
 endif