Skip to content

Commit

Permalink
moved app version from variant specific makefiles to main makefile; a…
Browse files Browse the repository at this point in the history
…dded variant switch to build.sh script
  • Loading branch information
shufps committed Oct 25, 2022
1 parent 34064a5 commit d1669ee
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 14 deletions.
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,14 @@ endif

include $(BOLOS_SDK)/Makefile.defines

APPVERSION_M = 0
APPVERSION_N = 8
APPVERSION_P = 3
APPVERSION = "$(APPVERSION_M).$(APPVERSION_N).$(APPVERSION_P)"

APP_LOAD_PARAMS = --path "44'/1'" --curve ed25519 --appFlags 0x240 $(COMMON_LOAD_PARAMS)


ifeq ($(CHAIN),)
CHAIN=iota
endif
Expand Down
10 changes: 10 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ function usage {
echo "-c|--cxlib: don't autodetect cx-lib version (for speculos)"
echo "-g|--gdb: start speculos with -d (waiting for gdb debugger)"
echo "-a|--analyze run static code analysis"
echo "-v|--variant build for 'iota' or 'shimmer'"
exit 1
}

Expand Down Expand Up @@ -77,6 +78,7 @@ debug=0
gdb=0
analysis=0
cxlib=""
variant=""
while (( $# ))
do
case "$1" in
Expand Down Expand Up @@ -106,6 +108,10 @@ do
"-a" | "--analyze")
analysis=1
;;
"-v" | "--variant")
shift
variant="$1"
;;
*)
error "unknown parameter: $1"
;;
Expand Down Expand Up @@ -188,6 +194,10 @@ build_flags=""
build_flags+="DEBUG=1 "
}

[ ! -z "$variant" ] && {
build_flags+="CHAIN=$variant "
}

extra_args=""

(( analysis )) && {
Expand Down
9 changes: 2 additions & 7 deletions makefile_conf/chain/iota.mk
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
APPNAME = "IOTA"
APPVERSION_M = 0
APPVERSION_N = 8
APPVERSION_P = 0
APPVERSION = "$(APPVERSION_M).$(APPVERSION_N).$(APPVERSION_P)"

APP_LOAD_PARAMS = --path "44'/1'" --curve ed25519 --appFlags 0x240 $(COMMON_LOAD_PARAMS)
APPNAME = "IOTA"

DEFINES += APP_IOTA

# IOTA BIP-path
APP_LOAD_PARAMS += --path "44'/4218'"

Expand Down
10 changes: 3 additions & 7 deletions makefile_conf/chain/shimmer.mk
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
APPNAME = "Shimmer"
APPVERSION_M = 0
APPVERSION_N = 8
APPVERSION_P = 2
APPVERSION = "$(APPVERSION_M).$(APPVERSION_N).$(APPVERSION_P)"

APP_LOAD_PARAMS = --path "44'/1'" --curve ed25519 --appFlags 0x240 $(COMMON_LOAD_PARAMS)
APPNAME = "Shimmer"

DEFINES += APP_SHIMMER

# IOTA BIP-path for claiming Shimmer from IOTA addresses
APP_LOAD_PARAMS += --path "44'/4218'"

# Shimmer BIP-path
APP_LOAD_PARAMS += --path "44'/4219'"

Expand Down

0 comments on commit d1669ee

Please sign in to comment.