temp commit for machine change. Does not compile !

This commit is contained in:
2024-03-07 10:50:19 +01:00
parent b351d198b8
commit 7295914bb6
14 changed files with 444 additions and 186 deletions

View File

@@ -12,6 +12,7 @@
SHELL := /bin/bash
CC := gcc
#CC := clang
LD := ld
BEAR := bear
TOUCH := touch
@@ -40,6 +41,7 @@ OBJ := $(addprefix $(OBJDIR)/,$(SRC_FN:.c=.o))
TSTSRC := $(wildcard $(TSTDIR)/*.c)
LIB := br_$(shell uname -m) # library name
LIBS := $(strip -l$(LIB) -lreadline)
DEP_FN := $(SRC_FN)
DEP := $(addprefix $(DEPDIR)/,$(DEP_FN:.c=.d))
@@ -47,9 +49,6 @@ DEP := $(addprefix $(DEPDIR)/,$(DEP_FN:.c=.d))
TARGET_FN := brchess
TARGET := $(addprefix $(BINDIR)/,$(TARGET_FN))
LDFLAGS := -L$(BRLIBDIR)
LIBS := $(strip -l$(LIB) -lreadline)
ASMFILES := $(SRC:.c=.s) $(TSTSRC:.c=.s)
CPPFILES := $(SRC:.c=.i) $(TSTSRC:.c=.i)
@@ -79,6 +78,7 @@ CPPFLAGS := $(strip $(CPPFLAGS))
##################################### compiler flags
CFLAGS := -std=gnu11
#CFLAGS += -flto
CFLAGS += -O1
CFLAGS += -g
CFLAGS += -Wall
@@ -92,6 +92,12 @@ CFLAGS += -Wmissing-declarations
CFLAGS := $(strip $(CFLAGS))
##################################### linker flags
LDFLAGS := -L$(BRLIBDIR)
#LDFLAGS += -flto
LDFLAGS := $(strip $(LDFLAGS))
##################################### archiver/dependency flags
ARFLAGS := rcs
DEPFLAGS = -MMD -MP -MF $(DEPDIR)/$*.d
@@ -193,7 +199,7 @@ cleanobjdir: cleanobj
# "normal" ones, but do not imply to rebuild target.
$(OBJDIR)/%.o: $(SRCDIR)/%.c | $(OBJDIR) $(DEPDIR)
@echo compiling brchess module: $< "->" $@.
@$(CC) -c $(ALL_CFLAGS) $< -o $@
$(CC) -c $(ALL_CFLAGS) $< -o $@
##################################### brlib libraries
.PHONY: cleanbrlib cleanallbrlib brlib
@@ -279,9 +285,9 @@ FEN_OBJS := fen.o position.o piece.o bitboard.o board.o hyperbola-quintesse
BB_OBJS := fen.o position.o piece.o bitboard.o board.o hyperbola-quintessence.o \
attack.o
MOVEGEN_OBJS := fen.o position.o piece.o bitboard.o board.o hyperbola-quintessence.o \
attack.o move.o movegen.o
attack.o move.o move-gen.o
ATTACK_OBJS := fen.o position.o piece.o bitboard.o board.o hyperbola-quintessence.o \
attack.o move.o movegen.o
attack.o move.o move-gen.o
TEST := $(addprefix $(BINDIR)/,$(TEST))