2017-08-08 10:59:39 +00:00
|
|
|
APPVER = 1.0.0
|
2017-06-10 18:42:10 +00:00
|
|
|
|
2017-08-08 10:59:39 +00:00
|
|
|
ifeq ($(FASTFLASH),1)
|
2017-06-10 18:42:10 +00:00
|
|
|
OBJS += fastflash.o
|
|
|
|
OBJS += bootloader.o
|
|
|
|
endif
|
2014-04-29 12:26:51 +00:00
|
|
|
|
|
|
|
NAME = trezor
|
|
|
|
|
2017-12-13 18:38:51 +00:00
|
|
|
ifeq ($(EMULATOR),1)
|
|
|
|
OBJS += udp.o
|
|
|
|
else
|
2014-04-29 12:26:51 +00:00
|
|
|
OBJS += usb.o
|
2017-12-13 18:38:51 +00:00
|
|
|
endif
|
|
|
|
|
2018-03-11 14:58:11 +00:00
|
|
|
OBJS += bl_check.o
|
2015-11-02 23:08:18 +00:00
|
|
|
OBJS += u2f.o
|
2014-04-29 12:26:51 +00:00
|
|
|
OBJS += messages.o
|
|
|
|
OBJS += storage.o
|
|
|
|
OBJS += trezor.o
|
|
|
|
OBJS += pinmatrix.o
|
|
|
|
OBJS += fsm.o
|
|
|
|
OBJS += coins.o
|
|
|
|
OBJS += transaction.o
|
|
|
|
OBJS += protect.o
|
|
|
|
OBJS += layout2.o
|
|
|
|
OBJS += recovery.o
|
|
|
|
OBJS += reset.o
|
|
|
|
OBJS += signing.o
|
2014-11-15 01:01:21 +00:00
|
|
|
OBJS += crypto.o
|
2016-05-24 21:22:30 +00:00
|
|
|
OBJS += ethereum.o
|
2017-05-16 12:00:55 +00:00
|
|
|
OBJS += ethereum_tokens.o
|
2017-05-30 16:41:02 +00:00
|
|
|
OBJS += nem2.o
|
2017-07-20 21:58:19 +00:00
|
|
|
OBJS += nem_mosaics.o
|
2014-04-29 12:26:51 +00:00
|
|
|
|
|
|
|
OBJS += debug.o
|
|
|
|
|
2016-10-10 09:26:52 +00:00
|
|
|
OBJS += ../vendor/trezor-crypto/address.o
|
2015-12-15 22:01:54 +00:00
|
|
|
OBJS += ../vendor/trezor-crypto/bignum.o
|
|
|
|
OBJS += ../vendor/trezor-crypto/ecdsa.o
|
2016-04-22 15:49:00 +00:00
|
|
|
OBJS += ../vendor/trezor-crypto/curves.o
|
2015-12-15 22:01:54 +00:00
|
|
|
OBJS += ../vendor/trezor-crypto/secp256k1.o
|
|
|
|
OBJS += ../vendor/trezor-crypto/nist256p1.o
|
2018-01-13 14:20:10 +00:00
|
|
|
OBJS += ../vendor/trezor-crypto/rand.o
|
2018-01-18 14:21:48 +00:00
|
|
|
OBJS += ../vendor/trezor-crypto/memzero.o
|
2017-08-14 12:59:17 +00:00
|
|
|
|
|
|
|
OBJS += ../vendor/trezor-crypto/ed25519-donna/curve25519-donna-32bit.o
|
|
|
|
OBJS += ../vendor/trezor-crypto/ed25519-donna/curve25519-donna-helpers.o
|
|
|
|
OBJS += ../vendor/trezor-crypto/ed25519-donna/modm-donna-32bit.o
|
2017-06-25 14:37:45 +00:00
|
|
|
OBJS += ../vendor/trezor-crypto/ed25519-donna/ed25519-donna-basepoint-table.o
|
2017-08-14 12:59:17 +00:00
|
|
|
OBJS += ../vendor/trezor-crypto/ed25519-donna/ed25519-donna-32bit-tables.o
|
|
|
|
OBJS += ../vendor/trezor-crypto/ed25519-donna/ed25519-donna-impl-base.o
|
|
|
|
OBJS += ../vendor/trezor-crypto/ed25519-donna/ed25519.o
|
|
|
|
OBJS += ../vendor/trezor-crypto/ed25519-donna/curve25519-donna-scalarmult-base.o
|
2017-06-12 16:35:27 +00:00
|
|
|
OBJS += ../vendor/trezor-crypto/ed25519-donna/ed25519-sha3.o
|
|
|
|
OBJS += ../vendor/trezor-crypto/ed25519-donna/ed25519-keccak.o
|
2017-08-14 12:59:17 +00:00
|
|
|
|
2015-12-15 22:01:54 +00:00
|
|
|
OBJS += ../vendor/trezor-crypto/hmac.o
|
|
|
|
OBJS += ../vendor/trezor-crypto/bip32.o
|
|
|
|
OBJS += ../vendor/trezor-crypto/bip39.o
|
|
|
|
OBJS += ../vendor/trezor-crypto/pbkdf2.o
|
2017-06-12 16:35:27 +00:00
|
|
|
OBJS += ../vendor/trezor-crypto/base32.o
|
2015-12-15 22:01:54 +00:00
|
|
|
OBJS += ../vendor/trezor-crypto/base58.o
|
2017-09-08 13:29:55 +00:00
|
|
|
OBJS += ../vendor/trezor-crypto/segwit_addr.o
|
2015-12-15 22:01:54 +00:00
|
|
|
|
|
|
|
OBJS += ../vendor/trezor-crypto/ripemd160.o
|
|
|
|
OBJS += ../vendor/trezor-crypto/sha2.o
|
2016-05-24 19:31:34 +00:00
|
|
|
OBJS += ../vendor/trezor-crypto/sha3.o
|
2017-12-09 16:44:29 +00:00
|
|
|
OBJS += ../vendor/trezor-crypto/blake256.o
|
|
|
|
OBJS += ../vendor/trezor-crypto/hasher.o
|
2015-12-15 22:01:54 +00:00
|
|
|
|
2017-05-08 15:16:20 +00:00
|
|
|
OBJS += ../vendor/trezor-crypto/aes/aescrypt.o
|
|
|
|
OBJS += ../vendor/trezor-crypto/aes/aeskey.o
|
|
|
|
OBJS += ../vendor/trezor-crypto/aes/aestab.o
|
|
|
|
OBJS += ../vendor/trezor-crypto/aes/aes_modes.o
|
2015-12-15 22:01:54 +00:00
|
|
|
|
2017-05-29 14:07:13 +00:00
|
|
|
OBJS += ../vendor/trezor-crypto/nem.o
|
|
|
|
|
2015-12-15 22:01:54 +00:00
|
|
|
OBJS += ../vendor/trezor-qrenc/qr_encode.o
|
2014-08-08 17:09:54 +00:00
|
|
|
|
2017-12-18 21:33:58 +00:00
|
|
|
OBJS += ../vendor/nanopb/pb_common.o
|
|
|
|
OBJS += ../vendor/nanopb/pb_decode.o
|
|
|
|
OBJS += ../vendor/nanopb/pb_encode.o
|
|
|
|
|
2014-04-29 12:26:51 +00:00
|
|
|
OBJS += protob/messages.pb.o
|
|
|
|
OBJS += protob/types.pb.o
|
|
|
|
|
|
|
|
include ../Makefile.include
|
|
|
|
|
2017-06-10 18:42:10 +00:00
|
|
|
ifeq ($(FASTFLASH),1)
|
2017-06-10 18:54:54 +00:00
|
|
|
CFLAGS += -DFASTFLASH=1
|
|
|
|
else
|
|
|
|
CFLAGS += -DFASTFLASH=0
|
2017-06-10 18:42:10 +00:00
|
|
|
endif
|
|
|
|
|
2017-08-14 13:18:36 +00:00
|
|
|
DEBUG_LINK ?= 0
|
|
|
|
DEBUG_LOG ?= 0
|
|
|
|
|
2014-06-07 12:21:59 +00:00
|
|
|
CFLAGS += -Wno-sequence-point
|
2017-12-18 21:33:58 +00:00
|
|
|
CFLAGS += -I../vendor/nanopb -Iprotob -DPB_FIELD_16BIT=1
|
2014-08-08 17:09:54 +00:00
|
|
|
CFLAGS += -DQR_MAX_VERSION=0
|
2017-08-14 13:18:36 +00:00
|
|
|
CFLAGS += -DDEBUG_LINK=$(DEBUG_LINK)
|
|
|
|
CFLAGS += -DDEBUG_LOG=$(DEBUG_LOG)
|
2014-04-29 12:26:51 +00:00
|
|
|
CFLAGS += -DSCM_REVISION='"$(shell git rev-parse HEAD | sed 's:\(..\):\\x\1:g')"'
|
2016-05-23 20:27:18 +00:00
|
|
|
CFLAGS += -DUSE_ETHEREUM=1
|
2017-05-29 14:07:13 +00:00
|
|
|
CFLAGS += -DUSE_NEM=1
|
2017-06-10 18:41:31 +00:00
|
|
|
|
|
|
|
bootloader.o: ../fastflash/bootloader.bin
|
|
|
|
$(OBJCOPY) -I binary -O elf32-littlearm -B arm \
|
2017-08-08 10:59:39 +00:00
|
|
|
--redefine-sym _binary_$(shell echo -n "$<" | tr -c "[:alnum:]" "_")_start=__bootloader_start__ \
|
2017-06-10 18:41:31 +00:00
|
|
|
--redefine-sym _binary_$(shell echo -n "$<" | tr -c "[:alnum:]" "_")_size=__bootloader_size__ \
|
2017-08-08 10:59:39 +00:00
|
|
|
--rename-section .data=.rodata \
|
2017-06-10 18:41:31 +00:00
|
|
|
$< $@
|
2017-09-30 09:09:11 +00:00
|
|
|
|
|
|
|
coins_count.h: coins-gen.py coins.json
|
2017-12-18 21:48:52 +00:00
|
|
|
$(PYTHON) $< count > $@
|
2017-09-30 09:09:11 +00:00
|
|
|
|
|
|
|
coins_array.h: coins-gen.py coins.json
|
2017-12-18 21:48:52 +00:00
|
|
|
$(PYTHON) $< array > $@
|
2017-09-30 09:09:11 +00:00
|
|
|
|
2017-10-09 16:48:30 +00:00
|
|
|
nem_mosaics.c nem_mosaics.h: nem_mosaics.py nem_mosaics.json
|
2017-12-18 21:48:52 +00:00
|
|
|
$(PYTHON) $<
|
2017-10-09 16:48:30 +00:00
|
|
|
|
2018-03-11 14:58:11 +00:00
|
|
|
bl_data.h: bl_data-gen.py ../bootloader/bootloader.bin
|
|
|
|
$(PYTHON) $<
|
|
|
|
|
2017-09-30 09:09:11 +00:00
|
|
|
clean::
|
|
|
|
rm -f coins_count.h coins_array.h
|
2017-10-09 16:48:30 +00:00
|
|
|
rm -f nem_mosaics.c nem_mosaics.h
|
2018-03-11 14:58:11 +00:00
|
|
|
rm -f bl_data.h
|