enable cross-compilation

This commit is contained in:
Ștefan Talpalaru 2021-02-02 23:22:07 +01:00 committed by andri lim
parent eebf730ccd
commit 5f226c97ec
2 changed files with 21 additions and 21 deletions

View File

@ -1,5 +1,5 @@
## Nim-BearSSL
## Copyright (c) 2018 Status Research & Development GmbH
## Copyright (c) 2018-2021 Status Research & Development GmbH
## Licensed under either of
## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE))
## * MIT license ([LICENSE-MIT](LICENSE-MIT))
@ -13,11 +13,11 @@
## And converted to C header using ``brssl ta cacert-2020-06-24.pem > cacert``.
from decls import X509TrustAnchor
from strutils import rsplit
from os import DirSep
from os import DirSep, AltSep
const CurrentPath = currentSourcePath.rsplit(DirSep, 1)[0]
const CurrentPath = currentSourcePath.rsplit({DirSep, AltSep}, 1)[0]
{.passC: "-I" & CurrentPath & DirSep & "certs".}
{.passC: "-I" & CurrentPath & "/certs".}
var MozillaTrustAnchors* {.
importc: "TAs", header: "cacert20200624.h".}: array[138, X509TrustAnchor]

View File

@ -8,28 +8,28 @@
## those terms.
## This module implements interface with BearSSL library sources.
import strutils
from os import DirSep, quoteShell
from os import quoteShell, DirSep, AltSep
const
bearPath = currentSourcePath.rsplit(DirSep, 1)[0] & DirSep &
"csources" & DirSep
bearPath = currentSourcePath.rsplit({DirSep, AltSep}, 1)[0] & "/" &
"csources" & "/"
bearSrcPath = bearPath & "src"
bearIncPath = bearPath & "inc"
bearIntPath = bearSrcPath & DirSep & "int" & DirSep
bearCodecPath = bearSrcPath & DirSep & "codec" & DirSep
bearRandPath = bearSrcPath & DirSep & "rand" & DirSep
bearRsaPath = bearSrcPath & DirSep & "rsa" & DirSep
bearEcPath = bearSrcPath & DirSep & "ec" & DirSep
bearX509Path = bearSrcPath & DirSep & "x509" & DirSep
bearSslPath = bearSrcPath & DirSep & "ssl" & DirSep
bearMacPath = bearSrcPath & DirSep & "mac" & DirSep
bearKdfPath = bearSrcPath & DirSep & "kdf" & DirSep
bearHashPath = bearSrcPath & DirSep & "hash" & DirSep
bearSymcPath = bearSrcPath & DirSep & "symcipher" & DirSep
bearAeadPath = bearSrcPath & DirSep & "aead" & DirSep
bearToolsPath = bearPath & "tools" & DirSep
bearRootPath = bearSrcPath & DirSep
bearIntPath = bearSrcPath & "/" & "int" & "/"
bearCodecPath = bearSrcPath & "/" & "codec" & "/"
bearRandPath = bearSrcPath & "/" & "rand" & "/"
bearRsaPath = bearSrcPath & "/" & "rsa" & "/"
bearEcPath = bearSrcPath & "/" & "ec" & "/"
bearX509Path = bearSrcPath & "/" & "x509" & "/"
bearSslPath = bearSrcPath & "/" & "ssl" & "/"
bearMacPath = bearSrcPath & "/" & "mac" & "/"
bearKdfPath = bearSrcPath & "/" & "kdf" & "/"
bearHashPath = bearSrcPath & "/" & "hash" & "/"
bearSymcPath = bearSrcPath & "/" & "symcipher" & "/"
bearAeadPath = bearSrcPath & "/" & "aead" & "/"
bearToolsPath = bearPath & "tools" & "/"
bearRootPath = bearSrcPath & "/"
{.passC: "-I" & quoteShell(bearSrcPath)}
{.passC: "-I" & quoteShell(bearIncPath)}