forked from i-m-rc/IRC
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
52 lines (42 loc) · 874 Bytes
/
Makefile
File metadata and controls
52 lines (42 loc) · 874 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
43
44
45
46
47
48
49
50
51
52
NAME = ircserv
CXX = c++
CXXFLAGS = -Wall -Wextra -Werror -std=c++98
HEADER = ./includes
HEADER_CMDS = ./includes/commands/
SRCS_NAME = main.cpp \
Server.cpp \
UserAccount.cpp \
Database.cpp \
Channel.cpp
SRCS_PREFIX = ./srcs/
SRCS = $(addprefix $(SRCS_PREFIX), $(SRCS_NAME))
CMDS_NAME = Pass.cpp \
Command.cpp \
Nick.cpp \
User.cpp \
Ping.cpp \
Join.cpp \
Kick.cpp \
Invite.cpp \
Topic.cpp \
Privmsg.cpp \
Mode.cpp \
Oper.cpp \
Part.cpp \
Quit.cpp
CMDS_PREFIX = ./srcs/commands/
SRCS += $(addprefix $(CMDS_PREFIX), $(CMDS_NAME))
OBJS = $(SRCS:.cpp=.o)
all : $(NAME)
$(NAME) : $(OBJS)
$(CXX) $(CXXFLAGS) -o $(NAME) $^
%.o : %.cpp
@$(CXX) $(CXXFLAGS) -c $< -o $@ -I$(HEADER) -I$(HEADER_CMDS)
clean :
rm -f $(OBJS)
fclean : clean
rm -f $(NAME)
re :
$(MAKE) fclean
$(MAKE) all
.PHONY : all bonus clean fclean re