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"]
|
[submodule "deps/libtomcrypt"]
|
||||||
path = deps/libtomcrypt
|
path = deps/libtomcrypt
|
||||||
url = https://github.com/libtom/libtomcrypt
|
url = https://github.com/libtom/libtomcrypt
|
||||||
[submodule "deps/tomsfastmath"]
|
[submodule "deps/libtommath"]
|
||||||
path = deps/tomsfastmath
|
path = deps/libtommath
|
||||||
url = https://github.com/libtom/tomsfastmath.git
|
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
|
buildoptions { "-Zm200" } -- allocate ~150mb memory for the precompiled header. This should be enough, increase if necessary
|
||||||
|
|
||||||
-- Dependency on zlib, json11 and asio
|
-- Dependency on zlib, json11 and asio
|
||||||
links { "zlib", "json11", "pdcurses", "libtomcrypt", "tomsfastmath" }
|
links { "zlib", "json11", "pdcurses", "libtomcrypt", "libtommath" }
|
||||||
includedirs
|
includedirs
|
||||||
{
|
{
|
||||||
"./deps/zlib",
|
"./deps/zlib",
|
||||||
@ -108,7 +108,7 @@ workspace "iw4x"
|
|||||||
"./deps/pdcurses",
|
"./deps/pdcurses",
|
||||||
"./deps/asio/asio/include",
|
"./deps/asio/asio/include",
|
||||||
"./deps/libtomcrypt/src/headers",
|
"./deps/libtomcrypt/src/headers",
|
||||||
"./deps/tomsfastmath/src/headers",
|
"./deps/libtommath",
|
||||||
}
|
}
|
||||||
|
|
||||||
-- Virtual paths
|
-- Virtual paths
|
||||||
@ -205,11 +205,11 @@ workspace "iw4x"
|
|||||||
-- libtomcrypt
|
-- libtomcrypt
|
||||||
project "libtomcrypt"
|
project "libtomcrypt"
|
||||||
language "C"
|
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/libtomcrypt/src/headers" }
|
||||||
includedirs { "./deps/tomsfastmath/src/headers" }
|
includedirs { "./deps/libtommath" }
|
||||||
|
|
||||||
files { "./deps/libtomcrypt/src/**.c" }
|
files { "./deps/libtomcrypt/src/**.c" }
|
||||||
|
|
||||||
@ -222,16 +222,13 @@ workspace "iw4x"
|
|||||||
-- always build as static lib, as pdcurses doesn't export anything
|
-- always build as static lib, as pdcurses doesn't export anything
|
||||||
kind "StaticLib"
|
kind "StaticLib"
|
||||||
|
|
||||||
-- tomsfastmath
|
-- libtommath
|
||||||
project "tomsfastmath"
|
project "libtommath"
|
||||||
language "C"
|
language "C"
|
||||||
defines { "_LIB" }
|
defines { "_LIB" }
|
||||||
includedirs { "./deps/tomsfastmath/src/headers" }
|
includedirs { "./deps/libtommath" }
|
||||||
|
|
||||||
files { "./deps/tomsfastmath/src/**.c" }
|
files { "./deps/libtommath/*.c" }
|
||||||
|
|
||||||
-- remove generator code
|
|
||||||
removefiles { "./deps/tomsfastmath/src/generators/**.c" }
|
|
||||||
|
|
||||||
-- not our code, ignore POSIX usage warnings for now
|
-- not our code, ignore POSIX usage warnings for now
|
||||||
warnings "Off"
|
warnings "Off"
|
||||||
|
@ -17,7 +17,7 @@ namespace Main
|
|||||||
|
|
||||||
void PreInit()
|
void PreInit()
|
||||||
{
|
{
|
||||||
ltc_mp = tfm_desc;
|
ltc_mp = ltm_desc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -46,7 +46,7 @@
|
|||||||
|
|
||||||
#define ZLIB_CONST
|
#define ZLIB_CONST
|
||||||
|
|
||||||
#define TFM_DESC
|
#define LTM_DESC
|
||||||
#define LTC_NO_FAST
|
#define LTC_NO_FAST
|
||||||
#define LTC_NO_PROTOTYPES
|
#define LTC_NO_PROTOTYPES
|
||||||
#define LTC_NO_RSA_BLINDING
|
#define LTC_NO_RSA_BLINDING
|
||||||
@ -57,8 +57,6 @@
|
|||||||
#include <curses.h>
|
#include <curses.h>
|
||||||
//#include <asio.hpp>
|
//#include <asio.hpp>
|
||||||
#include <json11.hpp>
|
#include <json11.hpp>
|
||||||
|
|
||||||
#include <tfm.h>
|
|
||||||
#include <tomcrypt.h>
|
#include <tomcrypt.h>
|
||||||
|
|
||||||
#pragma warning(pop)
|
#pragma warning(pop)
|
||||||
|
Loading…
Reference in New Issue
Block a user