X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2FMakefile;h=3fd601ffe20c96cee61c94c1ab9ec5e2a8aa2078;hp=2a03492fa863b6e2fdd5984026a873c8cd24c86e;hb=fde0b9e701a6bfac05e56f6bffdc29943be56120;hpb=7b4aa1070882cba085c9d6ed03d934734c395fe5 diff --git a/src/Makefile b/src/Makefile index 2a03492f..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) @@ -270,7 +280,8 @@ ifeq ($(optimize),yes) endif ifeq ($(comp),clang) - CXXFLAGS += -O4 + ### -O4 requires a linker that supports LLVM's LTO + CXXFLAGS += -O3 ifeq ($(os),osx) ifeq ($(arch),i386)