summaryrefslogtreecommitdiff
path: root/tools/libtommath.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tools/libtommath.nim')
-rw-r--r--tools/libtommath.nim19
1 files changed, 19 insertions, 0 deletions
diff --git a/tools/libtommath.nim b/tools/libtommath.nim
new file mode 100644
index 0000000..ae1154d
--- /dev/null
+++ b/tools/libtommath.nim
@@ -0,0 +1,19 @@
+import os
+
+import builder
+
+let sourceDir = expandFilename("/tmp/source-libtommath")
+
+let libtommath = newStaticLibrary("tommath", sourceDir)
+
+addSourceFilesWithPattern(libtommath, sourceDir / "*.c")
+
+addIncludeDirectory(libtommath, sourceDir)
+
+addPublicHeaders(libtommath, "include",
+ sourceDir / "tommath.h",
+ sourceDir / "tommath_class.h",
+ sourceDir / "tommath_superclass.h")
+
+if build(libtommath):
+ install(libtommath, getAppDir() / ".." / "src" / "tommath" / "private")