]> git.sesse.net Git - stockfish/blobdiff - src/Makefile
Explicitly invoke shell
[stockfish] / src / Makefile
index bf483f8c77e2a7c16666428bb4895f7c4ee968e6..95f0fe9a577f7940d103b87633704fccfe041b0e 100644 (file)
@@ -108,7 +108,7 @@ ifeq ($(ARCH),)
 endif
 
 ifeq ($(ARCH), native)
-   override ARCH = $(shell ../scripts/get_native_properties.sh | cut -d " " -f 1)
+   override ARCH = $(shell $(SHELL) ../scripts/get_native_properties.sh | cut -d " " -f 1)
 endif
 
 # explicitly check for the list of supported architectures (as listed with make help),
@@ -715,6 +715,11 @@ ifneq ($(GIT_DATE), )
        CXXFLAGS += -DGIT_DATE=$(GIT_DATE)
 endif
 
+### 3.7.3 Try to include architecture
+ifneq ($(ARCH), )
+       CXXFLAGS += -DARCH=$(ARCH)
+endif
+
 ### 3.8 Link Time Optimization
 ### This is a mix of compile and link time options because the lto link phase
 ### needs access to the optimization flags.
@@ -832,12 +837,15 @@ ifneq ($(SUPPORTED_ARCH), true)
 endif
 
 
-.PHONY: help build profile-build strip install clean net objclean profileclean \
-       config-sanity \
+.PHONY: help analyze build profile-build strip install clean net \
+       objclean profileclean config-sanity \
        icx-profile-use icx-profile-make \
        gcc-profile-use gcc-profile-make \
        clang-profile-use clang-profile-make FORCE
 
+analyze: net config-sanity objclean
+       $(MAKE) -k ARCH=$(ARCH) COMP=$(COMP) $(OBJS)
+
 build: net config-sanity
        $(MAKE) ARCH=$(ARCH) COMP=$(COMP) all