mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-02 04:18:20 +00:00
79 lines
2.8 KiB
Diff
79 lines
2.8 KiB
Diff
|
--- a/py/py.mk
|
||
|
+++ b/py/py.mk
|
||
|
@@ -101,6 +101,75 @@ CFLAGS_MOD += -DMICROPY_PY_BTREE=1
|
||
|
$(BUILD)/$(BTREE_DIR)/%.o: CFLAGS += -Wno-old-style-definition -Wno-sign-compare -Wno-unused-parameter
|
||
|
endif
|
||
|
|
||
|
+ifeq ($(MICROPY_PY_TREZORCONFIG),1)
|
||
|
+SRC_MOD += extmod/modtrezorconfig/modtrezorconfig.c
|
||
|
+SRC_MOD += extmod/modtrezorconfig/norcow.c
|
||
|
+endif
|
||
|
+
|
||
|
+ifeq ($(MICROPY_PY_TREZORCRYPTO),1)
|
||
|
+CFLAGS_MOD += -I../extmod/modtrezorcrypto/trezor-crypto
|
||
|
+CFLAGS_MOD += -I../extmod/modtrezorcrypto/trezor-crypto/curve25519-donna
|
||
|
+CFLAGS_MOD += -I../extmod/modtrezorcrypto/trezor-crypto/ed25519-donna
|
||
|
+CFLAGS_MOD += -DED25519_CUSTOMRANDOM=1
|
||
|
+CFLAGS_MOD += -DED25519_CUSTOMHASH=1
|
||
|
+CFLAGS_MOD += -DED25519_NO_INLINE_ASM
|
||
|
+CFLAGS_MOD += -DED25519_FORCE_32BIT=1
|
||
|
+CFLAGS_MOD += -DAES_128
|
||
|
+CFLAGS_MOD += -DAES_192
|
||
|
+CFLAGS_MOD += -DUSE_KECCAK=1
|
||
|
+CFLAGS_MOD += -Wno-sequence-point
|
||
|
+SRC_MOD += \
|
||
|
+ extmod/modtrezorcrypto/modtrezorcrypto.c \
|
||
|
+ extmod/modtrezorcrypto/rand.c \
|
||
|
+ extmod/modtrezorcrypto/ssss.c \
|
||
|
+ extmod/modtrezorcrypto/trezor-crypto/address.c \
|
||
|
+ extmod/modtrezorcrypto/trezor-crypto/aescrypt.c \
|
||
|
+ extmod/modtrezorcrypto/trezor-crypto/aeskey.c \
|
||
|
+ extmod/modtrezorcrypto/trezor-crypto/aes_modes.c \
|
||
|
+ extmod/modtrezorcrypto/trezor-crypto/aestab.c \
|
||
|
+ extmod/modtrezorcrypto/trezor-crypto/base58.c \
|
||
|
+ extmod/modtrezorcrypto/trezor-crypto/bignum.c \
|
||
|
+ extmod/modtrezorcrypto/trezor-crypto/bip32.c \
|
||
|
+ extmod/modtrezorcrypto/trezor-crypto/bip39.c \
|
||
|
+ extmod/modtrezorcrypto/trezor-crypto/blake2s.c \
|
||
|
+ extmod/modtrezorcrypto/trezor-crypto/curve25519-donna/curve25519.c \
|
||
|
+ extmod/modtrezorcrypto/trezor-crypto/curves.c \
|
||
|
+ extmod/modtrezorcrypto/trezor-crypto/ecdsa.c \
|
||
|
+ extmod/modtrezorcrypto/trezor-crypto/ed25519-donna/ed25519.c \
|
||
|
+ extmod/modtrezorcrypto/trezor-crypto/hmac.c \
|
||
|
+ extmod/modtrezorcrypto/trezor-crypto/nist256p1.c \
|
||
|
+ extmod/modtrezorcrypto/trezor-crypto/pbkdf2.c \
|
||
|
+ extmod/modtrezorcrypto/trezor-crypto/ripemd160.c \
|
||
|
+ extmod/modtrezorcrypto/trezor-crypto/secp256k1.c \
|
||
|
+ extmod/modtrezorcrypto/trezor-crypto/sha2.c \
|
||
|
+ extmod/modtrezorcrypto/trezor-crypto/sha3.c
|
||
|
+endif
|
||
|
+
|
||
|
+ifeq ($(MICROPY_PY_TREZORDEBUG),1)
|
||
|
+SRC_MOD += extmod/modtrezordebug/modtrezordebug.c
|
||
|
+endif
|
||
|
+
|
||
|
+ifeq ($(MICROPY_PY_TREZORMSG),1)
|
||
|
+SRC_MOD += extmod/modtrezormsg/modtrezormsg.c
|
||
|
+endif
|
||
|
+
|
||
|
+ifeq ($(MICROPY_PY_TREZORUI),1)
|
||
|
+CFLAGS_MOD += -DQR_MAX_VERSION=0
|
||
|
+SRC_MOD += \
|
||
|
+ extmod/modtrezorui/display.c \
|
||
|
+ extmod/modtrezorui/inflate.c \
|
||
|
+ extmod/modtrezorui/font_bitmap.c \
|
||
|
+ extmod/modtrezorui/font_roboto_bold_20.c \
|
||
|
+ extmod/modtrezorui/font_roboto_regular_20.c \
|
||
|
+ extmod/modtrezorui/font_robotomono_regular_20.c \
|
||
|
+ extmod/modtrezorui/modtrezorui.c \
|
||
|
+ extmod/modtrezorui/trezor-qrenc/qr_encode.c
|
||
|
+endif
|
||
|
+
|
||
|
+ifeq ($(MICROPY_PY_TREZORUTILS),1)
|
||
|
+SRC_MOD += extmod/modtrezorutils/modtrezorutils.c
|
||
|
+endif
|
||
|
+
|
||
|
# py object files
|
||
|
PY_O_BASENAME = \
|
||
|
mpstate.o \
|