mirror of
https://github.com/sockspls/badfish
synced 2025-07-12 03:59:15 +00:00
Fix syzygy dependencies issue
fixes https://github.com/official-stockfish/Stockfish/issues/2660 The problem was caused by .depend being created with a rule for tbprobe.o not for syzygy/tbprobe.o. This patch keeps an explicit list of sources (SRCS), generates OBJS, and compiles all object files to the src/ directory, consistent with .depend. VPATH is used to search the syzygy directory as needed. joint work with @gvreuls closes https://github.com/official-stockfish/Stockfish/pull/2664 No functional change
This commit is contained in:
parent
a91cb9fc1b
commit
fcaf0736fe
1 changed files with 10 additions and 6 deletions
16
src/Makefile
16
src/Makefile
|
@ -35,10 +35,14 @@ BINDIR = $(PREFIX)/bin
|
||||||
### Built-in benchmark for pgo-builds
|
### Built-in benchmark for pgo-builds
|
||||||
PGOBENCH = ./$(EXE) bench
|
PGOBENCH = ./$(EXE) bench
|
||||||
|
|
||||||
### Object files
|
### Source and object files
|
||||||
OBJS = benchmark.o bitbase.o bitboard.o endgame.o evaluate.o main.o \
|
SRCS = benchmark.cpp bitbase.cpp bitboard.cpp endgame.cpp evaluate.cpp main.cpp \
|
||||||
material.o misc.o movegen.o movepick.o pawns.o position.o psqt.o \
|
material.cpp misc.cpp movegen.cpp movepick.cpp pawns.cpp position.cpp psqt.cpp \
|
||||||
search.o thread.o timeman.o tt.o uci.o ucioption.o tune.o syzygy/tbprobe.o
|
search.cpp thread.cpp timeman.cpp tt.cpp uci.cpp ucioption.cpp tune.cpp syzygy/tbprobe.cpp
|
||||||
|
|
||||||
|
OBJS = $(notdir $(SRCS:.cpp=.o))
|
||||||
|
|
||||||
|
VPATH = syzygy
|
||||||
|
|
||||||
### Establish the operating system name
|
### Establish the operating system name
|
||||||
KERNEL = $(shell uname -s)
|
KERNEL = $(shell uname -s)
|
||||||
|
@ -450,7 +454,7 @@ objclean:
|
||||||
# clean auxiliary profiling files
|
# clean auxiliary profiling files
|
||||||
profileclean:
|
profileclean:
|
||||||
@rm -rf profdir
|
@rm -rf profdir
|
||||||
@rm -f bench.txt *.gcda ./syzygy/*.gcda *.gcno ./syzygy/*.gcno
|
@rm -f bench.txt *.gcda *.gcno
|
||||||
@rm -f stockfish.profdata *.profraw
|
@rm -f stockfish.profdata *.profraw
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
@ -536,7 +540,7 @@ icc-profile-use:
|
||||||
all
|
all
|
||||||
|
|
||||||
.depend:
|
.depend:
|
||||||
-@$(CXX) $(DEPENDFLAGS) -MM $(OBJS:.o=.cpp) > $@ 2> /dev/null
|
-@$(CXX) $(DEPENDFLAGS) -MM $(SRCS) > $@ 2> /dev/null
|
||||||
|
|
||||||
-include .depend
|
-include .depend
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue