spinojara / bitbit

A bitboard based chess engine written in c.
GNU General Public License v2.0
4 stars 0 forks source link

Program not printing version properly #1

Closed rchastain closed 1 year ago

rchastain commented 1 year ago

Hello! Very nice program.

Here it doesn't print the version properly, I don't know why.

[roland@localhost bitbit (master)]$ make
cc -std=c99 -Wall -Wextra -Wshadow -pedantic -O2 -march=native -flto -Iinclude -c src/bitboard.c -o obj/bitboard.o
cc -std=c99 -Wall -Wextra -Wshadow -pedantic -O2 -march=native -flto -Iinclude -c src/magic_bitboard.c -o obj/magic_bitboard.o
cc -std=c99 -Wall -Wextra -Wshadow -pedantic -O2 -march=native -flto -Iinclude -c src/attack_gen.c -o obj/attack_gen.o
cc -std=c99 -Wall -Wextra -Wshadow -pedantic -O2 -march=native -flto -Iinclude -c src/move.c -o obj/move.o
cc -std=c99 -Wall -Wextra -Wshadow -pedantic -O2 -march=native -flto -Iinclude -c src/util.c -o obj/util.o
cc -std=c99 -Wall -Wextra -Wshadow -pedantic -O2 -march=native -flto -Iinclude -c src/position.c -o obj/position.o
cc -std=c99 -Wall -Wextra -Wshadow -pedantic -O2 -march=native -flto -Iinclude -c src/move_gen.c -o obj/move_gen.o
cc -std=c99 -Wall -Wextra -Wshadow -pedantic -O2 -march=native -flto -Iinclude -c src/perft.c -o obj/perft.o
cc -std=c99 -Wall -Wextra -Wshadow -pedantic -O2 -march=native -flto -Iinclude -c src/search.c -o obj/search.o
cc -std=c99 -Wall -Wextra -Wshadow -pedantic -O2 -march=native -flto -Iinclude -c src/evaluate.c -o obj/evaluate.o
cc -std=c99 -Wall -Wextra -Wshadow -pedantic -O2 -march=native -flto -Iinclude -DVERSION=0.3 -c src/interface.c -o obj/interface.o
cc -std=c99 -Wall -Wextra -Wshadow -pedantic -O2 -march=native -flto -Iinclude  -c src/transposition_table.c -o obj/transposition_table.o
cc -std=c99 -Wall -Wextra -Wshadow -pedantic -O2 -march=native -flto -Iinclude -c src/init.c -o obj/init.o
cc -std=c99 -Wall -Wextra -Wshadow -pedantic -O2 -march=native -flto -Iinclude -c src/time_man.c -o obj/time_man.o
cc -std=c99 -Wall -Wextra -Wshadow -pedantic -O2 -march=native -flto -Iinclude -c src/interrupt.c -o obj/interrupt.o
cc -std=c99 -Wall -Wextra -Wshadow -pedantic -O2 -march=native -flto -Iinclude -c src/pawn.c -o obj/pawn.o
cc -std=c99 -Wall -Wextra -Wshadow -pedantic -O2 -march=native -flto -Iinclude -c src/history.c -o obj/history.o
cc -std=c99 -Wall -Wextra -Wshadow -pedantic -O2 -march=native -flto -Iinclude -c src/bitbit.c -o obj/bitbit.o
cc -std=c99 -Wall -Wextra -Wshadow -pedantic -O2 -march=native -flto obj/bitboard.o obj/magic_bitboard.o obj/attack_gen.o obj/move.o obj/util.o obj/position.o obj/move_gen.o obj/perft.o obj/search.o obj/evaluate.o obj/interface.o obj/transposition_table.o obj/init.o obj/time_man.o obj/interrupt.o obj/pawn.o obj/history.o obj/bitbit.o -o bitbit
cc -std=c99 -Wall -Wextra -Wshadow -pedantic -O2 -march=native -flto -Iinclude -D_POSIX_C_SOURCE -c src/ava.c -o obj/ava.o
cc -std=c99 -Wall -Wextra -Wshadow -pedantic -O2 -march=native -flto -lpthread obj/bitboard.o obj/magic_bitboard.o obj/attack_gen.o obj/move.o obj/util.o obj/position.o obj/move_gen.o obj/transposition_table.o obj/init.o obj/history.o obj/ava.o -o ava
[roland@localhost bitbit (master)]$ ./bitbit --version
bitbit VERSION
Copyright (C) 2022 Isak Ellmer  
[roland@localhost bitbit (master)]$

My compiler is GCC 10.4.0.

spinojara commented 1 year ago

The VERSION variable was defined for the wrong source file. Thank you.

rchastain commented 1 year ago

You are welcome. Thank you for the fix.