]> git.sesse.net Git - stockfish/commitdiff
Do not require -lpthread when linking in mingw
authorMarco Costalba <mcostalba@gmail.com>
Fri, 27 Jan 2012 18:41:12 +0000 (19:41 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Fri, 27 Jan 2012 18:41:24 +0000 (19:41 +0100)
With this we should compeltely remove the need
of installing third party POSIX threads library
when compiling with mingw-gcc under Windows.

Spotted by Trung Tu.

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
src/Makefile

index b4ecee324fe9d716f2e0a249bfac35ef083492b5..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)