-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
42 lines (29 loc) · 746 Bytes
/
Copy pathMakefile
File metadata and controls
42 lines (29 loc) · 746 Bytes
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
##
## EPITECH PROJECT, 2025
## rush-04
## File description:
## Makefile
##
NAME = MyGKrellm
CXX = g++
CXXFLAGS = -Wall -Wextra -Werror -std=c++17 -I include/ -I src/
SRC_CORE = $(wildcard src/core/*.cpp)
SRC_MODULES = $(wildcard src/modules/*.cpp)
SRC_DISPLAYS = $(wildcard src/displays/*.cpp)
SRC_MAIN = src/main.cpp
SRC = $(SRC_CORE) $(SRC_MODULES) $(SRC_DISPLAYS) $(SRC_MAIN)
OBJ_DIR = obj
OBJ = $(SRC:%.cpp=$(OBJ_DIR)/%.o)
LDFLAGS = -lncurses -lsfml-graphics -lsfml-window -lsfml-system
all: $(NAME)
$(NAME): $(OBJ)
$(CXX) -o $(NAME) $(OBJ) $(LDFLAGS)
$(OBJ_DIR)/%.o: %.cpp
@mkdir -p $(dir $@)
$(CXX) $(CXXFLAGS) -c $< -o $@
clean:
rm -rf $(OBJ_DIR)
fclean: clean
rm -f $(NAME)
re: fclean all
.PHONY: all clean fclean re