Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # THIS MAKEFILE IS ONLY INTENDED FOR OPENBENCH
- # BUILD WITH CMAKE PER THE INSTRUCTIONS IN THE README
- EXE = midnight
- SOURCES := src/move_generation/position.cpp src/move_generation/tables.cpp src/move_generation/types.cpp src/move_search/tables/transposition_table.cpp src/move_search/tables/pv_table.h src/utils/helpers.cpp src/utils/clock.cpp src/move_search/tables/history_table.cpp src/move_search/tables/lmr_table.cpp src/move_search/move_ordering/move_ordering.cpp src/engine.cpp src/move_search/reductions.cpp src/move_search/search.cpp src/move_search/types.cpp src/move_search/pvs.cpp
- SUFFIX :=
- CXX := clang++
- CXXFLAGS := -std=c++20 -O3 -flto -march=native -DNDEBUG -DPS_NATIVE -DPS_VERSION=$(shell git rev-parse --short HEAD)
- LDFLAGS :=
- ifeq ($(OS), Windows_NT)
- DETECTED_OS := Windows
- SUFFIX := .exe
- # don't support gcc on windows, too much of a pain for now
- ifeq (,$(findstring clang,$(shell $(CXX) --version)))
- $(error GCC and MSVC unsupported on Windows)
- endif
- LDFLAGS += -fuse-ld=lld
- else
- DETECTED_OS := $(shell uname -s)
- SUFFIX :=
- ifneq (,$(findstring clang,$(shell $(CXX) --version)))
- ifneq ($(DETECTED_OS),Darwin)
- LDFLAGS += -fuse-ld=lld
- endif
- endif
- LDFLAGS += -lpthread
- # don't ask
- ifdef IS_COSMO
- CXXFLAGS += -stdlib=libc++
- endif
- endif
- OUT := $(EXE)$(SUFFIX)
- all: $(EXE)
- $(EXE): $(SOURCES)
- $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $(OUT) $^
- clean:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement