CXX = g++ CXXFLAGS = -Wall -Wextra -O2 -std=c++17 -fwrapv -pthread TARGET = competition SOURCES := $(wildcard *.cpp) HEADERS := $(wildcard *.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 $@ $<