-
Notifications
You must be signed in to change notification settings - Fork 13
/
Makefile
38 lines (30 loc) · 905 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
CXX = g++
CXXFLAGS = -Wall -Wextra -std=c++17 -O3 -g -DNDEBUG
NATIVE = -march=native
# Detect Windows
ifeq ($(OS), Windows_NT)
uname_S := Windows
else
ifeq ($(COMP), MINGW)
uname_S := Windows
else
uname_S := $(shell uname -s)
endif
endif
ifeq ($(uname_S), Darwin)
NATIVE =
endif
SRC_FILE = scoreWDLstat.cpp
EXT_SRC_FILE = external/gzip/gzstream.cpp
EXE_FILE = scoreWDLstat
HEADERS = scoreWDLstat.hpp
EXT_HEADERS = external/chess.hpp external/json.hpp external/threadpool.hpp external/gzip/gzstream.h external/parallel_hashmap/phmap.h
all: $(EXE_FILE)
$(EXE_FILE): $(SRC_FILE) $(HEADERS) $(EXT_HEADERS) $(EXT_SRC_FILE)
$(CXX) $(CXXFLAGS) $(NATIVE) -o $(EXE_FILE) $(SRC_FILE) $(EXT_SRC_FILE) -lz
format:
clang-format -i $(SRC_FILE) $(HEADERS)
black -q download_fishtest_pgns.py scoreWDL.py download_missing_metadata.py
shfmt -w -i 4 updateWDL.sh
clean:
rm -f $(EXE_FILE) $(EXE_FILE).exe