X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2FMakefile;h=3fd601ffe20c96cee61c94c1ab9ec5e2a8aa2078;hp=dea8db04675e66d26b21e4c755f91df217ae85e3;hb=b61ec33f2277d2ac699b56f6560786e68e85c2de;hpb=1f7b5d9a79e5977ec1be42d7b67444d3cb7e33da diff --git a/src/Makefile b/src/Makefile index dea8db04..3fd601ff 100644 --- a/src/Makefile +++ b/src/Makefile @@ -20,11 +20,18 @@ ### Section 1. General Configuration ### ========================================================================== +### Establish the operating system name +UNAME = $(shell uname) + ### 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 @@ -229,7 +236,10 @@ LDFLAGS = $(EXTRALDFLAGS) ### 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)