Commit 41aebdb6 authored by p's avatar p

changed directory structure

parent d7793d3c
*.o
.vscode/
TaskThread.cpp
.build/*
server
*.txt
\ No newline at end of file
#ifndef __CQEVENTDATA__
#define __CQEVENTDATA__
#include <rdma/rdma_verbs.h>
class RdmaEndpoint;
class CqEventData
{
public:
uint64_t _wr_id;
enum ibv_wc_opcode _opcode;
uint32_t _byte_len;
RdmaEndpoint *_endpoint;
CqEventData(uint64_t wr_id, enum ibv_wc_opcode opcode, uint32_t byte_len, RdmaEndpoint *endpoint)
: _wr_id(wr_id), _opcode(opcode), _byte_len(byte_len), _endpoint(endpoint)
{
}
};
#endif
\ No newline at end of file
SRCS := $(shell ls src/)
SRC_DIR := src
OBJS := $(SRCS:.cpp=.o)
BUILD_DIR := .build
HEADERS := $(shell find -name '*.hpp')
OBJS := $(addprefix $(BUILD_DIR)/, $(OBJS))
all: clean server
CXXFLAGS += -O3
CXX = g++
CXXFLAGS += -O3 -Wall -std=c++17 -I header
CXXFLAGS += -g
LIBS += -libverbs
LIBS += -lrdmacm
LIBS += -pthread
LIBS += -lrocksdb
object :
g++ -std=c++17 -c *.cpp $(LIBS)
server1: object
g++ -std=c++17 -o server -ggdb *.o $(LIBS)
Target := server
server: object
g++ -std=c++17 -o server -ggdb Server.o Executor.o TaskThread.o RdmaServerEndpointGroup.o\
RdmaReplicationEndpoint.o RdmaSalEndpoint.o RdmaEndpoint.o RdmaSalCqProcessor.o RdmaCmProcessor.o RdmaCqProcessor.o $(LIBS)
.PHONY:
clean:
rm -f *.o *.gch server
.phony = clean
$(BUILD_DIR)/%.o: $(SRC_DIR)/%.cpp
$(CXX) -o $@ $(CXXFLAGS) -c $< $(LIBS)
$(Target) : $(OBJS) | $(BUILD_DIR)
$(CXX) -o $@ $^ $(LIBS)
$(BUILD_DIR) :
mkdir -p $@
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment