-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
38 lines (26 loc) · 1.02 KB
/
Makefile
File metadata and controls
38 lines (26 loc) · 1.02 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
CXX = g++
CXXFLAGS = -std=c++17 -pthread -Wall -Wextra -Werror -I./source/common -I./source/server -I./source/client
DEBUG_FLAGS = -g
RELEASE_FLAGS = -O2
SERVER_TARGET = nfe_server
CLIENT_TARGET = nfe_client
SERVER_SOURCES = source/server/main_server.cpp source/server/server.cpp source/server/file_manager.cpp \
source/server/client_handler.cpp source/common/logger.cpp source/common/concurrency.cpp
CLIENT_SOURCES = source/client/main_client.cpp source/client/client.cpp
all: debug
debug: CXXFLAGS += $(DEBUG_FLAGS)
debug: server client
release: CXXFLAGS += $(RELEASE_FLAGS)
release: server client
server: $(SERVER_SOURCES)
$(CXX) $(CXXFLAGS) $(SERVER_SOURCES) -o $(SERVER_TARGET)
client: $(CLIENT_SOURCES)
$(CXX) $(CXXFLAGS) $(CLIENT_SOURCES) -o $(CLIENT_TARGET) -lreadline
clean:
rm -f $(SERVER_TARGET) $(CLIENT_TARGET)
rm -f *.log
run_server: server
./$(SERVER_TARGET) -p 2121 -d ./share/ -m EREW
run_client: client
./$(CLIENT_TARGET)
.PHONY: all debug release server client clean run_server run_client