<commit_before># global directory layout
BIN          := $(ROOT)/bin
INC          := $(ROOT)/inc
LIB          := $(ROOT)/lib
SRC          := $(ROOT)/src/main/c

# project directories and files
PROJECTDIR   := .
OBJDIR       := $(PROJECTDIR)/obj
OUTPUTDIR    := $(BIN)

OBJFILES     := $(patsubst %.c,$(OBJDIR)/%.o,$(notdir $(CFILES))) \
                $(patsubst %.cpp,$(OBJDIR)/%.o,$(notdir $(CCFILES)))
TARGETFILE   := $(OUTPUTDIR)/$(PROJECT)

# Java path
#JAVA_HOME    ?= /usr/lib/jvm/java-1.7.0
JAVA_HOME    ?= /opt/jdk7

# DPDK path
DPDK_DIR     ?= /home/azq/build/dpdk-2.1.0/x86_64-native-linuxapp-gcc

# SPDK path
SPDK_DIR     ?= /home/azq/build/spdk-af2a731

# compiler setup
AMD64 = $(shell uname -m | grep 64)
ifeq "$(strip $(AMD64))" ""
    ARCH     := -m32
else
    ARCH     := -m64
endif

ifeq ($(dbg),1)
    DEBUG    := -g -D_DEBUG
    CONFIG   := debug
else
    DEBUG    := -O2 -fno-strict-aliasing
    CONFIG   := release
endif

INCLUDES     := -I$(PROJECTDIR) -I$(INC)
ifeq ($(jni),1)
    INCLUDES += -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux
endif
ifeq ($(spdk),1)
    INCLUDES += -I$(SPDK_DIR)/include -I$(DPDK_DIR)/include
endif

LIBRARIES    := -L$(LIB) -L$(OUTPUTDIR)
ifeq ($(rdma),1)
   LIBRARIES += -libverbs
endif
ifeq ($(spdk),1)
   LIBRARIES += -L$(SPDK_DIR)/lib/nvme -L$(SPDK_DIR)/lib/memory -L$(SPDK_DIR)/lib/util \
                -lpciaccess -lpthread \
                -lspdk_nvme -lspdk_memory -lspdk_util \
                -L$(DPDK_DIR)/lib -lrte_eal -lrte_mempool -lrte_ring -Wl,-rpath=$(DPDK_DIR)/lib -lrt
endif

CC           := gcc
CFLAGS       := -fPIC -fstack-protector -std=gnu99 $(ARCH) $(DEBUG) $(INCLUDES)
CXX          := g++
CXXFLAGS     := -fPIC $(ARCH) $(DEBUG) $(INCLUDES)

LINK         := g++
LDFLAGS     := -fPIC -Wl,-rpath -Wl,\$$ORIGIN<commit_msg>Makefile: tweak for standalone binary generation.<commit_after># global directory layout
ROOT         := ../../../..
BIN          := $(ROOT)/bin
INC          := $(ROOT)/inc
LIB          := $(ROOT)/lib
SRC          := $(ROOT)/src/main/c

# project directories and files
PROJECTDIR   := .
OBJDIR       := $(PROJECTDIR)/obj
OUTPUTDIR    := $(BIN)

OBJFILES     := $(patsubst %.c,$(OBJDIR)/%.o,$(notdir $(CFILES))) \
                $(patsubst %.cpp,$(OBJDIR)/%.o,$(notdir $(CCFILES)))
TARGETFILE   := $(OUTPUTDIR)/$(PROJECT)

# Java path
JAVA_HOME    ?= /opt/jdk7

# DPDK path
#DPDK_DIR     ?= /home/azq/build/dpdk-2.1.0/x86_64-native-linuxapp-gcc
DPDK_DIR     ?= /home/azq/build/dpdk-2.2.0/x86_64-native-linuxapp-gcc

# SPDK path
#SPDK_DIR     ?= /home/azq/build/spdk-af2a731
SPDK_DIR     ?= /home/azq/build/spdk-9322c25

# architecutre
AMD64 = $(shell uname -m | grep 64)
ifeq "$(strip $(AMD64))" ""
    ARCH     := -m32
else
    ARCH     := -m64
endif

# debug info
ifeq ($(dbg),1)
    DEBUG    := -g -D_DEBUG
    CONFIG   := debug
else
    DEBUG    := -O2 -fno-strict-aliasing
    CONFIG   := release
endif

# include headers
INCLUDES     := -I$(PROJECTDIR) -I$(INC)
ifeq ($(jni),1)
    INCLUDES += -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux
endif
ifeq ($(spdk),1)
    INCLUDES += -I$(SPDK_DIR)/include -I$(DPDK_DIR)/include
endif

# link libraries
LIBRARIES    := -L$(LIB) -L$(OUTPUTDIR)
ifeq ($(ibv),1)
   LIBRARIES += -libverbs
endif
ifeq ($(spdk),1)
    ifeq ($(shared),1)
        LIBRARIES += -L$(SPDK_DIR)/lib/nvme -L$(SPDK_DIR)/lib/memory -L$(SPDK_DIR)/lib/util \
                     -lpciaccess -pthread \
                     -lspdk_nvme -lspdk_memory -lspdk_util \
                     -L$(DPDK_DIR)/lib -lrte_eal -lrte_mempool -lrte_ring -Wl,-rpath=$(DPDK_DIR)/lib -lrt
    else
        LIBRARIES += $(SPDK_DIR)/lib/nvme/libspdk_nvme.a $(SPDK_DIR)/lib/util/libspdk_util.a $(SPDK_DIR)/lib/memory/libspdk_memory.a \
                     -lpciaccess -pthread \
                     -L$(DPDK_DIR)/lib -lrte_eal -lrte_mempool -lrte_ring -Wl,-rpath=$(DPDK_DIR)/lib -lrt \
		     -ldl
    endif
endif

CC           := gcc
CFLAGS       := -fPIC -fstack-protector -std=gnu99 $(ARCH) $(DEBUG) $(INCLUDES)
CXX          := g++
CXXFLAGS     := -fPIC $(ARCH) $(DEBUG) $(INCLUDES)

LINK         := g++
LDFLAGS     := -fPIC -Wl,-rpath -Wl,\$$ORIGIN
{'fraction_non_alphanumeric': 0.18352149891904876, 'fraction_numerical': 0.018496276723516693, 'mean_word_length': 2.3445783132530122, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2790881', 'n_tokens_mistral': 1780, 'n_tokens_neox': 1645, 'n_words': 305}