diff --git a/SConstruct b/SConstruct index cb7da65..282b0f2 100644 --- a/SConstruct +++ b/SConstruct @@ -274,6 +274,7 @@ if scons_ver >= (4, 0, 0): Export("env") SConscript("core/SCsub") +SConscript("crypto/SCsub") SConscript("web/SCsub") SConscript("platform/SCsub") diff --git a/backends/hash_hashlib/hlib_sha256.h b/backends/hash_hashlib/hlib_sha256.h index c69d1d5..2155171 100644 --- a/backends/hash_hashlib/hlib_sha256.h +++ b/backends/hash_hashlib/hlib_sha256.h @@ -1,7 +1,7 @@ #ifndef HASHLIB_SHA256_H #define HASHLIB_SHA256_H -#include "core/hash/sha256.h" +#include "crypto/hash/sha256.h" #include "./hash-library/sha256.h" diff --git a/core/SCsub b/core/SCsub index 64113e4..bcd7833 100644 --- a/core/SCsub +++ b/core/SCsub @@ -8,11 +8,6 @@ env.add_source_files(env.core_sources, "*.cpp") env.add_source_files(env.core_sources, "./math/*.cpp") env.add_source_files(env.core_sources, "./containers/*.cpp") env.add_source_files(env.core_sources, "./log/*.cpp") -env.add_source_files(env.core_sources, "./html/*.cpp") -env.add_source_files(env.core_sources, "./http/*.cpp") -env.add_source_files(env.core_sources, "./hash/*.cpp") -env.add_source_files(env.core_sources, "./bry_http/*.cpp") -env.add_source_files(env.core_sources, "./database/*.cpp") env.add_source_files(env.core_sources, "./os/*.cpp") env.add_source_files(env.core_sources, "./image/*.cpp") env.add_source_files(env.core_sources, "./threading/*.cpp") diff --git a/crypto/SCsub b/crypto/SCsub new file mode 100644 index 0000000..8bd8cb3 --- /dev/null +++ b/crypto/SCsub @@ -0,0 +1,12 @@ +#!/usr/bin/env python + +Import("env") + +env.core_sources = [] + +env.add_source_files(env.core_sources, "*.cpp") +env.add_source_files(env.core_sources, "./hash/*.cpp") + +# Build it all as a library +lib = env.add_library("core", env.core_sources) +env.Prepend(LIBS=[lib]) diff --git a/core/hash/sha256.cpp b/crypto/hash/sha256.cpp similarity index 100% rename from core/hash/sha256.cpp rename to crypto/hash/sha256.cpp diff --git a/core/hash/sha256.h b/crypto/hash/sha256.h similarity index 100% rename from core/hash/sha256.h rename to crypto/hash/sha256.h diff --git a/web/http/csrf_token.cpp b/web/http/csrf_token.cpp index f9d91cc..fef09eb 100644 --- a/web/http/csrf_token.cpp +++ b/web/http/csrf_token.cpp @@ -1,6 +1,6 @@ #include "csrf_token.h" -#include "core/hash/sha256.h" +#include "crypto/hash/sha256.h" #include "http_session.h" #include "request.h" #include diff --git a/web/http/session_manager.cpp b/web/http/session_manager.cpp index a8a7654..4ac596a 100644 --- a/web/http/session_manager.cpp +++ b/web/http/session_manager.cpp @@ -9,7 +9,7 @@ #include "database/query_result.h" #include "database/table_builder.h" -#include "core/hash/sha256.h" +#include "crypto/hash/sha256.h" #include "request.h" diff --git a/web_modules/users/user_controller.cpp b/web_modules/users/user_controller.cpp index c88f088..90d1b16 100644 --- a/web_modules/users/user_controller.cpp +++ b/web_modules/users/user_controller.cpp @@ -13,7 +13,7 @@ #include "database/query_result.h" #include "database/table_builder.h" -#include "core/hash/sha256.h" +#include "crypto/hash/sha256.h" void UserController::handle_request_main(Request *request) { if (request->session.is_valid()) {