Compare commits
1 Commits
7ae6604e10
...
thread
Author | SHA1 | Date | |
---|---|---|---|
c0bbf03551 |
14
Makefile
14
Makefile
@@ -39,9 +39,7 @@ OBJ := $(addprefix $(OBJDIR)/,$(SRC_FN:.c=.o))
|
|||||||
TSTSRC := $(wildcard $(TSTDIR)/*.c)
|
TSTSRC := $(wildcard $(TSTDIR)/*.c)
|
||||||
|
|
||||||
LIB := br_$(shell uname -m) # library name
|
LIB := br_$(shell uname -m) # library name
|
||||||
LIB := $(strip $(LIB))
|
LIBS := $(strip -l$(LIB))
|
||||||
LIBFILE := ${BRLIBDIR}/lib$(strip ${LIB}).a
|
|
||||||
LIBS := $(addprefix -l,$(strip $(LIB)))
|
|
||||||
|
|
||||||
DEP_FN := $(SRC_FN)
|
DEP_FN := $(SRC_FN)
|
||||||
DEP := $(addprefix $(DEPDIR)/,$(DEP_FN:.c=.d))
|
DEP := $(addprefix $(DEPDIR)/,$(DEP_FN:.c=.d))
|
||||||
@@ -104,7 +102,7 @@ endif
|
|||||||
# if no version, use last commit and date.
|
# if no version, use last commit and date.
|
||||||
# else, if last commit != last tag commit, add commit and date to version number
|
# else, if last commit != last tag commit, add commit and date to version number
|
||||||
ifeq ($(VERSION),)
|
ifeq ($(VERSION),)
|
||||||
VERSION := $(build)-git.$(COMMIT)-$(DATE)
|
VERSION := $(build)-$(COMMIT)-$(DATE)
|
||||||
else ifneq ($(COMMIT), $(TAG_COMMIT))
|
else ifneq ($(COMMIT), $(TAG_COMMIT))
|
||||||
VERSION := $(VERSION)-next-$(build)-$(COMMIT)-$(DATE)
|
VERSION := $(VERSION)-next-$(build)-$(COMMIT)-$(DATE)
|
||||||
endif
|
endif
|
||||||
@@ -346,7 +344,6 @@ brlib:
|
|||||||
$(info calling with build=$(build))
|
$(info calling with build=$(build))
|
||||||
$(MAKE) -e -C $(BRLIB) lib-static
|
$(MAKE) -e -C $(BRLIB) lib-static
|
||||||
unexport build
|
unexport build
|
||||||
|
|
||||||
##################################### brchess binaries
|
##################################### brchess binaries
|
||||||
.PHONY: targets cleanbin cleanbindir
|
.PHONY: targets cleanbin cleanbindir
|
||||||
|
|
||||||
@@ -358,9 +355,9 @@ cleanbin:
|
|||||||
cleanbindir:
|
cleanbindir:
|
||||||
$(call rmdir,$(BINDIR),binaries)
|
$(call rmdir,$(BINDIR),binaries)
|
||||||
|
|
||||||
$(TARGET): $(LIBFILE) $(OBJ) | $(BINDIR) libs
|
$(TARGET): libs $(OBJ) | $(BINDIR)
|
||||||
@echo linking $@.
|
@echo linking $@.
|
||||||
$(CC) $(ALL_LDFLAGS) $(OBJ) -o $@
|
$(CC) $(LDFLAGS) $(OBJ) $(LIBS) -o $@
|
||||||
|
|
||||||
##################################### pre-processed (.i) and assembler (.s) output
|
##################################### pre-processed (.i) and assembler (.s) output
|
||||||
.PHONY: cleanasmcpp
|
.PHONY: cleanasmcpp
|
||||||
@@ -418,7 +415,7 @@ TEST += movedo-test perft-test tt-test
|
|||||||
PIECE_OBJS := piece.o
|
PIECE_OBJS := piece.o
|
||||||
FEN_OBJS := $(PIECE_OBJS) fen.o position.o bitboard.o board.o \
|
FEN_OBJS := $(PIECE_OBJS) fen.o position.o bitboard.o board.o \
|
||||||
hq.o attack.o hash.o init.o util.o alloc.o move.o \
|
hq.o attack.o hash.o init.o util.o alloc.o move.o \
|
||||||
eval.o eval-defs.o eval-simple.o hist.o
|
eval.o eval-defs.o eval-simple.o
|
||||||
BB_OBJS := $(FEN_OBJS)
|
BB_OBJS := $(FEN_OBJS)
|
||||||
MOVEGEN_OBJS := $(BB_OBJS) move-gen.o
|
MOVEGEN_OBJS := $(BB_OBJS) move-gen.o
|
||||||
ATTACK_OBJS := $(MOVEGEN_OBJS)
|
ATTACK_OBJS := $(MOVEGEN_OBJS)
|
||||||
@@ -493,7 +490,6 @@ wtf:
|
|||||||
@#echo LIBSRC=$(LIBSRC)
|
@#echo LIBSRC=$(LIBSRC)
|
||||||
|
|
||||||
zob:
|
zob:
|
||||||
echo $(LIBFILE)
|
|
||||||
@#$(CC) $(LDFLAGS) $(CPPFLAGS) $(CFLAGS) $< $(LIBS) src/util.c -o util
|
@#$(CC) $(LDFLAGS) $(CPPFLAGS) $(CFLAGS) $< $(LIBS) src/util.c -o util
|
||||||
|
|
||||||
##################################### End of multi-targets
|
##################################### End of multi-targets
|
||||||
|
@@ -480,18 +480,3 @@ finish:
|
|||||||
return movelist;
|
return movelist;
|
||||||
//return movelist->nmoves = moves - movelist->move;
|
//return movelist->nmoves = moves - movelist->move;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* pos_gen_legal() - generate position legal moves
|
|
||||||
* @pos: position
|
|
||||||
* @movelist: &movelist_t array to store moves
|
|
||||||
*
|
|
||||||
* Generate all @pos legal moves for player-to-move.
|
|
||||||
* @movelist is filled with the moves.
|
|
||||||
*
|
|
||||||
* @Return: movelist
|
|
||||||
*/
|
|
||||||
movelist_t *pos_gen_legal(pos_t *pos, movelist_t *movelist)
|
|
||||||
{
|
|
||||||
return pos_legal(pos, pos_gen_pseudo(pos, movelist));
|
|
||||||
}
|
|
||||||
|
@@ -27,6 +27,5 @@ movelist_t *pos_legal_dup(const pos_t *pos, movelist_t *pseudo, movelist_t *lega
|
|||||||
movelist_t *pos_legal(const pos_t *pos, movelist_t *list);
|
movelist_t *pos_legal(const pos_t *pos, movelist_t *list);
|
||||||
|
|
||||||
movelist_t *pos_gen_pseudo(pos_t *pos, movelist_t *movelist);
|
movelist_t *pos_gen_pseudo(pos_t *pos, movelist_t *movelist);
|
||||||
movelist_t *pos_gen_legal(pos_t *pos, movelist_t *movelist);
|
|
||||||
|
|
||||||
#endif /* MOVEGEN_H */
|
#endif /* MOVEGEN_H */
|
||||||
|
@@ -25,7 +25,6 @@
|
|||||||
*/
|
*/
|
||||||
thread_pool_t threadpool;
|
thread_pool_t threadpool;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* thrd_create - initialize thrd.
|
* thrd_create - initialize thrd.
|
||||||
*/
|
*/
|
||||||
|
Reference in New Issue
Block a user