summaryrefslogtreecommitdiff
path: root/competition/Makefile
blob: 8b2641c05401cfab91ba4e109a7a5483a2d4e668 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
CXX = g++
CXXFLAGS = -Wall -Wextra -O3 -std=c++17 -fwrapv -flto -pthread

TARGET = competition

SOURCES := $(wildcard *.cpp) ../board.cpp
HEADERS := $(wildcard *.h) ../board.h

.PHONY: all clean

all: $(TARGET)

clean:
	rm -f $(TARGET) *.o


competition: $(SOURCES:.cpp=.o)
	$(CXX) $(CXXFLAGS) $^ -o $@

%.o: %.cpp $(HEADERS)
	$(CXX) $(CXXFLAGS) -c -o $@ $<