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 $@ $<