-
Notifications
You must be signed in to change notification settings - Fork 10
/
Package.swift
91 lines (81 loc) · 3.19 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
// swift-tools-version:5.2
// The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription
let package = Package(
name: "MEW-wallet-iOS-secp256k1-package",
products: [
// Products define the executables and libraries produced by a package, and make them visible to other packages.
.library(
name: "MEW-wallet-iOS-secp256k1-package",
targets: ["MEW-wallet-iOS-secp256k1-package"]),
],
dependencies: [
// Dependencies declare other packages that this package depends on.
// .package(url: /* package url */, from: "1.0.0"),
],
targets: [
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
// Targets can depend on other targets in this package, and on products in packages which this package depends on.
.target(
name: "MEW-wallet-iOS-secp256k1-package",
path: "Sources/MEW-wallet-iOS-secp256k1",
exclude: [
"contrib/travis.sh",
"src/asm",
// exclude benchmarks
"src/bench_ecdh.c",
"src/bench_ecmult.c",
"src/bench_internal.c",
"src/bench_recover.c",
"src/bench_sign.c",
"src/bench_verify.c",
"src/bench_internal.c",
"src/bench_ecdh.c",
"src/bench.h",
// already manually added ecmult_static_context.h
"src/gen_context.c",
// exclude tests
"src/testrand.h",
"src/testrand_impl.h",
"src/tests.c",
"src/tests_exhaustive.c",
"src/valgrind_ctime_test.c",
// exclude module tests and makefiles
"src/modules/ecdh/tests_impl.h",
"src/modules/recovery/tests_impl.h",
"src/modules/recovery/Makefile.am.include",
"src/modules/ecdh/Makefile.am.include",
// exclude docs and autotools related files
"build-aux",
"obj",
"sage",
"autogen.sh",
"configure.ac",
"COPYING",
"libsecp256k1.pc.in",
"Makefile.am",
"README.md",
"SECURITY.md",
"TODO",
],
sources: [
"src",
"contrib",
"include",
],
publicHeadersPath: "include",
cSettings: [
// speficy availability of libsecp256k1-config.h
.define("HAVE_CONFIG_H"),
// header paths are relative to target's dir
.headerSearchPath("./"),
.headerSearchPath("./src"),
.headerSearchPath("./spm-compat"),
// disable unnecessary value conversion warnings
// .unsafeFlags(["-w"]),
]),
.testTarget(
name: "MEW-wallet-iOS-secp256k1-packageTests",
dependencies: ["MEW-wallet-iOS-secp256k1-package"]),
]
)