diff --git a/Makefile b/Makefile index f32b7cd..db511b0 100644 --- a/Makefile +++ b/Makefile @@ -28,10 +28,6 @@ BRLIB := ./brlib BRINCDIR := $(BRLIB)/include BRLIBDIR := $(BRLIB)/lib -#LIBSRCDIR := $(BRLIB)/src -#LIBOBJDIR := ./libobj - - CCLSROOT := .ccls-root CCLSFILE := compile_commands.json @@ -39,13 +35,7 @@ SRC := $(wildcard $(SRCDIR)/*.c) # project sources SRC_FN := $(notdir $(SRC)) # source basename OBJ := $(addprefix $(OBJDIR)/,$(SRC_FN:.c=.o)) -#LIBSRC := $(wildcard $(LIBSRCDIR)/*.c) # lib sources -#LIBSRC_FN := $(notdir $(LIBSRC)) # lib sources basename -#LIBOBJ := $(addprefix $(LIBOBJDIR)/,$(LIBSRC_FN:.c=.o)) # and lib obj ones - -LIB := br_$(shell uname -m) # library name -#SLIB := $(addsuffix .a, $(LIBDIR)/lib$(LIB)) # static lib -#DLIB := $(addsuffix .so, $(LIBDIR)/lib$(LIB)) # dynamic lib +LIB := br_$(shell uname -m) # library name DEP_FN := $(SRC_FN) $(LIBSRC_FN) DEP := $(addprefix $(DEPDIR)/,$(DEP_FN:.c=.d)) diff --git a/scripts/env.sh b/scripts/env.sh index b8187bf..dbffc21 100755 --- a/scripts/env.sh +++ b/scripts/env.sh @@ -21,7 +21,8 @@ if [[ ! -v _BRCHESS_ENV_ ]]; then BRCHESS_ROOT=$(realpath -L "$(dirname "${BASH_SOURCE[0]}")/..") BRLIBDIR="$BRCHESS_ROOT/brlib/lib" LD_LIBRARY_PATH="${BRLIBDIR}${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" - PATH="$PATH:$(realpath -L "$(dirname "${BASH_SOURCE[0]}")")" + PATH="$PATH:$BRCHESS_ROOT/bin:=$BRCHESS_ROOT/scripts" #printf "R=%s L=%s LD=%s\n" "$BRCHESS_ROOT" "$BRLIB_DIR" "$LD_LIBRARY_PATH" printf "Chess environment complete.\n" + unset BRLIBDIR BRCHESS_ROOT fi diff --git a/src/bitboard.h b/src/bitboard.h index 4112073..c7f3348 100644 --- a/src/bitboard.h +++ b/src/bitboard.h @@ -14,10 +14,10 @@ #ifndef BITBOARD_H #define BITBOARD_H -#include - +#include "br.h" #include "chessdefs.h" #include "piece.h" +#include "bitops.h" enum bb_square { A1 = 1UL << 0, B1 = 1UL << 1, C1 = 1UL << 2, D1 = 1UL << 3, diff --git a/src/chessdefs.h b/src/chessdefs.h index 084ee82..44b4ef5 100644 --- a/src/chessdefs.h +++ b/src/chessdefs.h @@ -14,7 +14,7 @@ #ifndef CHESSDEFS_H #define CHESSDEFS_H -#include +#include "br.h" /* piece_t bits structure * MSB 8 7 6 5 4 3 2 1 LSB diff --git a/src/eval-simple.c b/src/eval-simple.c index 6ca3585..a56d599 100644 --- a/src/eval-simple.c +++ b/src/eval-simple.c @@ -11,8 +11,8 @@ * */ -#include -#include +#include "br.h" +#include "debug.h" #include "piece.h" #include "eval-simple.h" diff --git a/src/position.h b/src/position.h index c39200e..d41a0db 100644 --- a/src/position.h +++ b/src/position.h @@ -15,9 +15,10 @@ #define POSITION_H #include -#include -#include -#include + +#include "pool.h" +#include "list.h" +#include "bitops.h" #include "board.h" #include "chessdefs.h"