1 # Stockfish, a UCI chess playing engine derived from Glaurung 2.1
2 # Copyright (C) 2004-2008 Tord Romstad (Glaurung author)
3 # Copyright (C) 2008-2015 Marco Costalba, Joona Kiiski, Tord Romstad
4 # Copyright (C) 2015-2019 Marco Costalba, Joona Kiiski, Gary Linscott, Tord Romstad
6 # Stockfish is free software: you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation, either version 3 of the License, or
9 # (at your option) any later version.
11 # Stockfish is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with this program. If not, see <http://www.gnu.org/licenses/>.
20 ### ==========================================================================
21 ### Section 1. General Configuration
22 ### ==========================================================================
31 ### Installation dir definitions
33 BINDIR = $(PREFIX)/bin
35 ### Built-in benchmark for pgo-builds
36 PGOBENCH = ./$(EXE) bench
38 ### Source and object files
39 SRCS = benchmark.cpp bitbase.cpp bitboard.cpp endgame.cpp evaluate.cpp main.cpp \
40 material.cpp misc.cpp movegen.cpp movepick.cpp pawns.cpp position.cpp psqt.cpp \
41 search.cpp thread.cpp timeman.cpp tt.cpp uci.cpp ucioption.cpp tune.cpp syzygy/tbprobe.cpp \
42 nnue/evaluate_nnue.cpp nnue/features/half_kp.cpp
44 OBJS = $(notdir $(SRCS:.cpp=.o))
46 VPATH = syzygy:nnue:nnue/features
48 ### Establish the operating system name
49 KERNEL = $(shell uname -s)
50 ifeq ($(KERNEL),Linux)
51 OS = $(shell uname -o)
54 ### ==========================================================================
55 ### Section 2. High-level Configuration
56 ### ==========================================================================
58 # flag --- Comp switch --- Description
59 # ----------------------------------------------------------------------------
61 # debug = yes/no --- -DNDEBUG --- Enable/Disable debug mode
62 # sanitize = undefined/thread/no (-fsanitize )
63 # --- ( undefined ) --- enable undefined behavior checks
64 # --- ( thread ) --- enable threading error checks
65 # optimize = yes/no --- (-O3/-fast etc.) --- Enable/Disable optimizations
66 # arch = (name) --- (-arch) --- Target architecture
67 # bits = 64/32 --- -DIS_64BIT --- 64-/32-bit operating system
68 # prefetch = yes/no --- -DUSE_PREFETCH --- Use prefetch asm-instruction
69 # popcnt = yes/no --- -DUSE_POPCNT --- Use popcnt asm-instruction
70 # pext = yes/no --- -DUSE_PEXT --- Use pext x86_64 asm-instruction
71 # sse = yes/no --- -msse --- Use Intel Streaming SIMD Extensions
72 # mmx = yes/no --- -mmmx --- Use Intel MMX instructions
73 # sse2 = yes/no --- -msse2 --- Use Intel Streaming SIMD Extensions 2
74 # ssse3 = yes/no --- -mssse3 --- Use Intel Supplemental Streaming SIMD Extensions 3
75 # sse41 = yes/no --- -msse4.1 --- Use Intel Streaming SIMD Extensions 4.1
76 # avx2 = yes/no --- -mavx2 --- Use Intel Advanced Vector Extensions 2
77 # avx512 = yes/no --- -mavx512bw --- Use Intel Advanced Vector Extensions 512
78 # vnni256 = yes/no --- -mavx512vnni --- Use Intel Vector Neural Network Instructions 256
79 # vnni512 = yes/no --- -mavx512vnni --- Use Intel Vector Neural Network Instructions 512
80 # neon = yes/no --- -DUSE_NEON --- Use ARM SIMD architecture
82 # Note that Makefile is space sensitive, so when adding new architectures
83 # or modifying existing flags, you have to make sure there are no extra spaces
84 # at the end of the line for flag values.
86 ### 2.1. General and architecture defaults
90 help_skip_sanity = yes
92 # explicitly check for the list of supported architectures (as listed with make help),
93 # the user can override with `make ARCH=x86-32-vnni256 SUPPORTED_ARCH=true`
94 ifeq ($(ARCH), $(filter $(ARCH), \
95 x86-64-vnni512 x86-64-vnni256 x86-64-avx512 x86-64-bmi2 x86-64-avx2 \
96 x86-64-sse41-popcnt x86-64-modern x86-64-ssse3 x86-64-sse3-popcnt \
97 x86-64 x86-32-sse41-popcnt x86-32-sse2 x86-32 ppc-64 ppc-32 \
98 armv7 armv7-neon armv8 apple-silicon general-64 general-32))
123 ### 2.2 Architecture specific
125 ifeq ($(findstring x86,$(ARCH)),x86)
129 ifeq ($(findstring x86-32,$(ARCH)),x86-32)
140 ifeq ($(findstring -sse,$(ARCH)),-sse)
144 ifeq ($(findstring -popcnt,$(ARCH)),-popcnt)
148 ifeq ($(findstring -mmx,$(ARCH)),-mmx)
152 ifeq ($(findstring -sse2,$(ARCH)),-sse2)
157 ifeq ($(findstring -ssse3,$(ARCH)),-ssse3)
163 ifeq ($(findstring -sse41,$(ARCH)),-sse41)
170 ifeq ($(findstring -modern,$(ARCH)),-modern)
178 ifeq ($(findstring -avx2,$(ARCH)),-avx2)
187 ifeq ($(findstring -bmi2,$(ARCH)),-bmi2)
197 ifeq ($(findstring -avx512,$(ARCH)),-avx512)
208 ifeq ($(findstring -vnni256,$(ARCH)),-vnni256)
219 ifeq ($(findstring -vnni512,$(ARCH)),-vnni512)
235 # 64-bit pext is not available on x86-32
242 # all other architectures
244 ifeq ($(ARCH),general-32)
249 ifeq ($(ARCH),general-64)
259 ifeq ($(ARCH),armv7-neon)
274 ifeq ($(ARCH),apple-silicon)
281 ifeq ($(ARCH),ppc-32)
286 ifeq ($(ARCH),ppc-64)
294 ### ==========================================================================
295 ### Section 3. Low-level Configuration
296 ### ==========================================================================
298 ### 3.1 Selecting compiler (default = gcc)
299 CXXFLAGS += -Wall -Wcast-qual -fno-exceptions -std=c++17 $(EXTRACXXFLAGS)
300 DEPENDFLAGS += -std=c++17
301 LDFLAGS += $(EXTRALDFLAGS)
310 CXXFLAGS += -pedantic -Wextra -Wshadow
312 ifeq ($(arch),$(filter $(arch),armv7 armv8))
314 CXXFLAGS += -m$(bits)
318 CXXFLAGS += -m$(bits)
322 ifeq ($(arch),$(filter $(arch),armv7))
326 ifneq ($(KERNEL),Darwin)
327 LDFLAGS += -Wl,--no-as-needed
334 ifeq ($(KERNEL),Linux)
336 ifeq ($(shell which x86_64-w64-mingw32-c++-posix),)
337 CXX=x86_64-w64-mingw32-c++
339 CXX=x86_64-w64-mingw32-c++-posix
342 ifeq ($(shell which i686-w64-mingw32-c++-posix),)
343 CXX=i686-w64-mingw32-c++
345 CXX=i686-w64-mingw32-c++-posix
352 CXXFLAGS += -Wextra -Wshadow
359 CXXFLAGS += -diag-disable 1476,10120 -Wcheck -Wabi -Wdeprecated -strict-ansi
365 CXXFLAGS += -pedantic -Wextra -Wshadow
367 ifneq ($(KERNEL),Darwin)
368 ifneq ($(KERNEL),OpenBSD)
373 ifeq ($(arch),$(filter $(arch),armv7 armv8))
375 CXXFLAGS += -m$(bits)
379 CXXFLAGS += -m$(bits)
385 profile_make = icc-profile-make
386 profile_use = icc-profile-use
389 profile_make = clang-profile-make
390 profile_use = clang-profile-use
392 profile_make = gcc-profile-make
393 profile_use = gcc-profile-use
397 ifeq ($(KERNEL),Darwin)
398 CXXFLAGS += -arch $(arch) -mmacosx-version-min=10.14
399 LDFLAGS += -arch $(arch) -mmacosx-version-min=10.14
403 # To cross-compile for Android, NDK version r21 or later is recommended.
404 # In earlier NDK versions, you'll need to pass -fno-addrsig if using GNU binutils.
405 # Currently we don't know how to make PGO builds with the NDK yet.
407 CXXFLAGS += -stdlib=libc++ -fPIE
409 comp=armv7a-linux-androideabi16-clang
410 CXX=armv7a-linux-androideabi16-clang++
411 CXXFLAGS += -mthumb -march=armv7-a -mfloat-abi=softfp -mfpu=neon
412 STRIP=arm-linux-androideabi-strip
415 comp=aarch64-linux-android21-clang
416 CXX=aarch64-linux-android21-clang++
417 STRIP=aarch64-linux-android-strip
419 LDFLAGS += -static-libstdc++ -pie -lm -latomic
422 ### Travis CI script uses COMPILER to overwrite CXX
427 ### Allow overwriting CXX from command line
432 ### Sometimes gcc is really clang
434 gccversion = $(shell $(CXX) --version)
435 gccisclang = $(findstring clang,$(gccversion))
436 ifneq ($(gccisclang),)
437 profile_make = clang-profile-make
438 profile_use = clang-profile-use
442 ### On mingw use Windows threads, otherwise POSIX
443 ifneq ($(comp),mingw)
444 CXXFLAGS += -DUSE_PTHREADS
445 # On Android Bionic's C library comes with its own pthread implementation bundled in
446 ifneq ($(OS),Android)
447 # Haiku has pthreads in its libroot, so only link it in on other platforms
448 ifneq ($(KERNEL),Haiku)
463 ### 3.2.2 Debugging with undefined behavior sanitizers
464 ifneq ($(sanitize),no)
465 CXXFLAGS += -g3 -fsanitize=$(sanitize)
466 LDFLAGS += -fsanitize=$(sanitize)
470 ifeq ($(optimize),yes)
475 ifeq ($(OS), Android)
476 CXXFLAGS += -fno-gcse -mthumb -march=armv7-a -mfloat-abi=softfp
480 ifeq ($(comp),$(filter $(comp),gcc clang icc))
481 ifeq ($(KERNEL),Darwin)
482 CXXFLAGS += -mdynamic-no-pic
489 CXXFLAGS += -DIS_64BIT
493 ifeq ($(prefetch),yes)
498 CXXFLAGS += -DNO_PREFETCH
503 ifeq ($(arch),$(filter $(arch),ppc64 armv7 armv8 arm64))
504 CXXFLAGS += -DUSE_POPCNT
505 else ifeq ($(comp),icc)
506 CXXFLAGS += -msse3 -DUSE_POPCNT
508 CXXFLAGS += -msse3 -mpopcnt -DUSE_POPCNT
514 CXXFLAGS += -DUSE_AVX2
515 ifeq ($(comp),$(filter $(comp),gcc clang mingw))
521 CXXFLAGS += -DUSE_AVX512
522 ifeq ($(comp),$(filter $(comp),gcc clang mingw))
523 CXXFLAGS += -mavx512f -mavx512bw
527 ifeq ($(vnni256),yes)
528 CXXFLAGS += -DUSE_VNNI
529 ifeq ($(comp),$(filter $(comp),gcc clang mingw))
530 CXXFLAGS += -mavx512f -mavx512bw -mavx512vnni -mavx512dq -mavx512vl -mprefer-vector-width=256
534 ifeq ($(vnni512),yes)
535 CXXFLAGS += -DUSE_VNNI
536 ifeq ($(comp),$(filter $(comp),gcc clang mingw))
537 CXXFLAGS += -mavx512vnni -mavx512dq -mavx512vl
542 CXXFLAGS += -DUSE_SSE41
543 ifeq ($(comp),$(filter $(comp),gcc clang mingw))
549 CXXFLAGS += -DUSE_SSSE3
550 ifeq ($(comp),$(filter $(comp),gcc clang mingw))
556 CXXFLAGS += -DUSE_SSE2
557 ifeq ($(comp),$(filter $(comp),gcc clang mingw))
563 CXXFLAGS += -DUSE_MMX
564 ifeq ($(comp),$(filter $(comp),gcc clang mingw))
570 CXXFLAGS += -DUSE_NEON
571 ifeq ($(KERNEL),Linux)
573 ifneq ($(arch),armv8)
574 CXXFLAGS += -mfpu=neon
582 CXXFLAGS += -DUSE_PEXT
583 ifeq ($(comp),$(filter $(comp),gcc clang mingw))
588 ### 3.8 Link Time Optimization
589 ### This is a mix of compile and link time options because the lto link phase
590 ### needs access to the optimization flags.
591 ifeq ($(optimize),yes)
594 CXXFLAGS += -flto=thin
595 LDFLAGS += $(CXXFLAGS)
596 else ifeq ($(comp),clang)
597 CXXFLAGS += -flto=thin
598 LDFLAGS += $(CXXFLAGS)
600 # GCC and CLANG use different methods for parallelizing LTO and CLANG pretends to be
601 # GCC on some systems.
602 else ifeq ($(comp),gcc)
603 ifeq ($(gccisclang),)
605 LDFLAGS += $(CXXFLAGS) -flto=jobserver
606 ifneq ($(findstring MINGW,$(KERNEL)),)
607 LDFLAGS += -save-temps
608 else ifneq ($(findstring MSYS,$(KERNEL)),)
609 LDFLAGS += -save-temps
612 CXXFLAGS += -flto=thin
613 LDFLAGS += $(CXXFLAGS)
616 # To use LTO and static linking on windows, the tool chain requires a recent gcc:
617 # gcc version 10.1 in msys2 or TDM-GCC version 9.2 are known to work, older might not.
618 # So, only enable it for a cross from Linux by default.
619 else ifeq ($(comp),mingw)
620 ifeq ($(KERNEL),Linux)
623 LDFLAGS += $(CXXFLAGS) -flto=jobserver
630 ### 3.9 Android 5 can only run position independent executables. Note that this
631 ### breaks Android 4.0 and earlier.
632 ifeq ($(OS), Android)
634 LDFLAGS += -fPIE -pie
637 ### ==========================================================================
638 ### Section 4. Public Targets
639 ### ==========================================================================
644 @echo "To compile stockfish, type: "
646 @echo "make target ARCH=arch [COMP=compiler] [COMPCXX=cxx]"
648 @echo "Supported targets:"
650 @echo "help > Display architecture details"
651 @echo "build > Standard build"
652 @echo "net > Download the default nnue net"
653 @echo "profile-build > Faster build (with profile-guided optimization)"
654 @echo "strip > Strip executable"
655 @echo "install > Install executable"
656 @echo "clean > Clean up"
658 @echo "Supported archs:"
660 @echo "x86-64-vnni512 > x86 64-bit with vnni support 512bit wide"
661 @echo "x86-64-vnni256 > x86 64-bit with vnni support 256bit wide"
662 @echo "x86-64-avx512 > x86 64-bit with avx512 support"
663 @echo "x86-64-bmi2 > x86 64-bit with bmi2 support"
664 @echo "x86-64-avx2 > x86 64-bit with avx2 support"
665 @echo "x86-64-sse41-popcnt > x86 64-bit with sse41 and popcnt support"
666 @echo "x86-64-modern > common modern CPU, currently x86-64-sse41-popcnt"
667 @echo "x86-64-ssse3 > x86 64-bit with ssse3 support"
668 @echo "x86-64-sse3-popcnt > x86 64-bit with sse3 and popcnt support"
669 @echo "x86-64 > x86 64-bit generic (with sse2 support)"
670 @echo "x86-32-sse41-popcnt > x86 32-bit with sse41 and popcnt support"
671 @echo "x86-32-sse2 > x86 32-bit with sse2 support"
672 @echo "x86-32 > x86 32-bit generic (with mmx and sse support)"
673 @echo "ppc-64 > PPC 64-bit"
674 @echo "ppc-32 > PPC 32-bit"
675 @echo "armv7 > ARMv7 32-bit"
676 @echo "armv7-neon > ARMv7 32-bit with popcnt and neon"
677 @echo "armv8 > ARMv8 64-bit with popcnt and neon"
678 @echo "apple-silicon > Apple silicon ARM64"
679 @echo "general-64 > unspecified 64-bit"
680 @echo "general-32 > unspecified 32-bit"
682 @echo "Supported compilers:"
684 @echo "gcc > Gnu compiler (default)"
685 @echo "mingw > Gnu compiler with MinGW under Windows"
686 @echo "clang > LLVM Clang compiler"
687 @echo "icc > Intel compiler"
688 @echo "ndk > Google NDK to cross-compile for Android"
690 @echo "Simple examples. If you don't know what to do, you likely want to run: "
692 @echo "make -j build ARCH=x86-64 (A portable, slow compile for 64-bit systems)"
693 @echo "make -j build ARCH=x86-32 (A portable, slow compile for 32-bit systems)"
695 @echo "Advanced examples, for experienced users looking for performance: "
697 @echo "make help ARCH=x86-64-bmi2"
698 @echo "make -j profile-build ARCH=x86-64-bmi2 COMP=gcc COMPCXX=g++-9.0"
699 @echo "make -j build ARCH=x86-64-ssse3 COMP=clang"
701 @echo "-------------------------------"
702 ifeq ($(SUPPORTED_ARCH)$(help_skip_sanity), true)
703 @echo "The selected architecture $(ARCH) will enable the following configuration: "
704 @$(MAKE) ARCH=$(ARCH) COMP=$(COMP) config-sanity
706 @echo "Specify a supported architecture with the ARCH option for more details"
711 .PHONY: help build profile-build strip install clean net objclean profileclean \
712 config-sanity icc-profile-use icc-profile-make gcc-profile-use gcc-profile-make \
713 clang-profile-use clang-profile-make
715 build: config-sanity net
716 $(MAKE) ARCH=$(ARCH) COMP=$(COMP) all
718 profile-build: net config-sanity objclean profileclean
720 @echo "Step 1/4. Building instrumented executable ..."
721 $(MAKE) ARCH=$(ARCH) COMP=$(COMP) $(profile_make)
723 @echo "Step 2/4. Running benchmark for pgo-build ..."
724 $(PGOBENCH) > /dev/null
726 @echo "Step 3/4. Building optimized executable ..."
727 $(MAKE) ARCH=$(ARCH) COMP=$(COMP) objclean
728 $(MAKE) ARCH=$(ARCH) COMP=$(COMP) $(profile_use)
730 @echo "Step 4/4. Deleting profile data ..."
731 $(MAKE) ARCH=$(ARCH) COMP=$(COMP) profileclean
737 -mkdir -p -m 755 $(BINDIR)
739 -strip $(BINDIR)/$(EXE)
742 clean: objclean profileclean
743 @rm -f .depend *~ core
745 # evaluation network (nnue)
747 $(eval nnuenet := $(shell grep EvalFileDefaultName evaluate.h | grep define | sed 's/.*\(nn-[a-z0-9]\{12\}.nnue\).*/\1/'))
748 @echo "Default net: $(nnuenet)"
749 $(eval nnuedownloadurl := https://tests.stockfishchess.org/api/nn/$(nnuenet))
750 $(eval curl_or_wget := $(shell if hash curl 2>/dev/null; then echo "curl -skL"; elif hash wget 2>/dev/null; then echo "wget -qO-"; fi))
751 @if test -f "$(nnuenet)"; then \
752 echo "Already available."; \
754 if [ "x$(curl_or_wget)" = "x" ]; then \
755 echo "Automatic download failed: neither curl nor wget is installed. Install one of these tools or download the net manually"; exit 1; \
757 echo "Downloading $(nnuedownloadurl)"; $(curl_or_wget) $(nnuedownloadurl) > $(nnuenet);\
760 $(eval shasum_command := $(shell if hash shasum 2>/dev/null; then echo "shasum -a 256 "; elif hash sha256sum 2>/dev/null; then echo "sha256sum "; fi))
761 @if [ "x$(shasum_command)" != "x" ]; then \
762 if [ "$(nnuenet)" != "nn-"`$(shasum_command) $(nnuenet) | cut -c1-12`".nnue" ]; then \
763 echo "Failed download or $(nnuenet) corrupted, please delete!"; exit 1; \
766 echo "shasum / sha256sum not found, skipping net validation"; \
769 # clean binaries and objects
771 @rm -f $(EXE) *.o ./syzygy/*.o ./nnue/*.o ./nnue/features/*.o
773 # clean auxiliary profiling files
776 @rm -f bench.txt *.gcda *.gcno ./syzygy/*.gcda ./nnue/*.gcda ./nnue/features/*.gcda *.s
777 @rm -f stockfish.profdata *.profraw
782 ### ==========================================================================
783 ### Section 5. Private Targets
784 ### ==========================================================================
791 @echo "debug: '$(debug)'"
792 @echo "sanitize: '$(sanitize)'"
793 @echo "optimize: '$(optimize)'"
794 @echo "arch: '$(arch)'"
795 @echo "bits: '$(bits)'"
796 @echo "kernel: '$(KERNEL)'"
798 @echo "prefetch: '$(prefetch)'"
799 @echo "popcnt: '$(popcnt)'"
800 @echo "pext: '$(pext)'"
801 @echo "sse: '$(sse)'"
802 @echo "mmx: '$(mmx)'"
803 @echo "sse2: '$(sse2)'"
804 @echo "ssse3: '$(ssse3)'"
805 @echo "sse41: '$(sse41)'"
806 @echo "avx2: '$(avx2)'"
807 @echo "avx512: '$(avx512)'"
808 @echo "vnni256: '$(vnni256)'"
809 @echo "vnni512: '$(vnni512)'"
810 @echo "neon: '$(neon)'"
814 @echo "CXXFLAGS: $(CXXFLAGS)"
815 @echo "LDFLAGS: $(LDFLAGS)"
817 @echo "Testing config sanity. If this fails, try 'make help' ..."
819 @test "$(debug)" = "yes" || test "$(debug)" = "no"
820 @test "$(sanitize)" = "undefined" || test "$(sanitize)" = "thread" || test "$(sanitize)" = "address" || test "$(sanitize)" = "no"
821 @test "$(optimize)" = "yes" || test "$(optimize)" = "no"
822 @test "$(SUPPORTED_ARCH)" = "true"
823 @test "$(arch)" = "any" || test "$(arch)" = "x86_64" || test "$(arch)" = "i386" || \
824 test "$(arch)" = "ppc64" || test "$(arch)" = "ppc" || \
825 test "$(arch)" = "armv7" || test "$(arch)" = "armv8" || test "$(arch)" = "arm64"
826 @test "$(bits)" = "32" || test "$(bits)" = "64"
827 @test "$(prefetch)" = "yes" || test "$(prefetch)" = "no"
828 @test "$(popcnt)" = "yes" || test "$(popcnt)" = "no"
829 @test "$(pext)" = "yes" || test "$(pext)" = "no"
830 @test "$(sse)" = "yes" || test "$(sse)" = "no"
831 @test "$(mmx)" = "yes" || test "$(mmx)" = "no"
832 @test "$(sse2)" = "yes" || test "$(sse2)" = "no"
833 @test "$(ssse3)" = "yes" || test "$(ssse3)" = "no"
834 @test "$(sse41)" = "yes" || test "$(sse41)" = "no"
835 @test "$(avx2)" = "yes" || test "$(avx2)" = "no"
836 @test "$(avx512)" = "yes" || test "$(avx512)" = "no"
837 @test "$(vnni256)" = "yes" || test "$(vnni256)" = "no"
838 @test "$(vnni512)" = "yes" || test "$(vnni512)" = "no"
839 @test "$(neon)" = "yes" || test "$(neon)" = "no"
840 @test "$(comp)" = "gcc" || test "$(comp)" = "icc" || test "$(comp)" = "mingw" || test "$(comp)" = "clang" \
841 || test "$(comp)" = "armv7a-linux-androideabi16-clang" || test "$(comp)" = "aarch64-linux-android21-clang"
844 +$(CXX) -o $@ $(OBJS) $(LDFLAGS)
847 $(MAKE) ARCH=$(ARCH) COMP=$(COMP) \
848 EXTRACXXFLAGS='-fprofile-instr-generate ' \
849 EXTRALDFLAGS=' -fprofile-instr-generate' \
853 $(XCRUN) llvm-profdata merge -output=stockfish.profdata *.profraw
854 $(MAKE) ARCH=$(ARCH) COMP=$(COMP) \
855 EXTRACXXFLAGS='-fprofile-instr-use=stockfish.profdata' \
856 EXTRALDFLAGS='-fprofile-use ' \
860 $(MAKE) ARCH=$(ARCH) COMP=$(COMP) \
861 EXTRACXXFLAGS='-fprofile-generate' \
862 EXTRALDFLAGS='-lgcov' \
866 $(MAKE) ARCH=$(ARCH) COMP=$(COMP) \
867 EXTRACXXFLAGS='-fprofile-use -fno-peel-loops -fno-tracer' \
868 EXTRALDFLAGS='-lgcov' \
873 $(MAKE) ARCH=$(ARCH) COMP=$(COMP) \
874 EXTRACXXFLAGS='-prof-gen=srcpos -prof_dir ./profdir' \
878 $(MAKE) ARCH=$(ARCH) COMP=$(COMP) \
879 EXTRACXXFLAGS='-prof_use -prof_dir ./profdir' \
883 -@$(CXX) $(DEPENDFLAGS) -MM $(SRCS) > $@ 2> /dev/null