1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/libexec/rm/Makefile Fri Jun 17 23:54:54 2022 +0200
1.3 @@ -0,0 +1,52 @@
1.4 +PKGDIR ?= ..
1.5 +L4DIR ?= $(PKGDIR)/../../..
1.6 +
1.7 +TARGET = exec_region_mapper
1.8 +
1.9 +MODE = static
1.10 +
1.11 +# Relocate the binary to avoid conflicting with actual payloads.
1.12 +
1.13 +DEFAULT_RELOC_x86 := 0xb0000000
1.14 +DEFAULT_RELOC_arm := 0xb0000000
1.15 +DEFAULT_RELOC_arm64 := 0xc0000000
1.16 +DEFAULT_RELOC_ppc32 := 0xb0000000
1.17 +DEFAULT_RELOC_amd64 := 0x70000000
1.18 +DEFAULT_RELOC_mips := 0x70000000
1.19 +
1.20 +# Locations for interface input and generated output.
1.21 +
1.22 +IDL_DIR = $(PKGDIR)/../libsystypes/idl
1.23 +IDL_MK_DIR = $(L4DIR)/idl4re/mk
1.24 +IDL_BUILD_DIR = .
1.25 +IDL_EXPORT_DIR = .
1.26 +
1.27 +include $(IDL_MK_DIR)/idl.mk
1.28 +
1.29 +# Compound interfaces.
1.30 +
1.31 +pager_object_NAME = PagerObject
1.32 +pager_object_INTERFACES = region_mapper system_pager
1.33 +
1.34 +COMP_INTERFACES_CC = pager_object
1.35 +
1.36 +# Individual interfaces.
1.37 +
1.38 +SERVER_INTERFACES_CC = $(call common_interfaces,$(COMP_INTERFACES_CC))
1.39 +
1.40 +# Generated and plain source files.
1.41 +
1.42 +SERVER_INTERFACES_SRC_CC = $(call interfaces_to_server_cc,$(SERVER_INTERFACES_CC) $(COMP_INTERFACES_CC))
1.43 +
1.44 +# Normal source files.
1.45 +
1.46 +PLAIN_SRC_CC = region_mapper.cc
1.47 +SRC_CC = $(PLAIN_SRC_CC) $(SERVER_INTERFACES_SRC_CC)
1.48 +
1.49 +REQUIRES_LIBS = libc libstdc++ libexec libipc
1.50 +PRIVATE_INCDIR = $(IDL_BUILD_DIR) $(IDL_EXPORT_DIR)
1.51 +
1.52 +include $(L4DIR)/mk/prog.mk
1.53 +include $(IDL_MK_DIR)/interface_rules.mk
1.54 +
1.55 +$(PLAIN_SRC_CC): $(SERVER_INTERFACES_SRC_CC)