forked from 5Circle42IRC/IRC
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
59 lines (51 loc) · 1.78 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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: jwee <[email protected]> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2023/06/21 18:45:57 by ysungwon #+# #+# #
# Updated: 2023/06/26 13:31:57 by jwee ### ########.fr #
# #
# **************************************************************************** #
CXX = c++
CXXFLAGS = -Wall -Werror -Wextra -std=c++98 #-g3 -fsanitize=address
TARGET = ircserv
SRCDIR = ./srcs
OBJDIR = ./objs
OBJCMDDIR = ./objs/command
SRCS = main.cpp \
IrcCommand.cpp \
IrcClient.cpp \
IrcChannel.cpp \
IrcDB.cpp \
IrcServ.cpp \
command/NICK.cpp \
command/USER.cpp \
command/JOIN.cpp \
command/PART.cpp \
command/PRIVMSG.cpp \
command/TOPIC.cpp \
command/INVITE.cpp \
command/PING.cpp \
command/PONG.cpp \
command/MODE.cpp\
command/KICK.cpp \
command/PASS.cpp \
command/BOT.cpp
OBJS = $(patsubst %.cpp,$(OBJDIR)/%.o,$(SRCS))
$(TARGET): $(OBJS)
$(CXX) $(CXXFLAGS) $^ -o $@
$(OBJDIR)/%.o: $(SRCDIR)/%.cpp
@mkdir -p $(OBJDIR)
@mkdir -p $(OBJCMDDIR)
$(CXX) $(CXXFLAGS) -c $< -o $@
.PHONY: all clean fclean re
all: $(TARGET)
clean:
@rm -rf $(OBJDIR)
fclean: clean
@rm -f $(TARGET)
re: fclean
@make -j4 all