libtommath is faster than tomsfastmath (oh, irony :P) and fixes issue
This commit is contained in:
parent
e43444738c
commit
2706e50881
6
.gitmodules
vendored
6
.gitmodules
vendored
@ -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
|
||||
|
1
deps/libtommath
vendored
Submodule
1
deps/libtommath
vendored
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit afb4224186662b585ffa456aadb91c6a1a916733
|
1
deps/tomsfastmath
vendored
1
deps/tomsfastmath
vendored
@ -1 +0,0 @@
|
||||
Subproject commit d5795fda3584c728c19db77b26fe28ee42453585
|
21
premake5.lua
21
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"
|
||||
|
@ -17,7 +17,7 @@ namespace Main
|
||||
|
||||
void PreInit()
|
||||
{
|
||||
ltc_mp = tfm_desc;
|
||||
ltc_mp = ltm_desc;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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 <curses.h>
|
||||
//#include <asio.hpp>
|
||||
#include <json11.hpp>
|
||||
|
||||
#include <tfm.h>
|
||||
#include <tomcrypt.h>
|
||||
|
||||
#pragma warning(pop)
|
||||
|
Loading…
Reference in New Issue
Block a user