Jens Wiklander | 7509ff7 | 2019-05-23 17:42:08 +0200 | [diff] [blame] | 1 | include mk/cleanvars.mk |
| 2 | |
| 3 | # Set current submodule (used for module specific flags compile result etc) |
| 4 | sm := ldelf |
| 5 | sm-$(sm) := y |
| 6 | |
| 7 | link-out-dir$(sm) := $(out-dir)/$(sm) |
| 8 | |
| 9 | cppflags$(sm) := $(core-platform-cppflags) |
| 10 | cflags$(sm) := $(core-platform-cflags) -fpie -fvisibility=hidden |
| 11 | aflags$(sm) := $(core-platform-aflags) |
| 12 | |
| 13 | # ldelf is compiled for the same arch or register width as core |
| 14 | ifeq ($(CFG_ARM64_core),y) |
| 15 | CFG_ARM64_$(sm) := y |
| 16 | endif |
| 17 | ifeq ($(CFG_ARM32_core),y) |
| 18 | CFG_ARM32_$(sm) := y |
| 19 | endif |
liushiwei | 8fab437 | 2022-11-30 20:20:52 +0800 | [diff] [blame] | 20 | ifeq ($(CFG_RV64_core),y) |
| 21 | CFG_RV64_$(sm) := y |
| 22 | endif |
liushiwei | fdc4a8b | 2023-03-09 16:52:31 +0800 | [diff] [blame] | 23 | ifeq ($(CFG_RV32_core),y) |
| 24 | CFG_RV32_$(sm) := y |
| 25 | endif |
Etienne Carriere | 19fdfcf | 2021-08-31 17:49:48 +0200 | [diff] [blame] | 26 | arch-bits-$(sm) := $(arch-bits-core) |
Jens Wiklander | 7509ff7 | 2019-05-23 17:42:08 +0200 | [diff] [blame] | 27 | |
| 28 | cppflags$(sm) += -include $(conf-file) |
| 29 | cppflags$(sm) += -DTRACE_LEVEL=$(CFG_TEE_CORE_LOG_LEVEL) |
Sumit Garg | f93627d | 2019-08-14 17:13:46 +0530 | [diff] [blame] | 30 | cppflags$(sm) += -D__LDELF__ |
Jens Wiklander | 7509ff7 | 2019-05-23 17:42:08 +0200 | [diff] [blame] | 31 | |
| 32 | # Use same compiler as for core |
| 33 | CROSS_COMPILE_$(sm) := $(CROSS_COMPILE_core) |
| 34 | COMPILER_$(sm) := $(COMPILER_core) |
| 35 | include mk/$(COMPILER_$(sm)).mk |
| 36 | |
| 37 | base-prefix := $(sm)- |
| 38 | |
| 39 | libname = utils |
| 40 | libdir = lib/libutils |
| 41 | include mk/lib.mk |
| 42 | |
| 43 | libname = utee |
| 44 | libdir = lib/libutee |
| 45 | include mk/lib.mk |
| 46 | |
Jerome Forissier | 7f75287 | 2020-09-03 14:37:35 +0200 | [diff] [blame] | 47 | libname = unw |
| 48 | libdir = lib/libunw |
| 49 | include mk/lib.mk |
| 50 | |
Jens Wiklander | 7509ff7 | 2019-05-23 17:42:08 +0200 | [diff] [blame] | 51 | base-prefix := |
| 52 | |
| 53 | subdirs = ldelf |
| 54 | include mk/subdir.mk |
| 55 | |
| 56 | include mk/compile.mk |
| 57 | |
| 58 | include ldelf/link.mk |