Set required feature flag macro for Linux builds
This commit is contained in:
6
Makefile
6
Makefile
@@ -6,7 +6,7 @@ CFLAGS.gcc := -std=c23 -Wall -Wextra -Wconversion -Wno-unused-function
|
||||
CFLAGS.gcc.release := -Ofast -march=native -DNDEBUG
|
||||
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.debug := -g3 -O1 -fsanitize=address,undefined
|
||||
CFLAGS.clang.wasm := \
|
||||
@@ -22,7 +22,7 @@ all: tests
|
||||
wasm: chess.wasm
|
||||
|
||||
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
|
||||
$(CC) -DWASM -o $@ wasm-compat.c $(CFLAGS.$(CC)) $(CFLAGS.$(CC).wasm)
|
||||
@@ -34,4 +34,4 @@ mbb_bishop.h: codegen
|
||||
./codegen
|
||||
|
||||
tests: tests.c mbb_rook.h mbb_bishop.h engine.h
|
||||
$(CC) -o $@ $(CFLAGS) tests.c
|
||||
$(CC) -D_DEFAULT_SOURCE -o $@ $(CFLAGS) tests.c
|
||||
|
||||
Reference in New Issue
Block a user