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