Initial commit
This commit is contained in:
26
server/Makefile
Normal file
26
server/Makefile
Normal file
@ -0,0 +1,26 @@
|
||||
# pq-ftp/server/Makefile
|
||||
CXX=g++
|
||||
CXXFLAGS=-std=c++17 -Wall -pthread
|
||||
LDFLAGS=-loqs -lz
|
||||
|
||||
SRC_DIR=src
|
||||
BUILD_DIR=build
|
||||
BIN_DIR=bin
|
||||
TARGET=$(BIN_DIR)/server
|
||||
|
||||
SRCS=$(wildcard $(SRC_DIR)/*.cpp)
|
||||
OBJS=$(patsubst $(SRC_DIR)/%.cpp, $(BUILD_DIR)/%.o, $(SRCS))
|
||||
|
||||
all: $(TARGET)
|
||||
|
||||
$(TARGET): $(OBJS)
|
||||
@mkdir -p $(BIN_DIR)
|
||||
$(CXX) $(OBJS) -o $(TARGET) $(LDFLAGS)
|
||||
@echo "Server compiled successfully!"
|
||||
|
||||
$(BUILD_DIR)/%.o: $(SRC_DIR)/%.cpp
|
||||
@mkdir -p $(BUILD_DIR)
|
||||
$(CXX) $(CXXFLAGS) -c $< -o $@
|
||||
|
||||
clean:
|
||||
rm -rf $(BUILD_DIR) $(BIN_DIR)
|
Reference in New Issue
Block a user