1 PKGDIR ?= .. 2 L4DIR ?= $(PKGDIR)/../../.. 3 4 TARGET = exec_region_mapper 5 6 MODE = static 7 8 # Relocate the binary to avoid conflicting with actual payloads. 9 10 DEFAULT_RELOC_x86 := 0xb0000000 11 DEFAULT_RELOC_arm := 0xb0000000 12 DEFAULT_RELOC_arm64 := 0xc0000000 13 DEFAULT_RELOC_ppc32 := 0xb0000000 14 DEFAULT_RELOC_amd64 := 0x70000000 15 DEFAULT_RELOC_mips := 0x70000000 16 17 # Locations for interface input and generated output. 18 19 IDL_DIR = $(PKGDIR)/../libsystypes/idl 20 IDL_MK_DIR = $(L4DIR)/idl4re/mk 21 IDL_BUILD_DIR = . 22 IDL_EXPORT_DIR = . 23 24 include $(IDL_MK_DIR)/idl.mk 25 26 # Compound interfaces. 27 28 pager_object_NAME = PagerObject 29 pager_object_INTERFACES = region_mapper system_pager 30 31 COMP_INTERFACES_CC = pager_object 32 33 # Individual interfaces. 34 35 SERVER_INTERFACES_CC = $(call common_interfaces,$(COMP_INTERFACES_CC)) 36 37 # Generated and plain source files. 38 39 SERVER_INTERFACES_SRC_CC = $(call interfaces_to_server_cc,$(SERVER_INTERFACES_CC) $(COMP_INTERFACES_CC)) 40 41 # Normal source files. 42 43 PLAIN_SRC_CC = region_mapper.cc 44 SRC_CC = $(PLAIN_SRC_CC) $(SERVER_INTERFACES_SRC_CC) 45 46 REQUIRES_LIBS = libc libstdc++ libexec libipc 47 PRIVATE_INCDIR = $(IDL_BUILD_DIR) $(IDL_EXPORT_DIR) 48 49 include $(L4DIR)/mk/prog.mk 50 include $(IDL_MK_DIR)/interface_rules.mk 51 52 $(PLAIN_SRC_CC): $(SERVER_INTERFACES_SRC_CC)