First version
[3rdparty/ote_partner/tlk.git] / platform / tegra / monitor / rules.mk
1 LOCAL_DIR := $(GET_LOCAL_DIR)
2
3 MODULE := $(LOCAL_DIR)
4
5 ifeq ($(MONITOR_BIN),true)
6
7 MONARCH := $(MONITOR_ARCH)
8 MODULE_ARCH := $(MONARCH)
9
10 # linked into the monitor build (mon.bin)
11 MONITOR_MODULE := true
12
13 MODULE_SRCS += \
14         $(LOCAL_DIR)/memory.c \
15         $(LOCAL_DIR)/interrupts.c \
16         $(LOCAL_DIR)/psci.c \
17         $(LOCAL_DIR)/debug.c
18
19 INCLUDES += \
20         -I$(LOCAL_DIR)/include \
21         -I$(LOCAL_DIR)/$(MONARCH)/include
22
23 DEFINES += \
24         WITH_MONITOR_BIN=1 \
25         MONCPUS=$(MONCPUS)
26
27 ifeq ($(MONARCH),arm)
28 MODULE_CC := $(TOOLCHAIN_PREFIX)gcc
29 MODULE_LD := $(TOOLCHAIN_PREFIX)ld
30 MON_OBJCOPY := $(TOOLCHAIN_PREFIX)objcopy
31 endif
32
33 ifeq ($(MONARCH),arm64)
34 MODULE_CC := $(TOOLCHAIN_PREFIX64)gcc
35 MODULE_LD := $(TOOLCHAIN_PREFIX64)ld
36 MON_OBJCOPY := $(TOOLCHAIN_PREFIX64)objcopy
37 endif
38
39 else
40
41 # linked into secureos build (lk.bin)
42 MODULE_SRCS += \
43         $(LOCAL_DIR)/memory.c \
44         $(LOCAL_DIR)/interrupts.c
45
46 endif
47
48 include make/module.mk