1 PKGDIR ?= . 2 L4DIR ?= $(PKGDIR)/../.. 3 4 TARGET = \ 5 dstest_block_client dstest_block_client_simple \ 6 dstest_host_client \ 7 dstest_pipe_client \ 8 dstest_test_client \ 9 dstest_block_server \ 10 dstest_host_server \ 11 dstest_pipe_server \ 12 dstest_test_server 13 14 MODE = static 15 16 # Locations for interface input and generated output. 17 18 IDL_DIR = $(L4DIR)/pkg/libsystypes/idl 19 IDL_MK_DIR = $(L4DIR)/idl4re/mk 20 IDL_BUILD_DIR = . 21 IDL_EXPORT_DIR = . 22 23 include $(IDL_MK_DIR)/idl.mk 24 25 # Compound interfaces. 26 27 mapped_file_object_NAME = MappedFileObject 28 mapped_file_object_INTERFACES = dataspace file mapped_file 29 30 opener_context_object_NAME = OpenerContextObject 31 opener_context_object_INTERFACES = dataspace opener_context 32 33 pipe_object_NAME = PipeObject 34 pipe_object_INTERFACES = dataspace pipe 35 36 COMP_INTERFACES_CC = mapped_file_object opener_context_object pipe_object 37 38 # Individual interfaces. 39 40 CLIENT_INTERFACES_CC = dataspace file mapped_file opener opener_context pipe pipe_opener 41 42 SERVER_INTERFACES_CC = opener pipe_opener $(call common_interfaces,$(COMP_INTERFACES_CC)) 43 44 # Generated and plain source files. 45 46 CLIENT_INTERFACES_SRC_CC = $(call interfaces_to_client_cc,$(CLIENT_INTERFACES_CC)) 47 48 SERVER_INTERFACES_SRC_CC = $(call interfaces_to_server_cc,$(SERVER_INTERFACES_CC) $(COMP_INTERFACES_CC)) 49 50 COMMON_SRC_CC = memory/memory_utils.cc 51 52 PLAIN_SRC_CC_dstest_block_client = tests/dstest_block_client.cc client/file.cc 53 54 PLAIN_SRC_CC_dstest_block_client_simple = tests/dstest_block_client_simple.cc client/client.cc client/file.cc 55 56 PLAIN_SRC_CC_dstest_host_client = tests/dstest_host_client.cc client/file.cc 57 58 PLAIN_SRC_CC_dstest_pipe_client = tests/dstest_pipe_client.cc client/file.cc 59 60 PLAIN_SRC_CC_dstest_test_client = tests/dstest_test_client.cc client/file.cc 61 62 PLAIN_SRC_CC_common_server = \ 63 generic/accessor.cc generic/pager.cc \ 64 generic/resource_server.cc \ 65 mapping/access_map.cc mapping/flexpage.cc mapping/ipc.cc \ 66 memory/memory_incremental.cc mapping/page_mapper.cc \ 67 memory/memory_preallocated.cc memory/region.cc \ 68 pages/page_queue.cc pages/page_queue_partitioned.cc \ 69 pages/page_queue_shared.cc pages/pages.cc 70 71 PLAIN_SRC_CC_common_file_server = \ 72 files/file_pager.cc files/file_paging.cc \ 73 files/opener_resource.cc files/opener_context_resource.cc \ 74 generic/simple_pager.cc 75 76 PLAIN_SRC_CC_dstest_block_server = \ 77 $(PLAIN_SRC_CC_common_server) \ 78 $(PLAIN_SRC_CC_common_file_server) \ 79 files/block_file_accessor.cc files/block_file_opener.cc \ 80 files/host_file_accessor.cc files/host_file_opener.cc \ 81 servers/block_file_server.cc 82 83 PLAIN_SRC_CC_dstest_host_server = \ 84 $(PLAIN_SRC_CC_common_server) \ 85 $(PLAIN_SRC_CC_common_file_server) \ 86 files/host_file_accessor.cc files/host_file_opener.cc \ 87 servers/host_file_server.cc 88 89 PLAIN_SRC_CC_dstest_pipe_server = \ 90 $(PLAIN_SRC_CC_common_server) \ 91 pipes/pipe_opener_resource.cc pipes/pipe_pager.cc \ 92 pipes/pipe_accessor.cc pipes/pipe_paging.cc \ 93 servers/pipe_server.cc 94 95 PLAIN_SRC_CC_dstest_test_server = \ 96 $(PLAIN_SRC_CC_common_server) \ 97 $(PLAIN_SRC_CC_common_file_server) \ 98 files/test_file_accessor.cc files/test_file_opener.cc \ 99 servers/test_file_server.cc 100 101 # Normal definitions. 102 103 SRC_CC_dstest_block_client = \ 104 $(CLIENT_INTERFACES_SRC_CC) \ 105 $(PLAIN_SRC_CC_dstest_block_client) \ 106 $(COMMON_SRC_CC) 107 108 SRC_CC_dstest_block_client_simple = \ 109 $(CLIENT_INTERFACES_SRC_CC) \ 110 $(PLAIN_SRC_CC_dstest_block_client_simple) \ 111 $(COMMON_SRC_CC) 112 113 SRC_CC_dstest_host_client = \ 114 $(CLIENT_INTERFACES_SRC_CC) \ 115 $(PLAIN_SRC_CC_dstest_host_client) \ 116 $(COMMON_SRC_CC) 117 118 SRC_CC_dstest_pipe_client = \ 119 $(CLIENT_INTERFACES_SRC_CC) \ 120 $(PLAIN_SRC_CC_dstest_pipe_client) \ 121 $(COMMON_SRC_CC) 122 123 SRC_CC_dstest_test_client = \ 124 $(CLIENT_INTERFACES_SRC_CC) \ 125 $(PLAIN_SRC_CC_dstest_test_client) \ 126 $(COMMON_SRC_CC) 127 128 SRC_CC_dstest_block_server = \ 129 $(SERVER_INTERFACES_SRC_CC) \ 130 $(PLAIN_SRC_CC_dstest_block_server) \ 131 $(COMMON_SRC_CC) 132 133 SRC_CC_dstest_host_server = \ 134 $(SERVER_INTERFACES_SRC_CC) \ 135 $(PLAIN_SRC_CC_dstest_host_server) \ 136 $(COMMON_SRC_CC) 137 138 SRC_CC_dstest_pipe_server = \ 139 $(SERVER_INTERFACES_SRC_CC) \ 140 $(PLAIN_SRC_CC_dstest_pipe_server) \ 141 $(COMMON_SRC_CC) 142 143 SRC_CC_dstest_test_server = \ 144 $(SERVER_INTERFACES_SRC_CC) \ 145 $(PLAIN_SRC_CC_dstest_test_server) \ 146 $(COMMON_SRC_CC) 147 148 REQUIRES_LIBS = l4re_c-util libipc libstdc++ libsystypes 149 150 PRIVATE_INCDIR = $(PKGDIR) $(PKGDIR)/client \ 151 $(PKGDIR)/files $(PKGDIR)/generic \ 152 $(PKGDIR)/mapping $(PKGDIR)/memory \ 153 $(PKGDIR)/pages $(PKGDIR)/pipes \ 154 $(IDL_BUILD_DIR) $(IDL_EXPORT_DIR) 155 156 include $(L4DIR)/mk/prog.mk 157 include $(IDL_MK_DIR)/interface_rules.mk 158 159 $(PLAIN_SRC_CC_dstest_block_client): $(CLIENT_INTERFACES_SRC_CC) 160 161 $(PLAIN_SRC_CC_dstest_block_client_simple): $(CLIENT_INTERFACES_SRC_CC) 162 163 $(PLAIN_SRC_CC_dstest_host_client): $(CLIENT_INTERFACES_SRC_CC) 164 165 $(PLAIN_SRC_CC_dstest_pipe_client): $(CLIENT_INTERFACES_SRC_CC) 166 167 $(PLAIN_SRC_CC_dstest_test_client): $(CLIENT_INTERFACES_SRC_CC) 168 169 $(PLAIN_SRC_CC_dstest_block_server): $(SERVER_INTERFACES_SRC_CC) 170 171 $(PLAIN_SRC_CC_dstest_host_server): $(SERVER_INTERFACES_SRC_CC) 172 173 $(PLAIN_SRC_CC_dstest_pipe_server): $(SERVER_INTERFACES_SRC_CC) 174 175 $(PLAIN_SRC_CC_dstest_test_server): $(SERVER_INTERFACES_SRC_CC)