[refactor] src/contrib, src/mingw -> vendor

This commit is contained in:
dongresource 2021-03-12 18:50:21 +01:00
parent f7e9cc2cea
commit 4cd3a3dabd
29 changed files with 28 additions and 28 deletions

View File

@ -33,9 +33,9 @@ else()
set(BIN_NAME fusion) set(BIN_NAME fusion)
endif() endif()
include_directories(src) include_directories(src vendor)
file(GLOB_RECURSE SOURCES src/**.cpp src/**.hpp src/**.c src/**.h version.h) file(GLOB_RECURSE SOURCES src/**.[ch]pp vendor/**.[ch]pp vendor/**.[ch] version.h)
configure_file(version.h.in ${CMAKE_SOURCE_DIR}/version.h @ONLY) configure_file(version.h.in ${CMAKE_SOURCE_DIR}/version.h @ONLY)

View File

@ -5,7 +5,7 @@ CXX=clang++
# -w suppresses all warnings (the part that's commented out helps me find memory leaks, it ruins performance though!) # -w suppresses all warnings (the part that's commented out helps me find memory leaks, it ruins performance though!)
# If compiling with ASAN, invoke like this: $ LSAN_OPTIONS=suppressions=suppr.txt bin/fusion # If compiling with ASAN, invoke like this: $ LSAN_OPTIONS=suppressions=suppr.txt bin/fusion
CFLAGS=-O3 #-g3 -fsanitize=address CFLAGS=-O3 #-g3 -fsanitize=address
CXXFLAGS=-Wall -Wno-unknown-pragmas -std=c++17 -O2 -DPROTOCOL_VERSION=$(PROTOCOL_VERSION) -DGIT_VERSION=\"$(GIT_VERSION)\" #-g3 -fsanitize=address CXXFLAGS=-Wall -Wno-unknown-pragmas -std=c++17 -O2 -DPROTOCOL_VERSION=$(PROTOCOL_VERSION) -DGIT_VERSION=\"$(GIT_VERSION)\" -I./vendor #-g3 -fsanitize=address
LDFLAGS=-lpthread -lsqlite3 #-g3 -fsanitize=address LDFLAGS=-lpthread -lsqlite3 #-g3 -fsanitize=address
# specifies the name of our exectuable # specifies the name of our exectuable
SERVER=bin/fusion SERVER=bin/fusion
@ -18,15 +18,15 @@ PROTOCOL_VERSION?=104
WIN_CC=x86_64-w64-mingw32-gcc WIN_CC=x86_64-w64-mingw32-gcc
WIN_CXX=x86_64-w64-mingw32-g++ WIN_CXX=x86_64-w64-mingw32-g++
WIN_CFLAGS=-O3 #-g3 -fsanitize=address WIN_CFLAGS=-O3 #-g3 -fsanitize=address
WIN_CXXFLAGS=-D_WIN32_WINNT=0x0601 -Wall -Wno-unknown-pragmas -std=c++17 -O3 -DPROTOCOL_VERSION=$(PROTOCOL_VERSION) -DGIT_VERSION=\"$(GIT_VERSION)\" #-g3 -fsanitize=address WIN_CXXFLAGS=-D_WIN32_WINNT=0x0601 -Wall -Wno-unknown-pragmas -std=c++17 -O3 -DPROTOCOL_VERSION=$(PROTOCOL_VERSION) -DGIT_VERSION=\"$(GIT_VERSION)\" -I./vendor #-g3 -fsanitize=address
WIN_LDFLAGS=-static -lws2_32 -lwsock32 -lsqlite3 #-g3 -fsanitize=address WIN_LDFLAGS=-static -lws2_32 -lwsock32 -lsqlite3 #-g3 -fsanitize=address
WIN_SERVER=bin/winfusion.exe WIN_SERVER=bin/winfusion.exe
CSRC=\ CSRC=\
src/contrib/bcrypt/bcrypt.c\ vendor/bcrypt/bcrypt.c\
src/contrib/bcrypt/crypt_blowfish.c\ vendor/bcrypt/crypt_blowfish.c\
src/contrib/bcrypt/crypt_gensalt.c\ vendor/bcrypt/crypt_gensalt.c\
src/contrib/bcrypt/wrapper.c\ vendor/bcrypt/wrapper.c\
CXXSRC=\ CXXSRC=\
src/ChatManager.cpp\ src/ChatManager.cpp\
@ -54,16 +54,16 @@ CXXSRC=\
# headers (for timestamp purposes) # headers (for timestamp purposes)
CHDR=\ CHDR=\
src/contrib/bcrypt/bcrypt.h\ vendor/bcrypt/bcrypt.h\
src/contrib/bcrypt/crypt_blowfish.h\ vendor/bcrypt/crypt_blowfish.h\
src/contrib/bcrypt/crypt_gensalt.h\ vendor/bcrypt/crypt_gensalt.h\
src/contrib/bcrypt/ow-crypt.h\ vendor/bcrypt/ow-crypt.h\
src/contrib/bcrypt/winbcrypt.h\ vendor/bcrypt/winbcrypt.h\
CXXHDR=\ CXXHDR=\
src/contrib/bcrypt/BCrypt.hpp\ vendor/bcrypt/BCrypt.hpp\
src/contrib/INIReader.hpp\ vendor/INIReader.hpp\
src/contrib/JSON.hpp\ vendor/JSON.hpp\
src/ChatManager.hpp\ src/ChatManager.hpp\
src/CNLoginServer.hpp\ src/CNLoginServer.hpp\
src/CNProtocol.hpp\ src/CNProtocol.hpp\
@ -72,8 +72,8 @@ CXXHDR=\
src/CNStructs.hpp\ src/CNStructs.hpp\
src/Database.hpp\ src/Database.hpp\
src/Defines.hpp\ src/Defines.hpp\
src/contrib/INIReader.hpp\ vendor/INIReader.hpp\
src/contrib/JSON.hpp\ vendor/JSON.hpp\
src/MissionManager.hpp\ src/MissionManager.hpp\
src/MobManager.hpp\ src/MobManager.hpp\
src/NanoManager.hpp\ src/NanoManager.hpp\

View File

@ -5,7 +5,7 @@
#include "PlayerManager.hpp" #include "PlayerManager.hpp"
#include "ItemManager.hpp" #include "ItemManager.hpp"
#include <regex> #include <regex>
#include "contrib/bcrypt/BCrypt.hpp" #include "bcrypt/BCrypt.hpp"
#include "settings.hpp" #include "settings.hpp"

View File

@ -6,8 +6,8 @@
#include "CNStructs.hpp" #include "CNStructs.hpp"
#include "MissionManager.hpp" #include "MissionManager.hpp"
#include "contrib/JSON.hpp" #include "JSON.hpp"
#include "contrib/bcrypt/BCrypt.hpp" #include "bcrypt/BCrypt.hpp"
#include <string> #include <string>
#include <sqlite3.h> #include <sqlite3.h>

View File

@ -3,7 +3,7 @@
#include "CNShardServer.hpp" #include "CNShardServer.hpp"
#include "Player.hpp" #include "Player.hpp"
#include "contrib/JSON.hpp" #include "JSON.hpp"
struct Reward { struct Reward {
int32_t id; int32_t id;

View File

@ -5,7 +5,7 @@
#include "CNShardServer.hpp" #include "CNShardServer.hpp"
#include "NPC.hpp" #include "NPC.hpp"
#include "contrib/JSON.hpp" #include "JSON.hpp"
#include <map> #include <map>
#include <unordered_map> #include <unordered_map>

View File

@ -18,7 +18,7 @@
#include <assert.h> #include <assert.h>
#include <limits.h> #include <limits.h>
#include "contrib/JSON.hpp" #include "JSON.hpp"
std::map<int32_t, BaseNPC*> NPCManager::NPCs; std::map<int32_t, BaseNPC*> NPCManager::NPCs;
std::map<int32_t, WarpLocation> NPCManager::Warps; std::map<int32_t, WarpLocation> NPCManager::Warps;

View File

@ -4,7 +4,7 @@
#include "PlayerManager.hpp" #include "PlayerManager.hpp"
#include "NPC.hpp" #include "NPC.hpp"
#include "contrib/JSON.hpp" #include "JSON.hpp"
#include <map> #include <map>
#include <unordered_map> #include <unordered_map>

View File

@ -9,7 +9,7 @@
#include "NanoManager.hpp" #include "NanoManager.hpp"
#include "RacingManager.hpp" #include "RacingManager.hpp"
#include "contrib/JSON.hpp" #include "JSON.hpp"
#include <fstream> #include <fstream>
#include <cmath> #include <cmath>

View File

@ -1,7 +1,7 @@
#pragma once #pragma once
#include <map> #include <map>
#include "contrib/JSON.hpp" #include "JSON.hpp"
#include "NPCManager.hpp" #include "NPCManager.hpp"
namespace TableData { namespace TableData {

View File

@ -1,6 +1,6 @@
#include <iostream> #include <iostream>
#include "settings.hpp" #include "settings.hpp"
#include "contrib/INIReader.hpp" #include "INIReader.hpp"
#include "CNStructs.hpp" // for ACADEMY #include "CNStructs.hpp" // for ACADEMY
// defaults :) // defaults :)