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