forked from swift-bitcoin/secp256k1
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Package.swift
53 lines (51 loc) · 1.72 KB
/
Package.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
// swift-tools-version:6.0
import PackageDescription
let package = Package(
name: "secp256k1",
products: [
.library(name: "LibSECP256k1", targets: ["LibSECP256k1"]),
],
targets: [
.target(
name: "LibSECP256k1PreComputed",
path: "src",
sources: ["precomputed_ecmult.c", "precomputed_ecmult_gen.c"],
publicHeadersPath: "include-precomputed",
cSettings: [
.define("SECP256K1_BUILD", to: ""),
]
),
.target(
name: "LibSECP256k1",
dependencies: ["LibSECP256k1PreComputed"],
path: "src",
sources: ["secp256k1.c"],
publicHeadersPath: "include",
cSettings: [
.define("SECP256K1_BUILD", to: ""),
.define("ENABLE_MODULE_ECDH"),
.define("ENABLE_MODULE_RECOVERY"),
.define("ENABLE_MODULE_EXTRAKEYS"),
.define("ENABLE_MODULE_SCHNORRSIG"),
.define("ENABLE_MODULE_ELLSWIFT"),
.define("ENABLE_MODULE_MUSIG")
]
),
.executableTarget(
name: "LibSECP256k1Tests",
dependencies: ["LibSECP256k1PreComputed"],
path: "src",
sources: ["tests.c"],
cSettings: [
.define("SECP256K1_BUILD", to: ""),
.define("ENABLE_MODULE_ECDH"),
.define("ENABLE_MODULE_RECOVERY"),
.define("ENABLE_MODULE_EXTRAKEYS"),
.define("ENABLE_MODULE_SCHNORRSIG"),
.define("ENABLE_MODULE_ELLSWIFT"),
.define("ENABLE_MODULE_MUSIG")
]
)
],
cLanguageStandard: .c90
)