diff --git a/.gitmodules b/.gitmodules index d64286a0..ce7ff41e 100644 --- a/.gitmodules +++ b/.gitmodules @@ -14,6 +14,6 @@ [submodule "deps/libtomcrypt"] path = deps/libtomcrypt url = https://github.com/libtom/libtomcrypt -[submodule "deps/tomsfastmath"] - path = deps/tomsfastmath - url = https://github.com/libtom/tomsfastmath.git +[submodule "deps/libtommath"] + path = deps/libtommath + url = https://github.com/libtom/libtommath.git diff --git a/deps/libtommath b/deps/libtommath new file mode 160000 index 00000000..afb42241 --- /dev/null +++ b/deps/libtommath @@ -0,0 +1 @@ +Subproject commit afb4224186662b585ffa456aadb91c6a1a916733 diff --git a/deps/tomsfastmath b/deps/tomsfastmath deleted file mode 160000 index d5795fda..00000000 --- a/deps/tomsfastmath +++ /dev/null @@ -1 +0,0 @@ -Subproject commit d5795fda3584c728c19db77b26fe28ee42453585 diff --git a/premake5.lua b/premake5.lua index 190629fa..f3cd0b2b 100644 --- a/premake5.lua +++ b/premake5.lua @@ -100,7 +100,7 @@ workspace "iw4x" buildoptions { "-Zm200" } -- allocate ~150mb memory for the precompiled header. This should be enough, increase if necessary -- Dependency on zlib, json11 and asio - links { "zlib", "json11", "pdcurses", "libtomcrypt", "tomsfastmath" } + links { "zlib", "json11", "pdcurses", "libtomcrypt", "libtommath" } includedirs { "./deps/zlib", @@ -108,7 +108,7 @@ workspace "iw4x" "./deps/pdcurses", "./deps/asio/asio/include", "./deps/libtomcrypt/src/headers", - "./deps/tomsfastmath/src/headers", + "./deps/libtommath", } -- Virtual paths @@ -205,11 +205,11 @@ workspace "iw4x" -- libtomcrypt project "libtomcrypt" language "C" - defines { "_LIB", "LTC_SOURCE", "LTC_NO_RSA_BLINDING", "TFM_DESC" } + defines { "_LIB", "LTC_SOURCE", "LTC_NO_RSA_BLINDING", "LTM_DESC" } - links { "tomsfastmath" } + links { "libtommath" } includedirs { "./deps/libtomcrypt/src/headers" } - includedirs { "./deps/tomsfastmath/src/headers" } + includedirs { "./deps/libtommath" } files { "./deps/libtomcrypt/src/**.c" } @@ -222,16 +222,13 @@ workspace "iw4x" -- always build as static lib, as pdcurses doesn't export anything kind "StaticLib" - -- tomsfastmath - project "tomsfastmath" + -- libtommath + project "libtommath" language "C" defines { "_LIB" } - includedirs { "./deps/tomsfastmath/src/headers" } + includedirs { "./deps/libtommath" } - files { "./deps/tomsfastmath/src/**.c" } - - -- remove generator code - removefiles { "./deps/tomsfastmath/src/generators/**.c" } + files { "./deps/libtommath/*.c" } -- not our code, ignore POSIX usage warnings for now warnings "Off" diff --git a/src/Main.cpp b/src/Main.cpp index b0bcb7dd..b59ffb47 100644 --- a/src/Main.cpp +++ b/src/Main.cpp @@ -17,7 +17,7 @@ namespace Main void PreInit() { - ltc_mp = tfm_desc; + ltc_mp = ltm_desc; } } diff --git a/src/STDInclude.hpp b/src/STDInclude.hpp index 34d6d5c9..0f548037 100644 --- a/src/STDInclude.hpp +++ b/src/STDInclude.hpp @@ -46,7 +46,7 @@ #define ZLIB_CONST -#define TFM_DESC +#define LTM_DESC #define LTC_NO_FAST #define LTC_NO_PROTOTYPES #define LTC_NO_RSA_BLINDING @@ -57,8 +57,6 @@ #include //#include #include - -#include #include #pragma warning(pop)