-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
53 lines (39 loc) · 871 Bytes
/
Makefile
File metadata and controls
53 lines (39 loc) · 871 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
47
48
49
50
51
52
53
# Compiler
CXX := c++
# Compiler flags
CXXFLAGS := -Wall -Wextra -Werror -std=c++98 -g3 -fsanitize=address
# Source files
SRCS := main.cpp \
Parse.cpp \
Server.cpp \
Channel.cpp \
Commands.cpp \
User.cpp \
Utils.cpp \
# Object files
OBJS := $(SRCS:.c=.o)
# Executable
NAME := ircserv
all: $(NAME)
irssi: rmirssi
docker run -it --name irssi-container -e TERM -u $(id -u):$(id -g) \
--log-driver=none \
-v ${HOME}/.irssi:/home/user/.irssi:ro \
irssi
rmirssi:
docker rm -f irssi-container 2>/dev/null
# Build NAME
$(NAME): $(OBJS)
$(CXX) $(CXXFLAGS) -o $@ $^
# Compile source files
%.o: %.c
$(CXX) $(CXXFLAGS) -c $< -o $@
# Clean object files
clean:
rm -f *.o
# Clean all executable and object
fclean: clean
rm -f $(NAME)
# Rebuild NAME
re: fclean all
.PHONY: all clean fclean re