-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
68 lines (55 loc) · 1.95 KB
/
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# **************************************************************************** #
# #
# :::::::: #
# Makefile :+: :+: #
# +:+ #
# By: ageels <[email protected]> +#+ #
# tnuyten <[email protected]> +#+ #
# Created: 2024/02/08 14:18:28 by ageels #+# #+# #
# Updated: 2024/02/08 14:18:29 by ageels ######## odam.nl #
# #
# **************************************************************************** #
NAME := ircserv
CXX = c++
CXXFLAGS = -Wall -Wextra -Werror -Iinclude -Ofast
# CXXFLAGS += -g -fno-omit-frame-pointer #-fsanitize=address
# MAKEFLAGS += --no-print-directory
SRC_DIR = src
OBJ_DIR = obj
HDR = include/ircserver.hpp \
include/Msg.hpp \
include/Server.hpp \
include/Channel.hpp \
include/Client.hpp \
include/Command.hpp \
include/Env.hpp \
include/Executor.hpp \
include/SignalHandler.hpp
SRC = $(SRC_DIR)/main.cpp \
$(SRC_DIR)/parse.cpp \
$(SRC_DIR)/Msg.cpp \
$(SRC_DIR)/Server.cpp \
$(SRC_DIR)/Channel.cpp \
$(SRC_DIR)/Client.cpp \
$(SRC_DIR)/Command.cpp \
$(SRC_DIR)/Env.cpp \
$(SRC_DIR)/Executor.cpp \
$(SRC_DIR)/Executor_mode.cpp \
$(SRC_DIR)/SignalHandler.cpp \
$(SRC_DIR)/Utils.cpp \
OBJ = $(patsubst $(SRC_DIR)/%.cpp,$(OBJ_DIR)/%.o,$(SRC))
all : $(NAME)
# all:
# $(MAKE) -j $(NAME)
$(OBJ_DIR)/%.o : $(SRC_DIR)/%.cpp | $(OBJ_DIR)
$(CXX) $(CXXFLAGS) -c -o $@ $<
$(NAME): $(OBJ) $(HDR)
$(CXX) $(CXXFLAGS) -o $(NAME) $(OBJ)
$(OBJ_DIR) :
mkdir -pv $(OBJ_DIR)
clean :
rm -fr $(OBJ_DIR)
fclean : clean
rm -f $(NAME)
re : fclean all
.PHONY: all clean fclean re