X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2FMakefile;h=860b146a4fbe88a6a6aab515da073e6d6b153f9e;hp=8658425d3cb67433300f9d769bb628942396020a;hb=45b0aea875860e9f0fe2d0435ee6163906639194;hpb=9518cc3254972ca174a028487d9fe39241101e93 diff --git a/src/Makefile b/src/Makefile index 8658425d..860b146a 100644 --- a/src/Makefile +++ b/src/Makefile @@ -263,9 +263,12 @@ endif ### On mingw use Windows threads, otherwise POSIX ifneq ($(comp),mingw) - # Haiku has pthreads in its libroot, so only link it in on other platforms - ifneq ($(UNAME),Haiku) - LDFLAGS += -lpthread + # On Android Bionic's C library comes with its own pthread implementation bundled in + ifneq ($(arch),armv7) + # Haiku has pthreads in its libroot, so only link it in on other platforms + ifneq ($(UNAME),Haiku) + LDFLAGS += -lpthread + endif endif endif @@ -277,7 +280,7 @@ endif ifeq ($(debug),no) CXXFLAGS += -DNDEBUG else - CXXFLAGS += -g + CXXFLAGS += -g endif ### 3.5 Optimization @@ -296,7 +299,7 @@ ifeq ($(optimize),yes) endif ifeq ($(arch),armv7) - CXXFLAGS += -fno-gcse + CXXFLAGS += -fno-gcse -mthumb -march=armv7-a -mfloat-abi=softfp endif endif @@ -446,12 +449,12 @@ profile-build: embed-signature: @echo "Running benchmark for getting the signature ..." - @$(SIGNBENCH) 2>&1 | grep 'Nodes searched' | grep -o ": .*" | tr -d ': ' > sign.txt - @sed -i -e 's,^,/static const string Version/s/"\\(.*\\)"/"sig-,1' -e 's,$$,"/1,1' sign.txt - @sed -i -f sign.txt misc.cpp + @$(SIGNBENCH) 2>&1 | sed -n 's/Nodes searched : \(.*\)/\/string Version\/s\/"\\(.*\\)"\/"sig-\1"\//p' > sign.txt + @sed -f sign.txt misc.cpp > misc2.cpp + @mv misc2.cpp misc.cpp @rm sign.txt -signature-build: build embed-signature +signature-build: build embed-signature $(MAKE) ARCH=$(ARCH) COMP=$(COMP) all signature-profile-build: build embed-signature profile-build