[refactor] Split Database.cpp into db subdirectory

* Database.hpp is still the only external include file (moved to db/)
* The header is still uppercase to match its namespace
* db/internal.hpp is the shared header for the DB source files
* Added -Isrc/ compile flag for src-relative include paths
* Hoisted CHDR above CSRC in Makefile (it was bothering me)
* make clean now removes all objects in the subdirectories as well
This commit is contained in:
2021-03-16 02:06:54 +01:00
parent dd41d5b610
commit c5776b9322
17 changed files with 2023 additions and 2007 deletions

15
src/db/internal.hpp Normal file
View File

@@ -0,0 +1,15 @@
#pragma once
#include "db/Database.hpp"
#include <sqlite3.h>
#if defined(__MINGW32__) && !defined(_GLIBCXX_HAS_GTHREADS)
#include "mingw/mingw.mutex.h"
#else
#include <mutex>
#endif
extern std::mutex dbCrit;
extern sqlite3 *db;
using namespace Database;