15
15
# limitations under the License.
16
16
# ****************************************************************************
17
17
18
+ ifndef APPVERSION
19
+ $(error "APPVERSION is not defined")
20
+ endif
21
+
22
+ ifndef APPNAME
23
+ $(error "APPNAME is not defined")
24
+ endif
25
+
26
+ ifndef APP_DESCRIPTION
27
+ $(error "APP_DESCRIPTION is not defined")
28
+ endif
29
+
30
+ ifeq ($(filter mainnet testnet,$(BITCOIN_NETWORK ) ) ,)
31
+ $(error "BITCOIN_NETWORK must be either mainnet or testnet")
32
+ endif
33
+
18
34
ifeq ($(BOLOS_SDK ) ,)
19
35
$(error Environment variable BOLOS_SDK is not set)
20
36
endif
@@ -41,15 +57,6 @@ CURVE_APP_LOAD_PARAMS = secp256k1
41
57
# Application allowed derivation paths.
42
58
PATH_APP_LOAD_PARAMS = ""
43
59
44
- # Allowed SLIP21 paths
45
- PATH_SLIP21_APP_LOAD_PARAMS = "LEDGER-Wallet policy"
46
-
47
- # Application version
48
- APPVERSION_M = 2
49
- APPVERSION_N = 4
50
- APPVERSION_P = 0
51
- APPVERSION_SUFFIX = rc # if not empty, appended at the end. Do not add a dash.
52
-
53
60
ifeq ($(APPVERSION_SUFFIX ) ,)
54
61
APPVERSION = "$(APPVERSION_M ) .$(APPVERSION_N ) .$(APPVERSION_P ) "
55
62
else
@@ -63,34 +70,27 @@ ifneq ($(AUTOAPPROVE_FOR_PERF_TESTS),0)
63
70
DEFINES += HAVE_AUTOAPPROVE_FOR_PERF_TESTS
64
71
endif
65
72
66
- # Setting to allow building variant applications
67
- VARIANT_PARAM = COIN
68
- VARIANT_VALUES = bitcoin_testnet bitcoin
69
-
70
- # simplify for tests
71
- ifndef COIN
72
- COIN =bitcoin_testnet
73
- endif
74
-
75
73
# #######################################
76
74
# Application custom permissions #
77
75
# #######################################
78
76
HAVE_APPLICATION_FLAG_DERIVE_MASTER = 1
79
77
HAVE_APPLICATION_FLAG_GLOBAL_PIN = 1
80
78
HAVE_APPLICATION_FLAG_BOLOS_SETTINGS = 1
81
- HAVE_APPLICATION_FLAG_LIBRARY = 1
79
+ HAVE_APPLICATION_FLAG_LIBRARY = 0
80
+
81
+ $(info APP_DESCRIPTION is $(APP_DESCRIPTION))
82
82
83
- ifeq ($(COIN ) ,bitcoin_testnet)
83
+ CFLAGS += -DAPP_DESCRIPTION=\"$(APP_DESCRIPTION ) \"
84
+
85
+ ifeq ($(BITCOIN_NETWORK ) ,testnet)
84
86
# Bitcoin testnet, no legacy support
85
87
DEFINES += BIP32_PUBKEY_VERSION=0x043587CF
86
88
DEFINES += BIP44_COIN_TYPE=1
87
89
DEFINES += COIN_P2PKH_VERSION=111
88
90
DEFINES += COIN_P2SH_VERSION=196
89
91
DEFINES += COIN_NATIVE_SEGWIT_PREFIX=\"tb\"
90
92
DEFINES += COIN_COINID_SHORT=\"TEST\"
91
-
92
- APPNAME = "Bitcoin Test"
93
- else ifeq ($(COIN),bitcoin)
93
+ else ifeq ($(BITCOIN_NETWORK),mainnet)
94
94
# the version for performance tests automatically approves all requests
95
95
# there is no reason to ever compile the mainnet app with this flag
96
96
ifneq ($(AUTOAPPROVE_FOR_PERF_TESTS),0)
@@ -109,23 +109,16 @@ else ifeq ($(COIN),bitcoin)
109
109
110
110
else
111
111
ifeq ($(filter clean,$(MAKECMDGOALS)),)
112
- $(error Unsupported COIN - use bitcoin_testnet, bitcoin )
112
+ $(error Unsupported network )
113
113
endif
114
114
endif
115
115
116
116
ifneq (,$(filter-out clean,$(MAKECMDGOALS ) ) )
117
117
ifeq ($(TARGET_NAME),TARGET_NANOS)
118
- $(error This branch is not compatible with the Nano S device. Checkout the 'nanos' branch for the latest code for Nano S .)
118
+ $(error This app is not compatible with the Nano S device.)
119
119
endif
120
120
endif
121
121
122
- # Application icons following guidelines:
123
- # https://developers.ledger.com/docs/embedded-app/design-requirements/#device-icon
124
- ICON_NANOX = icons/nanox_app_bitcoin.gif
125
- ICON_NANOSP = icons/nanox_app_bitcoin.gif
126
- ICON_STAX = icons/stax_app_bitcoin.gif
127
- ICON_FLEX = icons/flex_app_bitcoin.gif
128
-
129
122
# #######################################
130
123
# Application communication interfaces #
131
124
# #######################################
@@ -151,9 +144,6 @@ DEFINES += HAVE_BOLOS_APP_STACK_CANARY
151
144
152
145
DEFINES += IO_SEPROXYHAL_BUFFER_SIZE_B=300
153
146
154
- # debugging helper functions and macros
155
- CFLAGS += -include debug-helpers/debug.h
156
-
157
147
# DEFINES += HAVE_PRINT_STACK_POINTER
158
148
159
149
ifeq ($(DEBUG ) ,10)
0 commit comments