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