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 23 24arch-bits-$(sm) := $(arch-bits-core) 25 26cppflags$(sm) += -include $(conf-file) 27cppflags$(sm) += -DTRACE_LEVEL=$(CFG_TEE_CORE_LOG_LEVEL) 28cppflags$(sm) += -D__LDELF__ 29 30# Use same compiler as for core 31CROSS_COMPILE_$(sm) := $(CROSS_COMPILE_core) 32COMPILER_$(sm) := $(COMPILER_core) 33include mk/$(COMPILER_$(sm)).mk 34 35base-prefix := $(sm)- 36 37libname = utils 38libdir = lib/libutils 39include mk/lib.mk 40 41libname = utee 42libdir = lib/libutee 43include mk/lib.mk 44 45libname = unw 46libdir = lib/libunw 47include mk/lib.mk 48 49base-prefix := 50 51subdirs = ldelf 52include mk/subdir.mk 53 54include mk/compile.mk 55 56include ldelf/link.mk 57