PK wrote:Graham, thanks for the logo, this cartoon creature is actually hilarious
as for makefile, I have actually next to none experience with it - probably the way to go would be to choose a simple one (Gerbil's?) and to type in the names of object files ( "blahblah.o" for each "blahblah.cpp")
anyhow, I guess that the next version should be at least gcc-compatibile.
Here's my make file. It should be in the source directory and called "Makefile" (respect lower/upper case!)
Code: Select all
CC=gcc
CFLAGS=-O3 -std=c99 -DPOSIX -DNDEBUG -Wall
LDFLAGS=-flto
SOURCES=bitboard.c board.c eval.c magic.c main.c move.c movegen.c movesort.c psq.c search.c tt.c uci.c uci_option.c util.c zobrist.c
OBJECTS=$(SOURCES:.c=.o)
EXECUTABLE=DC
all: $(SOURCES) $(EXECUTABLE)
$(EXECUTABLE): $(OBJECTS)
$(CC) $(LDFLAGS) $(OBJECTS) -o $@
.c.o: $(CC) $(CFLAGS) $< -o $@
You need to modify it by replacing gcc with g++, and change the "SOURCES" and CFLAGS accordingly.
Note that your code is not portable, because it contains incorrect "extern inline". This construction is illegal and makes no sense. I don't understand how MSVC allows it: each compiling unit is done independantly, so the compiler can't possible inline with sth in another compiling unit, this can only be done by the link time optimizer. inline functions should be defined in the *.h file. It's the only correct way, if you want to comply to the ISO/C++ standard. Once you fix this, there are only few warnings (mainly about some dubious casts), but it compiles.
Also another problem, I noticed that there's no option "Hash". Is it normal ? Sungorus had this option, and the UCI protocol specifies that such an option should be called "Hash" and nothing else (not "Hash Size").
I suppose the above would be a trivial fix ?[/code]