Advertisement
adfasdfadsfasdf

Untitled

Apr 28th, 2023
22
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.40 KB | None | 0 0
  1.  
  2. # THIS MAKEFILE IS ONLY INTENDED FOR OPENBENCH
  3. # BUILD WITH CMAKE PER THE INSTRUCTIONS IN THE README
  4.  
  5. EXE = midnight
  6.  
  7. 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 move_search/pvs.cpp
  8.  
  9.  
  10.  
  11. SUFFIX :=
  12.  
  13. CXX := clang++
  14. CXXFLAGS := -std=c++20 -O3 -flto -march=native -DNDEBUG -DPS_NATIVE -DPS_VERSION=$(shell git rev-parse --short HEAD)
  15.  
  16. LDFLAGS :=
  17.  
  18. ifeq ($(OS), Windows_NT)
  19. DETECTED_OS := Windows
  20. SUFFIX := .exe
  21. # don't support gcc on windows, too much of a pain for now
  22. ifeq (,$(findstring clang,$(shell $(CXX) --version)))
  23. $(error GCC and MSVC unsupported on Windows)
  24. endif
  25. LDFLAGS += -fuse-ld=lld
  26. else
  27. DETECTED_OS := $(shell uname -s)
  28. SUFFIX :=
  29. ifneq (,$(findstring clang,$(shell $(CXX) --version)))
  30. ifneq ($(DETECTED_OS),Darwin)
  31. LDFLAGS += -fuse-ld=lld
  32. endif
  33. endif
  34. LDFLAGS += -lpthread
  35. # don't ask
  36. ifdef IS_COSMO
  37. CXXFLAGS += -stdlib=libc++
  38. endif
  39. endif
  40.  
  41. OUT := $(EXE)$(SUFFIX)
  42.  
  43. all: $(EXE)
  44.  
  45. $(EXE): $(SOURCES)
  46. $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $(OUT) $^
  47.  
  48. clean:
  49.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement