-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
52 lines (42 loc) · 891 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
CXX=g++
LIBS=
CXXFLAGS=-Ofast -Wall -std=c++20
LDFLAGS=-lncurses $(LIBS)
TARGET=bcf_ai
.PHONY: all
SRC=main.cpp board.cpp game.cpp sofiai.cpp mariai.cpp draw.cpp pattern.cpp
OBJ=$(SRC:%.cpp=%.o)
DEP=$(OBJ:%.o=%.d)
all: $(TARGET)
$(TARGET): $(OBJ)
$(CXX) -o $@ $^ $(LDFLAGS)
-include $(DEP)
%.o: %.cpp
$(CXX) $(CXXFLAGS) -MMD -c $< -o $@
.PHONY: sofia
SRC=call_sofiai.cpp board.cpp sofiai.cpp
OBJ=$(SRC:%.cpp=%.o)
DEP=$(OBJ:%.o=%.d)
sofia: $(OBJ)
$(CXX) -o $@ $^ $(LDFLAGS)
-include $(DEP)
%.o: %.cpp
$(CXX) $(CXXFLAGS) -MMD -c $< -o $@
.PHONY: maria
SRC=call_mariai.cpp board.cpp mariai.cpp draw.cpp pattern.cpp
OBJ=$(SRC:%.cpp=%.o)
DEP=$(OBJ:%.o=%.d)
maria: $(OBJ)
$(CXX) -o $@ $^ $(LDFLAGS)
-include $(DEP)
%.o: %.cpp
$(CXX) $(CXXFLAGS) -MMD -c $< -o $@
.PHONY: sofmar
sofmar:
make sofia
make maria
.PHONY: clean
clean:
rm -f *.o
rm -f *.d
rm -f $(TARGET) sofia maria