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 |
| 20 | |
| 21 | cppflags$(sm) += -include $(conf-file) |
| 22 | cppflags$(sm) += -DTRACE_LEVEL=$(CFG_TEE_CORE_LOG_LEVEL) |
Sumit Garg | f93627d | 2019-08-14 17:13:46 +0530 | [diff] [blame^] | 23 | cppflags$(sm) += -D__LDELF__ |
Jens Wiklander | 7509ff7 | 2019-05-23 17:42:08 +0200 | [diff] [blame] | 24 | |
| 25 | # Use same compiler as for core |
| 26 | CROSS_COMPILE_$(sm) := $(CROSS_COMPILE_core) |
| 27 | COMPILER_$(sm) := $(COMPILER_core) |
| 28 | include mk/$(COMPILER_$(sm)).mk |
| 29 | |
| 30 | base-prefix := $(sm)- |
| 31 | |
| 32 | libname = utils |
| 33 | libdir = lib/libutils |
| 34 | include mk/lib.mk |
| 35 | |
| 36 | libname = utee |
| 37 | libdir = lib/libutee |
| 38 | include mk/lib.mk |
| 39 | |
| 40 | base-prefix := |
| 41 | |
| 42 | subdirs = ldelf |
| 43 | include mk/subdir.mk |
| 44 | |
| 45 | include mk/compile.mk |
| 46 | |
| 47 | include ldelf/link.mk |