This repository was archived by the owner on Aug 25, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
55 lines (41 loc) · 1.64 KB
/
Copy pathMakefile
File metadata and controls
55 lines (41 loc) · 1.64 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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: vkuusela <vkuusela@student.hive.fi> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2025/04/02 15:51:16 by vkuusela #+# #+# #
# Updated: 2025/08/22 12:31:34 by vkuusela ### ########.fr #
# #
# **************************************************************************** #
NAME = ircserv
CC = c++
CFLAGS = -Wall -Wextra -Werror -std=c++20
RM = rm -rf
SOURCES = main.cpp RecvParser.cpp Client.cpp Server.cpp
HEADERS = RecvParser.hpp Client.hpp Server.hpp
OBJECTS = $(SOURCES:.cpp=.o)
%.o: %.cpp $(HEADERS)
@$(CC) $(CFLAGS) -c $< -o $@
all: $(NAME)
$(NAME): $(OBJECTS) $(HEADERS)
@echo -n "Compiling $(NAME)..."
@$(CC) $(CFLAGS) $(OBJECTS) -o $(NAME)
@echo " Done."
clean:
@echo -n "Cleaning .o files..."
@$(RM) $(OBJECTS)
@echo " Done."
fclean: clean
@echo -n "Full clean..."
@$(RM) $(NAME)
@echo " Done."
re: fclean all
debug: CFLAGS += -g
debug: re
fsanitize: CFLAGS += -g -fsanitize=address
fsanitize: re
gprof: CFLAGS += -g -pg
gprof: re
.PHONY: all clean fclean re debug fsanitize gprof