-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
48 lines (33 loc) · 895 Bytes
/
Makefile
File metadata and controls
48 lines (33 loc) · 895 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
.PHONY: all clean fclean re
_END = \033[0;0m
_RED = \033[0;31m
_GREEN = \033[0;32m
NAME = ircserv
CXX = clang++
CXXFLAGS = -std=c++98 -I ${INC_DIR} -I ${INC_DIR2} -g -I ${SSL_DIR}
SSL_DIR = ./ssl
INC_DIR = ./includes
INC_DIR2 = ./includes/command
SRCS = $(wildcard ./srcs/*.cpp)
SRCS += $(wildcard ./srcs/command/*.cpp)
OBJS = $(patsubst %.cpp, %.o, ${SRCS})
LIBS = $(wildcard ./ssl/*.a)
$(NAME) : $(OBJS)
@$(CXX) $(OBJS) $(CXXFLAGS) $(LIBS) -o $(NAME)
@echo "${_GREEN}COMPILE COMPLETE${_END}"
%.o : %.cpp
@echo "${_GREEN}Compiling...${_END}"
@$(CXX) -o $@ -c $^ $(CXXFLAGS)
all : $(NAME)
clean :
@echo "${_RED}REMOVE OBJECTS...${_END}"
@rm -f $(OBJS)
fclean : clean
@echo "${_RED}REMOVE PROGRAM...${_END}"
@rm -f $(NAME)
@rm -f ./chatbot
@rm -rf server.dSYM
bonus :
@echo "${_GREEN}MAKING CHATBOT...${_END}"
@clang++ tmp/chatbot.cpp -o ./chatbot
re : fclean all