]> git.sesse.net Git - stockfish/commitdiff
Added Haiku-specific changes to Makefile
authorJoseph R. Prostko <joe.prostko@gmail.com>
Mon, 30 Jul 2012 00:13:27 +0000 (00:13 +0000)
committerMarco Costalba <mcostalba@gmail.com>
Mon, 30 Jul 2012 05:29:46 +0000 (06:29 +0100)
First change: If Haiku is host platform, change
installation prefix to /boot/common/bin

Second change: Only link in pthreads if Haiku isn't
host platform.

No functional change.

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

index dea8db04675e66d26b21e4c755f91df217ae85e3..3fd601ffe20c96cee61c94c1ab9ec5e2a8aa2078 100644 (file)
 ### Section 1. General Configuration
 ### ==========================================================================
 
 ### Section 1. General Configuration
 ### ==========================================================================
 
+### Establish the operating system name
+UNAME = $(shell uname)
+
 ### Executable name
 EXE = stockfish
 
 ### Installation dir definitions
 PREFIX = /usr/local
 ### Executable name
 EXE = stockfish
 
 ### Installation dir definitions
 PREFIX = /usr/local
+# Haiku has a non-standard filesystem layout
+ifeq ($(UNAME),Haiku)
+       PREFIX=/boot/common
+endif
 BINDIR = $(PREFIX)/bin
 
 ### Built-in benchmark for pgo-builds
 BINDIR = $(PREFIX)/bin
 
 ### Built-in benchmark for pgo-builds
@@ -229,7 +236,10 @@ LDFLAGS = $(EXTRALDFLAGS)
 
 ### On mingw use Windows threads, otherwise POSIX
 ifneq ($(comp),mingw)
 
 ### On mingw use Windows threads, otherwise POSIX
 ifneq ($(comp),mingw)
-       LDFLAGS += -lpthread
+       # Haiku has pthreads in its libroot, so only link it in on other platforms
+       ifneq ($(UNAME),Haiku)
+               LDFLAGS += -lpthread
+       endif
 endif
 
 ifeq ($(os),osx)
 endif
 
 ifeq ($(os),osx)