Set required feature flag macro for Linux builds

This commit is contained in:
2026-01-08 15:45:38 +01:00
parent 123caf8378
commit 33a0878f6a

View File

@@ -6,7 +6,7 @@ CFLAGS.gcc := -std=c23 -Wall -Wextra -Wconversion -Wno-unused-function
CFLAGS.gcc.release := -Ofast -march=native -DNDEBUG CFLAGS.gcc.release := -Ofast -march=native -DNDEBUG
CFLAGS.gcc.debug := -ggdb -O1 -fsanitize=address CFLAGS.gcc.debug := -ggdb -O1 -fsanitize=address
CFLAGS.clang := -std=c23 -g -Wall -Wextra -Wconversion -Wno-unused-function -Wimplicit-int-conversion CFLAGS.clang := -std=c23 -g -Wall -Wextra -Wconversion -Wno-unused-function -Wimplicit-int-conversion -Wno-macro-redefined
CFLAGS.clang.release := -O3 -ffast-math -march=native -DNDEBUG -DNSTATS CFLAGS.clang.release := -O3 -ffast-math -march=native -DNDEBUG -DNSTATS
CFLAGS.clang.debug := -g3 -O1 -fsanitize=address,undefined CFLAGS.clang.debug := -g3 -O1 -fsanitize=address,undefined
CFLAGS.clang.wasm := \ CFLAGS.clang.wasm := \
@@ -22,7 +22,7 @@ all: tests
wasm: chess.wasm wasm: chess.wasm
codegen: codegen.c codegen: codegen.c
$(CC) -o $@ $(CFLAGS) $^ $(CC) -D_DEFAULT_SOURCE -o $@ $(CFLAGS) $^
chess.wasm: wasm-compat.c mbb_rook.h mbb_bishop.h engine.h chess.wasm: wasm-compat.c mbb_rook.h mbb_bishop.h engine.h
$(CC) -DWASM -o $@ wasm-compat.c $(CFLAGS.$(CC)) $(CFLAGS.$(CC).wasm) $(CC) -DWASM -o $@ wasm-compat.c $(CFLAGS.$(CC)) $(CFLAGS.$(CC).wasm)
@@ -34,4 +34,4 @@ mbb_bishop.h: codegen
./codegen ./codegen
tests: tests.c mbb_rook.h mbb_bishop.h engine.h tests: tests.c mbb_rook.h mbb_bishop.h engine.h
$(CC) -o $@ $(CFLAGS) tests.c $(CC) -D_DEFAULT_SOURCE -o $@ $(CFLAGS) tests.c