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/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 accessor.cc \ 56 flexpage.cc ipc.cc \ 57 memory/memory_incremental.cc memory/memory_preallocated.cc \ 58 memory/region.cc \ 59 page_mapper.cc pager.cc paging.cc \ 60 pages/page_queue.cc pages/page_queue_partitioned.cc \ 61 pages/page_queue_shared.cc pages/pages.cc \ 62 resource_server.cc simple_pager.cc 63 64 PLAIN_SRC_CC_dstest_block_server = \ 65 $(PLAIN_SRC_CC_common_server) \ 66 dstest_block_server.cc \ 67 files/file_pager.cc \ 68 files/opener_resource.cc files/opener_context_resource.cc \ 69 files/block_file_accessor.cc files/block_file_opener.cc \ 70 files/host_file_accessor.cc files/host_file_opener.cc 71 72 PLAIN_SRC_CC_dstest_host_server = \ 73 $(PLAIN_SRC_CC_common_server) \ 74 dstest_host_server.cc \ 75 files/file_pager.cc \ 76 files/opener_resource.cc files/opener_context_resource.cc \ 77 files/host_file_accessor.cc files/host_file_opener.cc 78 79 PLAIN_SRC_CC_dstest_pipe_server = \ 80 $(PLAIN_SRC_CC_common_server) \ 81 dstest_pipe_server.cc \ 82 pipes/pipe_opener_resource.cc pipes/pipe_pager.cc \ 83 pipes/pipe_accessor.cc pipes/pipe_paging.cc 84 85 PLAIN_SRC_CC_dstest_test_server = \ 86 $(PLAIN_SRC_CC_common_server) \ 87 dstest_test_server.cc \ 88 files/file_pager.cc \ 89 files/opener_resource.cc files/opener_context_resource.cc \ 90 files/test_file_accessor.cc files/test_file_opener.cc 91 92 # Normal definitions. 93 94 SRC_CC_dstest_block_client = \ 95 $(CLIENT_INTERFACES_SRC_CC) \ 96 $(PLAIN_SRC_CC_dstest_block_client) \ 97 $(COMMON_SRC_CC) 98 99 SRC_CC_dstest_host_client = \ 100 $(CLIENT_INTERFACES_SRC_CC) \ 101 $(PLAIN_SRC_CC_dstest_host_client) \ 102 $(COMMON_SRC_CC) 103 104 SRC_CC_dstest_pipe_client = \ 105 $(CLIENT_INTERFACES_SRC_CC) \ 106 $(PLAIN_SRC_CC_dstest_pipe_client) \ 107 $(COMMON_SRC_CC) 108 109 SRC_CC_dstest_test_client = \ 110 $(CLIENT_INTERFACES_SRC_CC) \ 111 $(PLAIN_SRC_CC_dstest_test_client) \ 112 $(COMMON_SRC_CC) 113 114 SRC_CC_dstest_block_server = \ 115 $(SERVER_INTERFACES_SRC_CC) \ 116 $(PLAIN_SRC_CC_dstest_block_server) \ 117 $(COMMON_SRC_CC) 118 119 SRC_CC_dstest_host_server = \ 120 $(SERVER_INTERFACES_SRC_CC) \ 121 $(PLAIN_SRC_CC_dstest_host_server) \ 122 $(COMMON_SRC_CC) 123 124 SRC_CC_dstest_pipe_server = \ 125 $(SERVER_INTERFACES_SRC_CC) \ 126 $(PLAIN_SRC_CC_dstest_pipe_server) \ 127 $(COMMON_SRC_CC) 128 129 SRC_CC_dstest_test_server = \ 130 $(SERVER_INTERFACES_SRC_CC) \ 131 $(PLAIN_SRC_CC_dstest_test_server) \ 132 $(COMMON_SRC_CC) 133 134 REQUIRES_LIBS = l4re_c-util libipc libstdc++ libsystypes 135 136 PRIVATE_INCDIR = $(PKGDIR) \ 137 $(PKGDIR)/files $(PKGDIR)/memory \ 138 $(PKGDIR)/pages $(PKGDIR)/pipes \ 139 $(IDL_BUILD_DIR) $(IDL_EXPORT_DIR) 140 141 include $(L4DIR)/mk/prog.mk 142 include $(IDL_MK_DIR)/interface_rules.mk 143 144 $(PLAIN_SRC_CC_dstest_block_client): $(CLIENT_INTERFACES_SRC_CC) 145 146 $(PLAIN_SRC_CC_dstest_host_client): $(CLIENT_INTERFACES_SRC_CC) 147 148 $(PLAIN_SRC_CC_dstest_pipe_client): $(CLIENT_INTERFACES_SRC_CC) 149 150 $(PLAIN_SRC_CC_dstest_test_client): $(CLIENT_INTERFACES_SRC_CC) 151 152 $(PLAIN_SRC_CC_dstest_block_server): $(SERVER_INTERFACES_SRC_CC) 153 154 $(PLAIN_SRC_CC_dstest_host_server): $(SERVER_INTERFACES_SRC_CC) 155 156 $(PLAIN_SRC_CC_dstest_pipe_server): $(SERVER_INTERFACES_SRC_CC) 157 158 $(PLAIN_SRC_CC_dstest_test_server): $(SERVER_INTERFACES_SRC_CC)