-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
199 lines (177 loc) · 5.03 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
NAME = ircserv
CC = c++
FLAGS = -Wall -Wextra -Werror -std=c++98
RM = rm -rf
SRC_DIR = src/
OBJ_DIR = objects/
USER = $(shell whoami)
SRC = $(MAIN) \
$(PARSING) \
$(SERVER) \
$(CONFIG) \
$(ADMIN) \
$(CLIENT) \
$(CHANNEL) \
$(USER) \
$(COMMANDS) \
$(MESSAGES) \
$(BOT) \
MAIN = main/Irc \
PARSING = parsing/Parsing \
parsing/Parser \
SERVER = server/Server \
CLIENT = client/ClientAuthenticate \
ADMIN = admin/Admin \
CONFIG = config/Config \
USER = user/User \
COMMANDS = commands/Commands \
commands/CommandUtils \
commands/ProcessCommands \
commands/OnlyOperatorCommands \
MESSAGES = chat/Messages \
CHANNEL = channel/Channel \
BOT = bot/Bot \
SRCS = $(addprefix $(SRC_DIR), $(addsuffix .cpp, $(SRC)))
OBJS = $(addprefix $(OBJ_DIR), $(addsuffix .o, $(SRC)))
all: $(NAME)
$(NAME): $(OBJS)
@echo "$(RED)Welcome to Interdimensional Rickroll Conspiracy.. ಥ‿ಥ$(COLOR_END)"
@sleep 0.1
@echo "$(BWhite)Be careful not to get rickrolled ಥ‿ಥ$(COLOR_END)"
@echo "$(YELLOW)Compiling.. ಥ‿ಥ\n$(COLOR_END)"
@$(CC) $(CFLAGS) -o $(NAME) $(OBJS)
@for i in $$(seq 35); do \
percentage=$$(($$i * 100 / 35)); \
printf "$(YELLOW)\rMining sockets $(RED) %d%% $(BLUE)" $$percentage; \
for j in $$(seq $$i); do \
printf "█"; \
done; \
sleep 0.02; \
done
@printf "$(GREEN) Done!\n\n"
@for i in $$(seq 35); do \
percentage=$$(($$i * 100 / 35)); \
printf "$(YELLOW)\rSetting up listening ears $(RED)%d%% $(BLUE)" $$percentage; \
for j in $$(seq $$i); do \
printf "█"; \
done; \
sleep 0.02; \
done
@printf "$(GREEN) Done!\n\n"
@for i in $$(seq 35); do \
percentage=$$(($$i * 100 / 35)); \
printf "$(YELLOW)\rForging switch statements $(RED)%d%% $(BLUE)" $$percentage; \
for j in $$(seq $$i); do \
printf "█"; \
done; \
sleep 0.02; \
done
@printf "$(GREEN) Done!\n\n"
@for i in $$(seq 35); do \
percentage=$$(($$i * 100 / 35)); \
printf "$(YELLOW)\rCooking sphagetti, ala code $(RED)%d%% $(BLUE)" $$percentage; \
for j in $$(seq $$i); do \
printf "█"; \
done; \
sleep 0.02; \
done
@printf "$(GREEN) Done!\n\n"
@for i in $$(seq 35); do \
percentage=$$(($$i * 100 / 35)); \
printf "$(YELLOW)\rConstructing the Bot service $(RED)%d%% $(BLUE)" $$percentage; \
for j in $$(seq $$i); do \
printf "█"; \
done; \
sleep 0.02; \
done
@printf "$(GREEN) Done!\n\n"
@for i in $$(seq 35); do \
percentage=$$(($$i * 100 / 35)); \
printf "$(YELLOW)\rCreating General channel $(RED)%d%% $(BLUE)" $$percentage; \
for j in $$(seq $$i); do \
printf "█"; \
done; \
sleep 0.02; \
done
@printf "$(GREEN) Done!\n\n"
@for i in $$(seq 35); do \
percentage=$$(($$i * 100 / 35)); \
printf "$(YELLOW)\rCreating users $(RED)%d%% $(BLUE)" $$percentage; \
for j in $$(seq $$i); do \
printf "█"; \
done; \
sleep 0.02; \
done
@printf "$(GREEN) Done!\n\n"
@for i in $$(seq 35); do \
percentage=$$(($$i * 100 / 35)); \
printf "$(YELLOW)\rRealizing send makes no sendse $(RED)%d%% $(BLUE)" $$percentage; \
for j in $$(seq $$i); do \
printf "█"; \
done; \
sleep 0.02; \
done
@printf "$(GREEN) Done!\n\n"
@for i in $$(seq 35); do \
percentage=$$(($$i * 100 / 35)); \
printf "$(YELLOW)\rBegging to the server not to crash $(RED)%d%% $(BLUE)" $$percentage; \
for j in $$(seq $$i); do \
printf "█"; \
done; \
sleep 0.02; \
done
@printf "$(GREEN) Done!\n\n"
@for i in $$(seq 35); do \
percentage=$$(($$i * 100 / 35)); \
printf "$(YELLOW)\rSaying final prayers $(RED)%d%% $(BLUE)" $$percentage; \
for j in $$(seq $$i); do \
printf "█"; \
done; \
sleep 0.02; \
done
@printf "$(GREEN) Done!\n\n"
@for i in $$(seq 25); do \
percentage=$$(($$i * 100 / 50)); \
if [ $$percentage -le 24 ]; then \
printf "$(YELLOW)\rAvoiding brain damage $(RED) %d%% $(BLUE)" $$percentage; \
else \
printf "$(YELLOW)\rAvoiding brain damage $(RED) %d%% $(RED)" $$percentage; \
fi; \
for j in $$(seq $$i); do \
printf "█"; \
done; \
sleep 0.02; \
done
@printf "$(RED) CRASH!\n\n"
@echo "$(BWhite)The project is compiled.. ಥ‿ಥ$(COLOR_END)"
@for i in $$(seq 1); do \
sleep 1; \
$(RICK); \
done
$(OBJ_DIR)%.o: $(SRC_DIR)%.cpp
@mkdir -p $(@D)
@$(CC) $(CFLAGS) -c $< -o $@
clean:
@echo "$(YELLOW)Cleaning...$(COLOR_END)"
@$(RM) $(OBJ_DIR)
@echo "$(GREEN)Cleaning done.$(COLOR_END)"
fclean: clean
@echo "$(YELLOW)Cleaning everything...$(COLOR_END)"
@$(RM) $(NAME)
@echo "$(GREEN)Cleaning done.$(COLOR_END)"
re:
@echo "$(YELLOW)Recompiling...$(COLOR_END)"
@make fclean
@make all
@echo "$(GREEN)The project has been recompiled.$(COLOR_END)"
COLOR_END = \033[0;39m
CYAN3 = \033[1;4;96m
YELLOW = \033[1;33m
PURPLE = \033[1;35m
BWhite = \033[1;37m
RED = \033[1;91m
GREEN = \033[1;92m
CYAN2 = \x1B[1;36m
BLUE = \033[1;34m
RICK = open https://www.youtube.com/watch?v=dQw4w9WgXcQ
.PHONY: all clean fclean re displaypercent