<commit_before>BASE = ..
PROJECT = server-plugin

ifeq "$(GAME)" "CSS"
	SDK_VERSION = source-sdk-2013/mp/src
	SDK_DEF = -DCSTRIKE_DLL -DNO_MALLOC_OVERRIDE -DGNUC -DPOSIX -DCOMPILER_GCC
endif
ifeq "$(GAME)" "CSP"
	SDK_VERSION = ep1-sdk
	SDK_DEF = -DPOSIX -DCOMPILER_GCC -DGNUC 
endif
ifeq "$(GAME)" "CSGO"
	SDK_VERSION = csgo-sdk
	SDK_DEF = -DPOSIX -DCOMPILER_GCC -DGNUC 
endif
ifeq "$(GAME)" "BMS"
	SDK_VERSION = bms-sdk
	SDK_DEF = -DPOSIX -DCOMPILER_GCC -DGNUC 
endif

SDK_DIR = $(BASE)/$(SDK_VERSION)
PROJECT_DIR = $(BASE)/$(PROJECT)
SRC_DIR = $(PROJECT_DIR)/Code

OTHER_PREPROCESSORS = -DNCZ_$(GAME) $(SDK_DEF)

# Compilateur
CXX = g++

# Nom du fichier binaire de sortie
BINARY_NAME = nocheatzX.so

# Dossier de sortie du fichier binaire
BUILD_DIR = $(BASE)/Builds/$(GAME)
BINARY_DIR = $(BUILD_DIR)/addons/NoCheatZ/

# Dossiers de sortie
RELEASE_DIR = Release/linux
DEBUG_DIR = Debug/linux

# Dossier contenant les librairies dynamiques
SRCDS_BIN_DIR = ./bin

# Dossier contenant les librairies statiques
SRCDS_A_DIR = $(SDK_DIR)/lib/public/linux32

# Paramtres du compilateur
ARCH_CFLAGS =   -mtune=i486 -march=pentium -mmmx
USER_CFLAGS =   -DTIXML_USE_TICPP
BASE_CFLAGS =   -msse \
		-D_LINUX \
		-D_alloca=alloca \
		-fPIC \
		-Wno-deprecated \
		-msse \
		-fpermissive

OPT_FLAGS = -O3 -funroll-loops -s -pipe $(OTHER_PREPROCESSORS)
DEBUG_FLAGS = -g -ggdb3 -O0 -D_DEBUG $(OTHER_PREPROCESSORS)               
# Fichiers  compiler
SRC= $(wildcard *.cpp) $(wildcard */*.cpp) $(wildcard */*/*.cpp) $(wildcard */*/*/*.cpp)                      

# Fichiers  lier
ifneq "$(GAME)" "CSP"
	LINK_SO =       $(SRCDS_BIN_DIR)/libtier0_srv.so \
			$(SRCDS_BIN_DIR)/libvstdlib_srv.so

	LINK_A =        $(SRCDS_A_DIR)/tier1.a \
			$(SRCDS_A_DIR)/mathlib.a

	ifeq "$(GAME)" "CSGO"
		LINK_A += $(SRCDS_A_DIR)/interfaces.a
	endif
else
	LINK_SO =       $(SRCDS_BIN_DIR)/tier0_i486.so \
			$(SRCDS_BIN_DIR)/vstdlib_i486.so

	LINK_A =        $(SRCDS_A_DIR)/tier1_i486.a \
			$(SRCDS_A_DIR)/mathlib_i486.a
endif

LINK = -lm -ldl $(LINK_A) $(LINK_SO)

# Dossiers des fichiers inclus
INCLUDE =       -I$(SRC_DIR) \
		-I$(SDK_DIR)/public \
		-I$(SDK_DIR)/public/game/server \
		-I$(SDK_DIR)/public/engine \
		-I$(SDK_DIR)/public/tier0 \
		-I$(SDK_DIR)/public/tier1 \
		-I$(SDK_DIR)/common
ifeq "$(GAME)" "CSGO"
		INCLUDE += -I$(SDK_DIR)/interfaces
endif
                        
# Rgles de compilation

ifeq "$(DEBUG)" "false"
	BIN_DIR = $(RELEASE_DIR)
	CFLAGS = $(OPT_FLAGS)
else
	BIN_DIR = $(DEBUG_DIR)
	CFLAGS = $(DEBUG_FLAGS)
endif
CFLAGS += $(USER_CFLAGS) $(BASE_CFLAGS) $(ARCH_CFLAGS)

OBJECTS := $(SRC:%.cpp=$(BIN_DIR)/%.o)

compile_object = \
	@mkdir -p $(2); \
	echo "$(1) => $(3)"; \
	$(CXX) $(INCLUDE) $(CFLAGS) -o $(3) -c $(1) 2> "error.txt";

$(BIN_DIR)/%.o: %.cpp %.h
	$(call compile_object, $<, $(@D), $@)

$(BIN_DIR)/%.o: %.cpp
	$(call compile_object, $<, $(@D), $@)
<commit_msg>Updated for latest csgo sdk and protobuf<commit_after>BASE = ..
PROJECT = server-plugin

ifeq "$(GAME)" "CSS"
	SDK_VERSION = source-sdk-2013/mp/src
	SDK_DEF = -DCSTRIKE_DLL -DNO_MALLOC_OVERRIDE -DGNUC -DPOSIX -DCOMPILER_GCC
endif
ifeq "$(GAME)" "CSP"
	SDK_VERSION = ep1-sdk
	SDK_DEF = -DPOSIX -DCOMPILER_GCC -DGNUC 
endif
ifeq "$(GAME)" "CSGO"
	SDK_VERSION = csgo-sdk
	SDK_DEF = -DPOSIX -DCOMPILER_GCC -DGNUC 
endif
ifeq "$(GAME)" "BMS"
	SDK_VERSION = bms-sdk
	SDK_DEF = -DPOSIX -DCOMPILER_GCC -DGNUC 
endif

SDK_DIR = $(BASE)/$(SDK_VERSION)
PROJECT_DIR = $(BASE)/$(PROJECT)
SRC_DIR = $(PROJECT_DIR)/Code

OTHER_PREPROCESSORS = -DNCZ_$(GAME) $(SDK_DEF)

# Compilateur
CXX = g++

# Nom du fichier binaire de sortie
BINARY_NAME = nocheatzX.so

# Dossier de sortie du fichier binaire
BUILD_DIR = $(BASE)/Builds/$(GAME)
BINARY_DIR = $(BUILD_DIR)/addons/NoCheatZ/

# Dossiers de sortie
RELEASE_DIR = Release/linux
DEBUG_DIR = Debug/linux

# Dossier contenant les librairies dynamiques
SRCDS_BIN_DIR = ./bin

# Dossier contenant les librairies statiques
SRCDS_A_DIR = $(SDK_DIR)/lib/public/linux32
ifeq "$(GAME)" "CSGO"
	SRCDS_A_DIR = $(SDK_DIR)/lib/linux
endif

# Paramtres du compilateur
ARCH_CFLAGS =   -mtune=i486 -march=pentium -mmmx
USER_CFLAGS =   -DTIXML_USE_TICPP
BASE_CFLAGS =   -msse \
		-D_LINUX \
		-D_alloca=alloca \
		-fPIC \
		-Wno-deprecated \
		-msse \
		-fpermissive

OPT_FLAGS = -O3 -funroll-loops -s -pipe $(OTHER_PREPROCESSORS)
DEBUG_FLAGS = -g -ggdb3 -O0 -D_DEBUG $(OTHER_PREPROCESSORS)               
# Fichiers  compiler
SRC= $(wildcard *.cpp) $(wildcard */*.cpp) $(wildcard */*/*.cpp) $(wildcard */*/*/*.cpp)                      

# Fichiers  lier
ifeq "$(GAME)" "CSS"
	LINK_SO =       $(SRCDS_BIN_DIR)/libtier0_srv.so \
			$(SRCDS_BIN_DIR)/libvstdlib_srv.so

	LINK_A =        $(SRCDS_A_DIR)/tier1.a \
			$(SRCDS_A_DIR)/mathlib.a
endif

ifeq "$(GAME)" "CSGO"
	LINK_SO =       $(SRCDS_BIN_DIR)/libtier0_srv.so \
			$(SRCDS_BIN_DIR)/libvstdlib_srv.so

	LINK_A =        $(SRCDS_A_DIR)/tier1_i486.a \
			$(SRCDS_A_DIR)/mathlib_i486.a \
			$(SRCDS_A_DIR)/interfaces_i486.a \
			$(SDK_DIR)/lib/linux32/release/libprotobuf.a
endif

ifeq "$(GAME)" "CSP"
	LINK_SO =       $(SRCDS_BIN_DIR)/tier0_i486.so \
			$(SRCDS_BIN_DIR)/vstdlib_i486.so

	LINK_A =        $(SRCDS_A_DIR)/tier1_i486.a \
			$(SRCDS_A_DIR)/mathlib_i486.a
endif

LINK = -lm -ldl $(LINK_A) $(LINK_SO)

# Dossiers des fichiers inclus
INCLUDE =       -I$(SRC_DIR) \
		-I$(SDK_DIR)/public \
		-I$(SDK_DIR)/public/game/server \
		-I$(SDK_DIR)/public/engine \
		-I$(SDK_DIR)/public/tier0 \
		-I$(SDK_DIR)/public/tier1 \
		-I$(SDK_DIR)/common
ifeq "$(GAME)" "CSGO"
		INCLUDE += -I$(SDK_DIR)/interfaces \
			-I$(SDK_DIR)/common/protobuf-2.5.0/src \
			-I$(SDK_DIR)/public/game/shared/csgo/protobuf \
			-I$(SDK_DIR)/public/engine/protobuf
endif
                        
# Rgles de compilation

ifeq "$(DEBUG)" "false"
	BIN_DIR = $(RELEASE_DIR)
	CFLAGS = $(OPT_FLAGS)
else
	BIN_DIR = $(DEBUG_DIR)
	CFLAGS = $(DEBUG_FLAGS)
endif
CFLAGS += $(USER_CFLAGS) $(BASE_CFLAGS) $(ARCH_CFLAGS)

OBJECTS := $(SRC:%.cpp=$(BIN_DIR)/%.o)

ifeq "$(GAME)" "CSGO"
	OBJECTS += $($(SDK_DIR)/public/engine/protobuf/:%.cc=$(BIN_DIR)/%.o) \
		 $($(SDK_DIR)/public/game/shared/csgo/protobuf/:%.cc=$(BIN_DIR)/%.o) \
		 $($(SDK_DIR)/public/game/shared/csgo/protobuf/:%.cpp=$(BIN_DIR)/%.o)
endif

compile_object = \
	@mkdir -p $(2); \
	echo "$(1) => $(3)"; \
	$(CXX) $(INCLUDE) $(CFLAGS) -o $(3) -c $(1) 2> "error.txt";

$(BIN_DIR)/%.o: %.cpp %.h
	$(call compile_object, $<, $(@D), $@)

$(BIN_DIR)/%.o: %.cpp
	$(call compile_object, $<, $(@D), $@)

{'fraction_non_alphanumeric': 0.17625231910946196, 'fraction_numerical': 0.013914656771799629, 'mean_word_length': 3.4737206085753805, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '4190086', 'n_tokens_mistral': 3075, 'n_tokens_neox': 2801, 'n_words': 498}