1 PKGDIR ?= . 2 L4DIR ?= $(PKGDIR)/../.. 3 4 TARGET = \ 5 dstest_block_client dstest_host_client dstest_test_client \ 6 dstest_block_server dstest_host_server dstest_test_server 7 8 MODE = static 9 10 # Locations for interface input and generated output. 11 12 IDL_DIR = $(L4DIR)/pkg/libsystypes/idl 13 IDL_MK_DIR = $(L4DIR)/idl4re/mk 14 IDL_BUILD_DIR = . 15 IDL_EXPORT_DIR = . 16 17 include $(IDL_MK_DIR)/idl.mk 18 19 # Compound interfaces. 20 21 mapped_file_object_NAME = MappedFileObject 22 mapped_file_object_INTERFACES = dataspace file mapped_file 23 24 opener_context_object_NAME = OpenerContextObject 25 opener_context_object_INTERFACES = dataspace opener_context 26 27 COMP_INTERFACES_CC = mapped_file_object opener_context_object 28 29 # Individual interfaces. 30 31 CLIENT_INTERFACES_CC = dataspace file mapped_file opener opener_context 32 33 SERVER_INTERFACES_CC = opener $(call common_interfaces,$(COMP_INTERFACES_CC)) 34 35 # Generated and plain source files. 36 37 CLIENT_INTERFACES_SRC_CC = $(call interfaces_to_client_cc,$(CLIENT_INTERFACES_CC)) 38 39 SERVER_INTERFACES_SRC_CC = $(call interfaces_to_server_cc,$(SERVER_INTERFACES_CC) $(COMP_INTERFACES_CC)) 40 41 COMMON_SRC_CC = memory_utils.cc 42 43 PLAIN_SRC_CC_dstest_block_client = dstest_block_client.cc file.cc 44 45 PLAIN_SRC_CC_dstest_host_client = dstest_host_client.cc file.cc 46 47 PLAIN_SRC_CC_dstest_test_client = dstest_test_client.cc file.cc 48 49 PLAIN_SRC_CC_common_server = \ 50 access_map.cc accessing.cc accessor.cc \ 51 flexpage.cc file_pager.cc ipc.cc \ 52 memory_incremental.cc memory_preallocated.cc \ 53 opener_resource.cc opener_context_resource.cc \ 54 page_mapper.cc page_queue.cc pager.cc pages.cc paging.cc \ 55 region.cc resource_server.cc simple_pager.cc 56 57 PLAIN_SRC_CC_dstest_block_server = \ 58 $(PLAIN_SRC_CC_common_server) \ 59 dstest_block_server.cc \ 60 files/block_file_accessor.cc files/block_file_opener.cc \ 61 files/host_file_accessor.cc files/host_file_opener.cc 62 63 PLAIN_SRC_CC_dstest_host_server = \ 64 $(PLAIN_SRC_CC_common_server) \ 65 dstest_host_server.cc \ 66 files/host_file_accessor.cc files/host_file_opener.cc 67 68 PLAIN_SRC_CC_dstest_test_server = \ 69 $(PLAIN_SRC_CC_common_server) \ 70 dstest_test_server.cc \ 71 files/test_file_accessor.cc files/test_file_opener.cc 72 73 # Normal definitions. 74 75 SRC_CC_dstest_block_client = \ 76 $(CLIENT_INTERFACES_SRC_CC) \ 77 $(PLAIN_SRC_CC_dstest_block_client) \ 78 $(COMMON_SRC_CC) 79 80 SRC_CC_dstest_host_client = \ 81 $(CLIENT_INTERFACES_SRC_CC) \ 82 $(PLAIN_SRC_CC_dstest_host_client) \ 83 $(COMMON_SRC_CC) 84 85 SRC_CC_dstest_test_client = \ 86 $(CLIENT_INTERFACES_SRC_CC) \ 87 $(PLAIN_SRC_CC_dstest_test_client) \ 88 $(COMMON_SRC_CC) 89 90 SRC_CC_dstest_block_server = \ 91 $(SERVER_INTERFACES_SRC_CC) \ 92 $(PLAIN_SRC_CC_dstest_block_server) \ 93 $(COMMON_SRC_CC) 94 95 SRC_CC_dstest_host_server = \ 96 $(SERVER_INTERFACES_SRC_CC) \ 97 $(PLAIN_SRC_CC_dstest_host_server) \ 98 $(COMMON_SRC_CC) 99 100 SRC_CC_dstest_test_server = \ 101 $(SERVER_INTERFACES_SRC_CC) \ 102 $(PLAIN_SRC_CC_dstest_test_server) \ 103 $(COMMON_SRC_CC) 104 105 REQUIRES_LIBS = l4re_c-util libipc libstdc++ libsystypes 106 107 PRIVATE_INCDIR = $(PKGDIR) $(PKGDIR)/files $(IDL_BUILD_DIR) $(IDL_EXPORT_DIR) 108 109 include $(L4DIR)/mk/prog.mk 110 include $(IDL_MK_DIR)/interface_rules.mk 111 112 $(PLAIN_SRC_CC_dstest_block_client): $(CLIENT_INTERFACES_SRC_CC) 113 114 $(PLAIN_SRC_CC_dstest_host_client): $(CLIENT_INTERFACES_SRC_CC) 115 116 $(PLAIN_SRC_CC_dstest_test_client): $(CLIENT_INTERFACES_SRC_CC) 117 118 $(PLAIN_SRC_CC_dstest_block_server): $(SERVER_INTERFACES_SRC_CC) 119 120 $(PLAIN_SRC_CC_dstest_host_server): $(SERVER_INTERFACES_SRC_CC) 121 122 $(PLAIN_SRC_CC_dstest_test_server): $(SERVER_INTERFACES_SRC_CC)