-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
82 lines (65 loc) · 2.22 KB
/
Makefile
File metadata and controls
82 lines (65 loc) · 2.22 KB
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
69
70
71
72
73
74
75
76
77
78
79
80
# | | ___ \ \ | |
# | | ) | |\/ | _ | | / _
# ___ __| __/ | | ( | < __/
# _| _____| _| _| \__,_| _|\_\ \___|
# by jcluzet
################################################################################
# CONFIG #
################################################################################
NAME := ircserv
CC := c++
FLAGS := -Wall -Wextra -Werror -std=c++98 -g
################################################################################
# PROGRAM'S SRCS #
################################################################################
SRCS := main.cpp \
checks.cpp\
error.cpp\
Client.cpp\
Numeric.cpp \
Server.cpp\
Channel.cpp\
Utils.cpp \
HandleMessage.cpp \
commands/Pass.cpp \
commands/Nick.cpp \
commands/User.cpp \
commands/Join.cpp \
commands/Topic.cpp\
commands/Part.cpp\
commands/Privmsg.cpp\
commands/Quit.cpp\
commands/Kick.cpp\
commands/Names.cpp\
commands/Cap.cpp\
commands/Who.cpp\
commands/Mode.cpp\
commands/Notice.cpp\
commands/Ping.cpp\
OBJS := ${SRCS:.cpp=.o}
.cpp.o:
${CC} ${FLAGS} -c $< -o ${<:.cpp=.o}
################################################################################
# Makefile objs #
################################################################################
CLR_RMV := \033[0m
RED := \033[1;31m
GREEN := \033[1;32m
YELLOW := \033[1;33m
BLUE := \033[1;34m
CYAN := \033[1;36m
RM := rm -f
${NAME}: ${OBJS}
@echo "$(GREEN)Compilation ${CLR_RMV}of ${YELLOW}$(NAME) ${CLR_RMV}..."
${CC} ${FLAGS} -o ${NAME} ${OBJS}
@echo "$(GREEN)$(NAME) created[0m ✔️"
all: ${NAME}
bonus: all
clean:
@ ${RM} *.o */*.o */*/*.o
@ echo "$(RED)Deleting $(CYAN)$(NAME) $(CLR_RMV)objs ✔️"
fclean: clean
@ ${RM} ${NAME}
@ echo "$(RED)Deleting $(CYAN)$(NAME) $(CLR_RMV)binary ✔️"
re: fclean all
.PHONY: all clean fclean re