X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2FMakefile;h=eff8bacae0abec256c9404bec30c8ca12b2839dc;hb=e31f97e3baa52042fe60d6f4eeb50fe0d9e61013;hp=1b1212994881508ef9f021c33449758e68c3fa70;hpb=67062637f48e7d63e750dee63ba9e881ee6d9382;p=stockfish diff --git a/src/Makefile b/src/Makefile index 1b121299..eff8baca 100644 --- a/src/Makefile +++ b/src/Makefile @@ -27,7 +27,9 @@ endif ### Target Windows OS ifeq ($(OS),Windows_NT) - target_windows = yes + ifneq ($(COMP),ndk) + target_windows = yes + endif else ifeq ($(COMP),mingw) target_windows = yes ifeq ($(WINE_PATH),) @@ -150,7 +152,7 @@ ifeq ($(findstring x86,$(ARCH)),x86) ifeq ($(findstring x86-32,$(ARCH)),x86-32) arch = i386 bits = 32 - sse = yes + sse = no mmx = yes else arch = x86_64 @@ -451,11 +453,19 @@ ifeq ($(COMP),ndk) ifeq ($(arch),armv7) CXX=armv7a-linux-androideabi16-clang++ CXXFLAGS += -mthumb -march=armv7-a -mfloat-abi=softfp -mfpu=neon - STRIP=arm-linux-androideabi-strip + ifneq ($(shell which arm-linux-androideabi-strip 2>/dev/null),) + STRIP=arm-linux-androideabi-strip + else + STRIP=llvm-strip + endif endif ifeq ($(arch),armv8) CXX=aarch64-linux-android21-clang++ - STRIP=aarch64-linux-android-strip + ifneq ($(shell which aarch64-linux-android-strip 2>/dev/null),) + STRIP=aarch64-linux-android-strip + else + STRIP=llvm-strip + endif endif LDFLAGS += -static-libstdc++ -pie -lm -latomic endif @@ -683,7 +693,7 @@ ifeq ($(debug), no) # the tool chain requires gcc version 10.1 or later. else ifeq ($(comp),mingw) ifneq ($(arch),i386) - CXXFLAGS += -flto=auto + CXXFLAGS += -flto LDFLAGS += $(CXXFLAGS) -save-temps endif endif @@ -801,7 +811,7 @@ strip: install: -mkdir -p -m 755 $(BINDIR) -cp $(EXE) $(BINDIR) - -strip $(BINDIR)/$(EXE) + $(STRIP) $(BINDIR)/$(EXE) # clean all clean: objclean profileclean @@ -833,7 +843,7 @@ net: # clean binaries and objects objclean: - @rm -f $(EXE) *.o ./syzygy/*.o ./nnue/*.o ./nnue/features/*.o + @rm -f stockfish stockfish.exe *.o ./syzygy/*.o ./nnue/*.o ./nnue/features/*.o # clean auxiliary profiling files profileclean: