-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
46 lines (37 loc) · 809 Bytes
/
Makefile
File metadata and controls
46 lines (37 loc) · 809 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
# Compiler settings
CXX = c++
CXXFLAGS = -Wall -Wextra -Werror -std=c++98
NAME = ircserv
# Source files
SRCS = src/Channel.cpp \
src/Client.cpp \
src/main.cpp \
src/parsing.cpp \
src/Server.cpp \
src/commands/bet.cpp \
src/commands/dcc.cpp \
src/commands/invite.cpp \
src/commands/join.cpp \
src/commands/login.cpp \
src/commands/mode.cpp \
src/commands/privmsg.cpp \
src/commands/topic.cpp
OBJS = $(SRCS:.cpp=.o)
# Default target
all: $(NAME)
# Compilation
%.o: %.cpp
$(CXX) $(CXXFLAGS) -c $< -o $@
# Linking
$(NAME): $(OBJS)
$(CXX) $(CXXFLAGS) $(OBJS) -o $(NAME)
# Clean object files
clean:
rm -f $(OBJS)
# Clean everything
fclean: clean
rm -f $(NAME)
# Rebuild everything
re: fclean all
# Prevent conflicts with files named like our targets
.PHONY: all clean fclean re