-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
65 lines (51 loc) · 1.65 KB
/
Makefile
File metadata and controls
65 lines (51 loc) · 1.65 KB
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
53
54
55
56
57
58
59
60
61
62
63
64
65
##
## EPITECH PROJECT, 2024
## LavaTensor
## File description:
## Makefile
##
CXX := g++ -std=c++23
CXXFLAGS := -Wall -Wextra -O3
SRC_DIR_GEN := src/generator
SRC_DIR_ANA := src/analyzer
SRC_DIR_UTILS := src/utils/
LIB_DIR_UTILS := lib/
INCLUDES := -I$(SRC_DIR_GEN) \
-I$(SRC_DIR_ANA) \
-I$(SRC_DIR_UTILS) \
-I$(LIB_DIR_UTILS) \
-Isrc/
SRCS_GEN := $(addsuffix .cpp, \
lib/Tensor/TensorArray \
lib/Tensor/Tensor \
$(addprefix $(SRC_DIR_GEN)/, \
main \
))
SRCS_ANA := $(addsuffix .cpp, \
lib/Tensor/TensorArray \
lib/Tensor/Tensor \
$(addprefix $(SRC_DIR_UTILS), \
FenConverter \
NetworkLoader \
) \
$(addprefix $(SRC_DIR_ANA)/, \
main \
$(addprefix training/, \
chessTraining \
) \
))
OBJS_GEN := $(SRCS_GEN:%.cpp=%.o)
OBJS_ANA := $(SRCS_ANA:%.cpp=%.o)
all: my_torch_generator my_torch_analyzer
my_torch_generator: $(OBJS_GEN)
$(CXX) $(CXXFLAGS) $(INCLUDES) -o $@ $(OBJS_GEN) $(LDLIBS)
my_torch_analyzer: $(OBJS_ANA)
$(CXX) $(CXXFLAGS) $(INCLUDES) -o $@ $(OBJS_ANA) $(LDLIBS)
%.o: %.cpp
$(CXX) $(CXXFLAGS) $(INCLUDES) -c $< -o $@
clean:
rm -rf $(OBJS_GEN) $(OBJS_ANA)
fclean: clean
rm -rf my_torch_generator my_torch_analyzer
re: fclean all
.PHONY: all clean fclean re