-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
62 lines (45 loc) · 1.54 KB
/
Makefile
File metadata and controls
62 lines (45 loc) · 1.54 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
NAME = ircserv
NAME_bonus = ircserv_bonus
SRC = main.cpp Server.cpp Client.cpp Channel.cpp Commands.cpp helpFunctions.cpp part.cpp utils.cpp Commands/ping.cpp Commands/join.cpp Commands/pass.cpp
SRC += Commands/nick.cpp Commands/privmsg.cpp Commands/topic.cpp Commands/user.cpp Commands/quit.cpp Commands/invite.cpp Commands/kick.cpp Commands/mode.cpp
SRC_bonus = main.cpp Server.cpp Client.cpp Channel.cpp bonus/Commands_bonus.cpp helpFunctions.cpp bonus/part_bonus.cpp utils.cpp Commands/ping.cpp Commands/join.cpp Commands/pass.cpp
SRC_bonus += Commands/nick.cpp Commands/privmsg.cpp Commands/topic.cpp Commands/user.cpp Commands/quit.cpp Commands/invite.cpp Commands/kick.cpp Commands/mode.cpp bonus/Bot_bonus.cpp
OBJ = $(SRC:.cpp=.o)
OBJ_bonus = $(SRC_bonus:.cpp=.o)
CFLAGS = -Wall -Werror -Wextra -std=c++98
all: $(NAME)
$(NAME): $(OBJ)
c++ -o $(NAME) $(OBJ)
%.o: %.cpp
c++ $(CFLAGS) -c $< -o $@
bonus: $(NAME_bonus)
$(NAME_bonus): $(OBJ_bonus)
c++ -o $(NAME_bonus) $(OBJ_bonus)
%.o: %.cpp
c++ $(CFLAGS) -c $< -o $@
go: all
clear
./ircserv 6667 ola
bonusgo: bonus
clear
./ircserv_bonus 6667 ola
clean:
rm -rf $(OBJ)
rm -rf $(OBJ_bonus)
fclean: clean
rm -f $(NAME)
rm -f $(NAME_bonus)
re: fclean all
# Leaks/Valgrind test target
leaks: re
ifeq ($(OS), Darwin)
leaks -atExit -- ./$(NAME) 6667 ola
else
valgrind --leak-check=full --track-origins=yes ./$(NAME) 6667 ola
endif
lekas: re
ifeq ($(OS), Darwin)
leaks -atExit -- ./$(NAME) 6667 ola
else
valgrind --leak-check=full --track-origins=yes --track-fds=yes ./$(NAME) 6667 ola
endif