paul@94 | 1 | PKGDIR ?= .. |
paul@94 | 2 | L4DIR ?= $(PKGDIR)/../../.. |
paul@94 | 3 | |
paul@94 | 4 | TARGET = libfsserver.so libfsserver.a |
paul@94 | 5 | PC_FILENAME = libfsserver |
paul@94 | 6 | |
paul@94 | 7 | # Locations for interface input and generated output. |
paul@94 | 8 | |
paul@94 | 9 | IDL_DIR = $(L4DIR)/pkg/libsystypes/idl |
paul@94 | 10 | IDL_MK_DIR = $(L4DIR)/idl4re/mk |
paul@94 | 11 | IDL_BUILD_DIR = . |
paul@94 | 12 | IDL_EXPORT_DIR = $(OBJ_BASE)/include/contrib/$(CONTRIB_INCDIR)/fsserver |
paul@94 | 13 | |
paul@94 | 14 | include $(IDL_MK_DIR)/idl.mk |
paul@94 | 15 | |
paul@94 | 16 | # Compound interfaces. |
paul@94 | 17 | |
paul@94 | 18 | mapped_file_object_NAME = MappedFileObject |
paul@141 | 19 | mapped_file_object_INTERFACES = dataspace file flush mapped_file notification |
paul@94 | 20 | |
paul@94 | 21 | opener_context_object_NAME = OpenerContextObject |
paul@94 | 22 | opener_context_object_INTERFACES = dataspace opener_context |
paul@94 | 23 | |
paul@94 | 24 | pipe_object_NAME = PipeObject |
paul@117 | 25 | pipe_object_INTERFACES = dataspace flush notification pipe |
paul@94 | 26 | |
paul@94 | 27 | COMP_INTERFACES_CC = mapped_file_object opener_context_object pipe_object |
paul@94 | 28 | |
paul@94 | 29 | # Individual interfaces. |
paul@94 | 30 | |
paul@124 | 31 | CLIENT_INTERFACES_CC = notifier |
paul@124 | 32 | |
paul@144 | 33 | SERVER_INTERFACES_CC = filesystem opener pipe_opener $(call common_interfaces,$(COMP_INTERFACES_CC)) |
paul@94 | 34 | |
paul@94 | 35 | # Generated and plain source files. |
paul@94 | 36 | |
paul@124 | 37 | CLIENT_INTERFACES_SRC_CC = $(call interfaces_to_client_cc,$(CLIENT_INTERFACES_CC)) |
paul@124 | 38 | |
paul@94 | 39 | SERVER_INTERFACES_SRC_CC = $(call interfaces_to_server_cc,$(SERVER_INTERFACES_CC) $(COMP_INTERFACES_CC)) |
paul@94 | 40 | |
paul@94 | 41 | PLAIN_SRC_CC = \ |
paul@94 | 42 | files/block_file_accessor.cc \ |
paul@94 | 43 | files/block_file_opener.cc \ |
paul@106 | 44 | files/ext2_file_accessor.cc \ |
paul@106 | 45 | files/ext2_file_opener.cc \ |
paul@148 | 46 | files/ext2_file_operations.cc \ |
paul@144 | 47 | files/ext2_filesystem.cc \ |
paul@94 | 48 | files/file_pager.cc \ |
paul@94 | 49 | files/file_paging.cc \ |
paul@144 | 50 | files/filesystem_resource.cc \ |
paul@94 | 51 | files/host_file_accessor.cc \ |
paul@94 | 52 | files/host_file_opener.cc \ |
paul@94 | 53 | files/opener_context_resource.cc \ |
paul@94 | 54 | files/opener_resource.cc \ |
paul@94 | 55 | files/test_file_accessor.cc \ |
paul@94 | 56 | files/test_file_opener.cc \ |
paul@94 | 57 | generic/accessor.cc \ |
paul@133 | 58 | generic/notification.cc \ |
paul@94 | 59 | generic/pager.cc \ |
paul@94 | 60 | generic/resource_server.cc \ |
paul@94 | 61 | generic/simple_pager.cc \ |
paul@94 | 62 | mapping/access_map.cc \ |
paul@94 | 63 | mapping/ipc.cc \ |
paul@94 | 64 | mapping/page_mapper.cc \ |
paul@94 | 65 | pages/page_queue.cc \ |
paul@94 | 66 | pages/page_queue_partitioned.cc \ |
paul@94 | 67 | pages/page_queue_shared.cc \ |
paul@94 | 68 | pages/pages.cc \ |
paul@94 | 69 | pipes/pipe_accessor.cc \ |
paul@94 | 70 | pipes/pipe_opener_resource.cc \ |
paul@94 | 71 | pipes/pipe_pager.cc \ |
paul@94 | 72 | pipes/pipe_paging.cc |
paul@94 | 73 | |
paul@94 | 74 | # Normal definitions. |
paul@94 | 75 | |
paul@94 | 76 | SRC_CC = \ |
paul@124 | 77 | $(CLIENT_INTERFACES_SRC_CC) \ |
paul@94 | 78 | $(SERVER_INTERFACES_SRC_CC) \ |
paul@94 | 79 | $(PLAIN_SRC_CC) |
paul@94 | 80 | |
paul@106 | 81 | REQUIRES_LIBS = \ |
paul@106 | 82 | l4re_c-util libmem libipc libstdc++ libsystypes libfsclient \ |
paul@106 | 83 | libext2fs libext2fs_blockserver libe2access libe2access_blockserver |
paul@94 | 84 | |
paul@94 | 85 | PRIVATE_INCDIR = $(PKGDIR)/include $(PKGDIR)/include/fsserver \ |
paul@94 | 86 | $(IDL_BUILD_DIR) $(IDL_EXPORT_DIR) |
paul@94 | 87 | |
paul@94 | 88 | CONTRIB_INCDIR = libfsserver |
paul@94 | 89 | |
paul@94 | 90 | include $(L4DIR)/mk/lib.mk |
paul@94 | 91 | include $(IDL_MK_DIR)/interface_rules.mk |
paul@94 | 92 | |
paul@124 | 93 | $(PLAIN_SRC_CC): $(CLIENT_INTERFACES_SRC_CC) |
paul@124 | 94 | |
paul@94 | 95 | $(PLAIN_SRC_CC): $(SERVER_INTERFACES_SRC_CC) |