1 PKGDIR ?= . 2 L4DIR ?= $(PKGDIR)/../.. 3 4 TARGET = \ 5 dstest_block_client dstest_host_client dstest_pipe_client dstest_test_client \ 6 dstest_block_server dstest_host_server dstest_pipe_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 pipe_object_NAME = PipeObject 28 pipe_object_INTERFACES = dataspace pipe 29 30 COMP_INTERFACES_CC = mapped_file_object opener_context_object pipe_object 31 32 # Individual interfaces. 33 34 CLIENT_INTERFACES_CC = dataspace file mapped_file opener opener_context pipe pipe_opener 35 36 SERVER_INTERFACES_CC = opener pipe_opener $(call common_interfaces,$(COMP_INTERFACES_CC)) 37 38 # Generated and plain source files. 39 40 CLIENT_INTERFACES_SRC_CC = $(call interfaces_to_client_cc,$(CLIENT_INTERFACES_CC)) 41 42 SERVER_INTERFACES_SRC_CC = $(call interfaces_to_server_cc,$(SERVER_INTERFACES_CC) $(COMP_INTERFACES_CC)) 43 44 COMMON_SRC_CC = memory_utils.cc 45 46 PLAIN_SRC_CC_dstest_block_client = dstest_block_client.cc file.cc 47 48 PLAIN_SRC_CC_dstest_host_client = dstest_host_client.cc file.cc 49 50 PLAIN_SRC_CC_dstest_pipe_client = dstest_pipe_client.cc file.cc 51 52 PLAIN_SRC_CC_dstest_test_client = dstest_test_client.cc file.cc 53 54 PLAIN_SRC_CC_common_server = \ 55 access_map.cc accessing.cc accessor.cc \ 56 flexpage.cc ipc.cc \ 57 memory/memory_incremental.cc memory/memory_preallocated.cc \ 58 page_mapper.cc pager.cc paging.cc \ 59 pages/page_queue.cc pages/page_queue_partitioned.cc pages/page_queue_shared.cc \ 60 pages/pages.cc \ 61 region.cc resource_server.cc simple_pager.cc 62 63 PLAIN_SRC_CC_dstest_block_server = \ 64 $(PLAIN_SRC_CC_common_server) \ 65 dstest_block_server.cc \ 66 files/file_pager.cc \ 67 files/opener_resource.cc files/opener_context_resource.cc \ 68 files/block_file_accessor.cc files/block_file_opener.cc \ 69 files/host_file_accessor.cc files/host_file_opener.cc 70 71 PLAIN_SRC_CC_dstest_host_server = \ 72 $(PLAIN_SRC_CC_common_server) \ 73 dstest_host_server.cc \ 74 files/file_pager.cc \ 75 files/opener_resource.cc files/opener_context_resource.cc \ 76 files/host_file_accessor.cc files/host_file_opener.cc 77 78 PLAIN_SRC_CC_dstest_pipe_server = \ 79 $(PLAIN_SRC_CC_common_server) \ 80 dstest_pipe_server.cc \ 81 pipes/pipe_opener_resource.cc pipes/pipe_pager.cc \ 82 pipes/pipe_accessor.cc pipes/pipe_paging.cc 83 84 PLAIN_SRC_CC_dstest_test_server = \ 85 $(PLAIN_SRC_CC_common_server) \ 86 dstest_test_server.cc \ 87 files/file_pager.cc \ 88 files/opener_resource.cc files/opener_context_resource.cc \ 89 files/test_file_accessor.cc files/test_file_opener.cc 90 91 # Normal definitions. 92 93 SRC_CC_dstest_block_client = \ 94 $(CLIENT_INTERFACES_SRC_CC) \ 95 $(PLAIN_SRC_CC_dstest_block_client) \ 96 $(COMMON_SRC_CC) 97 98 SRC_CC_dstest_host_client = \ 99 $(CLIENT_INTERFACES_SRC_CC) \ 100 $(PLAIN_SRC_CC_dstest_host_client) \ 101 $(COMMON_SRC_CC) 102 103 SRC_CC_dstest_pipe_client = \ 104 $(CLIENT_INTERFACES_SRC_CC) \ 105 $(PLAIN_SRC_CC_dstest_pipe_client) \ 106 $(COMMON_SRC_CC) 107 108 SRC_CC_dstest_test_client = \ 109 $(CLIENT_INTERFACES_SRC_CC) \ 110 $(PLAIN_SRC_CC_dstest_test_client) \ 111 $(COMMON_SRC_CC) 112 113 SRC_CC_dstest_block_server = \ 114 $(SERVER_INTERFACES_SRC_CC) \ 115 $(PLAIN_SRC_CC_dstest_block_server) \ 116 $(COMMON_SRC_CC) 117 118 SRC_CC_dstest_host_server = \ 119 $(SERVER_INTERFACES_SRC_CC) \ 120 $(PLAIN_SRC_CC_dstest_host_server) \ 121 $(COMMON_SRC_CC) 122 123 SRC_CC_dstest_pipe_server = \ 124 $(SERVER_INTERFACES_SRC_CC) \ 125 $(PLAIN_SRC_CC_dstest_pipe_server) \ 126 $(COMMON_SRC_CC) 127 128 SRC_CC_dstest_test_server = \ 129 $(SERVER_INTERFACES_SRC_CC) \ 130 $(PLAIN_SRC_CC_dstest_test_server) \ 131 $(COMMON_SRC_CC) 132 133 REQUIRES_LIBS = l4re_c-util libipc libstdc++ libsystypes 134 135 PRIVATE_INCDIR = $(PKGDIR) \ 136 $(PKGDIR)/files $(PKGDIR)/memory \ 137 $(PKGDIR)/pages $(PKGDIR)/pipes \ 138 $(IDL_BUILD_DIR) $(IDL_EXPORT_DIR) 139 140 include $(L4DIR)/mk/prog.mk 141 include $(IDL_MK_DIR)/interface_rules.mk 142 143 $(PLAIN_SRC_CC_dstest_block_client): $(CLIENT_INTERFACES_SRC_CC) 144 145 $(PLAIN_SRC_CC_dstest_host_client): $(CLIENT_INTERFACES_SRC_CC) 146 147 $(PLAIN_SRC_CC_dstest_pipe_client): $(CLIENT_INTERFACES_SRC_CC) 148 149 $(PLAIN_SRC_CC_dstest_test_client): $(CLIENT_INTERFACES_SRC_CC) 150 151 $(PLAIN_SRC_CC_dstest_block_server): $(SERVER_INTERFACES_SRC_CC) 152 153 $(PLAIN_SRC_CC_dstest_host_server): $(SERVER_INTERFACES_SRC_CC) 154 155 $(PLAIN_SRC_CC_dstest_pipe_server): $(SERVER_INTERFACES_SRC_CC) 156 157 $(PLAIN_SRC_CC_dstest_test_server): $(SERVER_INTERFACES_SRC_CC)