-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
49 lines (37 loc) · 758 Bytes
/
Copy pathMakefile
File metadata and controls
49 lines (37 loc) · 758 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
NAME = ircserv
CXX = c++
CXXFLAGS = -Wall -Werror -Wextra -std=c++98 -pedantic
INCLUDE_DIR = includes
INCLUDE = ft_irc.hpp \
Server.hpp \
Channel.hpp \
Client.hpp \
SocketStream.hpp \
Message.hpp \
NumericReply.hpp
SRC_DIR = srcs
SRC = main.cpp \
Server.cpp \
Channel.cpp \
Client.cpp \
SocketStream.cpp \
Message.cpp
OBJ_DIR = objs
OBJ = ${SRC:.cpp=.o}
all: ${NAME}
$(OBJ_DIR):
mkdir -p ${OBJ_DIR}
${NAME}: $(addprefix ${OBJ_DIR}/, ${OBJ})
${CXX} ${CXXFLAGS} $^ -o $@
${OBJ_DIR}/%.o: ${SRC_DIR}/%.cpp | ${OBJ_DIR}
${CXX} -c ${CXXFLAGS} $< -I${INCLUDE_DIR} -o $@
clean:
rm -rf ${OBJ_DIR}
fclean:
${MAKE} clean
${RM} ${NAME}
${RM} ${TEST_NAME}
re:
${MAKE} fclean
${MAKE} all
.PHONY: all clean fclean re