]> git.sesse.net Git - stockfish/blobdiff - src/Makefile
Remove last platform specific code form thread.cpp
[stockfish] / src / Makefile
index 623c20bbadcb954807f6593a9d06384c582e966f..a435066515d947e14d388058a053f6f3d1baa16b 100644 (file)
@@ -243,7 +243,12 @@ ifeq ($(os),osx)
 endif
 
 ### 3.3 General linker settings
-LDFLAGS = -lpthread $(EXTRALDFLAGS)
+LDFLAGS = $(EXTRALDFLAGS)
+
+### On mingw use Windows threads, otherwise POSIX
+ifneq ($(comp),mingw)
+       LDFLAGS += -lpthread
+endif
 
 ifeq ($(os),osx)
        LDFLAGS += -arch $(arch)
@@ -319,7 +324,7 @@ ifeq ($(comp),gcc)
        GCC_MINOR := `$(CXX) -dumpversion | cut -f2 -d.`
        ifeq (1,$(shell expr \( $(GCC_MAJOR) \> 4 \) \| \( $(GCC_MAJOR) \= 4 \& $(GCC_MINOR) \>= 5 \)))
                CXXFLAGS += -flto
-               LDFLAGS += -flto
+               LDFLAGS += $(CXXFLAGS)
        endif
 endif