forked from dexon-foundation/esp-trezor-crypto
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcomponent.mk
37 lines (31 loc) · 947 Bytes
/
component.mk
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
#
# Main component makefile.
#
# This Makefile can be left empty. By default, it will take the sources in the
# src/ directory, compile them and link them into lib(subdirectory_name).a
# in the build directory. This behaviour is entirely configurable,
# please read the ESP-IDF documents if you need to do this.
COMPONENT_ADD_INCLUDEDIRS := . include
COMPONENT_PRIV_INCLUDEDIRS := .
COMPONENT_SRCDIRS := .
ifdef $(or $(CONFIG_USE_KECCAK), $(CONFIG_USE_MONERO), $(CONFIG_USE_NEM), $(CONFIG_USE_CARDANO))
COMPONENT_SRCDIRS += ed25519-donna
endif
ifdef $(CONFIG_USE_MONERO)
COMPONENT_SRCDIRS += monero
endif
ifdef $(CONFIG_USE_NEM)
COMPONENT_SRCDIRS += aes
endif
ifdef $(CONFIG_USE_CHACHA20POLY1305)
COMPONENT_SRCDIRS += chacha20poly1305
endif
# Defines
CONFIGS = \
USE_ETHEREUM \
USE_GRAPHENE \
USE_KECCAK \
USE_MONERO \
USE_NEM \
USE_CARDANO
$(foreach c,$(CONFIGS),$(eval $(if $(CONFIG_$(c)), CFLAGS += -D$(c)=1, CFLAGS += -D$(c)=0)))