diff options
| author | Oskari Timperi <oskari.timperi@iki.fi> | 2018-03-13 07:31:38 +0200 |
|---|---|---|
| committer | Oskari Timperi <oskari.timperi@iki.fi> | 2018-03-13 07:31:38 +0200 |
| commit | 8933d9b3573b1dc7c4d51cb3c31eb5a457aab549 (patch) | |
| tree | edff908601b6d37af93b4542bb276cb4172fbf7a /src | |
| download | tomcrypt-nim-8933d9b3573b1dc7c4d51cb3c31eb5a457aab549.tar.gz tomcrypt-nim-8933d9b3573b1dc7c4d51cb3c31eb5a457aab549.zip | |
Initial commit
Diffstat (limited to 'src')
| -rw-r--r-- | src/tomcrypt/private/config.nim | 26 | ||||
| -rw-r--r-- | src/tomcrypt/tomcrypt.nim | 3 |
2 files changed, 29 insertions, 0 deletions
diff --git a/src/tomcrypt/private/config.nim b/src/tomcrypt/private/config.nim new file mode 100644 index 0000000..99c73c7 --- /dev/null +++ b/src/tomcrypt/private/config.nim @@ -0,0 +1,26 @@ +import os + +template currentSourceDir(): string = + ## Return the directory the current source file resides in. + parentDir(currentSourcePath()) + +when not defined(tomcryptPrefix): + const tomcryptPrefix = currentSourceDir() + +when not defined(tomcryptIncPath): + const tomcryptIncPath = tomcryptPrefix / "include" + +when defined(vcc): + {.passC:"/I" & tomcryptIncPath.} +else: + {.passC:"-I" & tomcryptIncPath.} + +when not defined(tomcryptLibPath): + const tomcryptLibPath = tomcryptPrefix / "lib" + +when defined(vcc): + const libraryPath = tomcryptLibPath / "tomcrypt.lib" +else: + const libraryPath = tomcryptLibPath / "libtomcrypt.a" + +{.passL:libraryPath.} diff --git a/src/tomcrypt/tomcrypt.nim b/src/tomcrypt/tomcrypt.nim new file mode 100644 index 0000000..9bb42ad --- /dev/null +++ b/src/tomcrypt/tomcrypt.nim @@ -0,0 +1,3 @@ +# tomcrypt_nim +# Copyright Oskari Timperi +# libtomcrypt for Nim |
