-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
29 lines (21 loc) · 740 Bytes
/
Copy pathMakefile
File metadata and controls
29 lines (21 loc) · 740 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
CXX = g++
CXXFLAGS = -std=c++20 -Wall -Wextra -g
LDFLAGS = -lssl -lcrypto -lpthread
# Source files
SERVER_SRC = chatRoom.cpp
CLIENT_SRC = client.cpp
# Object files
SERVER_OBJ = $(SERVER_SRC:.cpp=.o)
CLIENT_OBJ = $(CLIENT_SRC:.cpp=.o)
# Targets
all: chatApp clientApp
chatApp: chatRoom.o encryption.o
$(CXX) $(CXXFLAGS) chatRoom.o encryption.o -o chatApp $(LDFLAGS)
chatRoom.o: chatRoom.cpp chatroom.hpp message.hpp encryption.hpp logger.hpp rate_limiter.hpp metrics.hpp
$(CXX) $(CXXFLAGS) -c chatRoom.cpp -o chatRoom.o
encryption.o: encryption.cpp encryption.hpp
$(CXX) $(CXXFLAGS) -c encryption.cpp -o encryption.o
clientApp: client.cpp message.hpp
$(CXX) $(CXXFLAGS) client.cpp -o clientApp
clean:
rm -f *.o chatApp clientApp