blob: a6f0b5580b88c0f685313022ba8ccc5ef58bb0db (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
CXX = g++
CXXFLAGS = -Wall -Wextra -O3 -g -std=c++17 -fwrapv -flto
TARGET = main
ifneq ($(value AI),)
CXXFLAGS += "-DAI_CHOICE=$(value AI)"
endif
.PHONY: all clean
all: $(TARGET)
clean:
rm -f $(TARGET) *.o
main: $(patsubst %.cpp,%.o,$(wildcard *.cpp))
$(CXX) $(CXXFLAGS) $^ -o $@
%.o: %.cpp $(wildcard *.h)
$(CXX) $(CXXFLAGS) -c -o $@ $<
|