adapt to brlib 0.3
This commit is contained in:
12
Makefile
12
Makefile
@@ -28,10 +28,6 @@ BRLIB := ./brlib
|
|||||||
BRINCDIR := $(BRLIB)/include
|
BRINCDIR := $(BRLIB)/include
|
||||||
BRLIBDIR := $(BRLIB)/lib
|
BRLIBDIR := $(BRLIB)/lib
|
||||||
|
|
||||||
#LIBSRCDIR := $(BRLIB)/src
|
|
||||||
#LIBOBJDIR := ./libobj
|
|
||||||
|
|
||||||
|
|
||||||
CCLSROOT := .ccls-root
|
CCLSROOT := .ccls-root
|
||||||
CCLSFILE := compile_commands.json
|
CCLSFILE := compile_commands.json
|
||||||
|
|
||||||
@@ -39,13 +35,7 @@ SRC := $(wildcard $(SRCDIR)/*.c) # project sources
|
|||||||
SRC_FN := $(notdir $(SRC)) # source basename
|
SRC_FN := $(notdir $(SRC)) # source basename
|
||||||
OBJ := $(addprefix $(OBJDIR)/,$(SRC_FN:.c=.o))
|
OBJ := $(addprefix $(OBJDIR)/,$(SRC_FN:.c=.o))
|
||||||
|
|
||||||
#LIBSRC := $(wildcard $(LIBSRCDIR)/*.c) # lib sources
|
LIB := br_$(shell uname -m) # library name
|
||||||
#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
|
|
||||||
|
|
||||||
DEP_FN := $(SRC_FN) $(LIBSRC_FN)
|
DEP_FN := $(SRC_FN) $(LIBSRC_FN)
|
||||||
DEP := $(addprefix $(DEPDIR)/,$(DEP_FN:.c=.d))
|
DEP := $(addprefix $(DEPDIR)/,$(DEP_FN:.c=.d))
|
||||||
|
@@ -21,7 +21,8 @@ if [[ ! -v _BRCHESS_ENV_ ]]; then
|
|||||||
BRCHESS_ROOT=$(realpath -L "$(dirname "${BASH_SOURCE[0]}")/..")
|
BRCHESS_ROOT=$(realpath -L "$(dirname "${BASH_SOURCE[0]}")/..")
|
||||||
BRLIBDIR="$BRCHESS_ROOT/brlib/lib"
|
BRLIBDIR="$BRCHESS_ROOT/brlib/lib"
|
||||||
LD_LIBRARY_PATH="${BRLIBDIR}${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
|
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 "R=%s L=%s LD=%s\n" "$BRCHESS_ROOT" "$BRLIB_DIR" "$LD_LIBRARY_PATH"
|
||||||
printf "Chess environment complete.\n"
|
printf "Chess environment complete.\n"
|
||||||
|
unset BRLIBDIR BRCHESS_ROOT
|
||||||
fi
|
fi
|
||||||
|
@@ -14,10 +14,10 @@
|
|||||||
#ifndef BITBOARD_H
|
#ifndef BITBOARD_H
|
||||||
#define BITBOARD_H
|
#define BITBOARD_H
|
||||||
|
|
||||||
#include <bits.h>
|
#include "br.h"
|
||||||
|
|
||||||
#include "chessdefs.h"
|
#include "chessdefs.h"
|
||||||
#include "piece.h"
|
#include "piece.h"
|
||||||
|
#include "bitops.h"
|
||||||
|
|
||||||
enum bb_square {
|
enum bb_square {
|
||||||
A1 = 1UL << 0, B1 = 1UL << 1, C1 = 1UL << 2, D1 = 1UL << 3,
|
A1 = 1UL << 0, B1 = 1UL << 1, C1 = 1UL << 2, D1 = 1UL << 3,
|
||||||
|
@@ -14,7 +14,7 @@
|
|||||||
#ifndef CHESSDEFS_H
|
#ifndef CHESSDEFS_H
|
||||||
#define CHESSDEFS_H
|
#define CHESSDEFS_H
|
||||||
|
|
||||||
#include <bits.h>
|
#include "br.h"
|
||||||
|
|
||||||
/* piece_t bits structure
|
/* piece_t bits structure
|
||||||
* MSB 8 7 6 5 4 3 2 1 LSB
|
* MSB 8 7 6 5 4 3 2 1 LSB
|
||||||
|
@@ -11,8 +11,8 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <bits.h>
|
#include "br.h"
|
||||||
#include <debug.h>
|
#include "debug.h"
|
||||||
|
|
||||||
#include "piece.h"
|
#include "piece.h"
|
||||||
#include "eval-simple.h"
|
#include "eval-simple.h"
|
||||||
|
@@ -15,9 +15,10 @@
|
|||||||
#define POSITION_H
|
#define POSITION_H
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <pool.h>
|
|
||||||
#include <list.h>
|
#include "pool.h"
|
||||||
#include <bits.h>
|
#include "list.h"
|
||||||
|
#include "bitops.h"
|
||||||
|
|
||||||
#include "board.h"
|
#include "board.h"
|
||||||
#include "chessdefs.h"
|
#include "chessdefs.h"
|
||||||
|
Reference in New Issue
Block a user