mirror of
https://github.com/genodelabs/genode.git
synced 2025-06-19 23:53:55 +00:00
Merge base libraries into a single library
This patch simplifies the way of how Genode's base libraries are organized. Originally, the base API was implemented in the form of many small libraries such as 'thread', 'env', 'server', etc. Most of them used to consist of only a small number of files. Because those libraries are incorporated in any build, the checking of their inter-dependencies made the build process more verbose than desired. Also, the number of libraries and their roles (core only, non-core only, shared by both core and non-core) were not easy to capture. Hereby, the base libraries have been reduced to the following few libraries: - startup.mk contains the startup code for normal Genode processes. On some platform, core is able to use the library as well. - base-common.mk contains the parts of the base library that are identical by core and non-core processes. - base.mk contains the complete base API implementation for non-core processes Consequently, the 'LIBS' declaration in 'target.mk' files becomes simpler as well. In the most simple case, only the 'base' library must be mentioned. Fixes #18
This commit is contained in:
@ -1,9 +0,0 @@
|
||||
LIBS = cxx lock l4
|
||||
SRC_S = crt0.s
|
||||
SRC_CC = _main.cc
|
||||
INC_DIR += $(REP_DIR)/src/platform
|
||||
INC_DIR += $(BASE_DIR)/src/platform
|
||||
INC_DIR += $(REP_DIR)/include/codezero/dummies
|
||||
|
||||
vpath crt0.s $(BASE_DIR)/src/platform/arm
|
||||
vpath _main.cc $(dir $(call select_from_repositories,src/platform/_main.cc))
|
32
base-codezero/lib/mk/base-common.mk
Normal file
32
base-codezero/lib/mk/base-common.mk
Normal file
@ -0,0 +1,32 @@
|
||||
#
|
||||
# \brief Portions of base library shared by core and non-core processes
|
||||
# \author Norman Feske
|
||||
# \date 2013-02-14
|
||||
#
|
||||
|
||||
LIBS += cxx l4 startup
|
||||
|
||||
SRC_CC += cap_copy.cc
|
||||
SRC_CC += ipc/ipc.cc ipc/pager.cc ipc/ipc_marshal_cap.cc
|
||||
SRC_CC += pager/pager.cc
|
||||
SRC_CC += avl_tree/avl_tree.cc
|
||||
SRC_CC += allocator/slab.cc
|
||||
SRC_CC += allocator/allocator_avl.cc
|
||||
SRC_CC += heap/heap.cc heap/sliced_heap.cc
|
||||
SRC_CC += console/console.cc
|
||||
SRC_CC += child/child.cc
|
||||
SRC_CC += process/process.cc
|
||||
SRC_CC += elf/elf_binary.cc
|
||||
SRC_CC += lock/lock.cc
|
||||
SRC_CC += signal/signal.cc
|
||||
SRC_CC += server/server.cc server/common.cc
|
||||
SRC_CC += thread/thread.cc thread/thread_bootstrap_empty.cc
|
||||
SRC_CC += env/utcb.cc
|
||||
SRC_CC += lock/cmpxchg.cc
|
||||
|
||||
INC_DIR += $(REP_DIR)/src/base/lock
|
||||
INC_DIR += $(REP_DIR)/include/codezero/dummies
|
||||
|
||||
vpath cap_copy.cc $(BASE_DIR)/src/platform
|
||||
vpath %.cc $(BASE_DIR)/src/base
|
||||
vpath %.cc $(REP_DIR)/src/base
|
12
base-codezero/lib/mk/base.mk
Normal file
12
base-codezero/lib/mk/base.mk
Normal file
@ -0,0 +1,12 @@
|
||||
SRC_CC += console/log_console.cc
|
||||
SRC_CC += env/env.cc env/context_area.cc env/reload_parent_cap.cc
|
||||
SRC_CC += thread/thread_start.cc
|
||||
|
||||
INC_DIR += $(BASE_DIR)/src/base/env
|
||||
INC_DIR += $(REP_DIR)/include/codezero/dummies
|
||||
|
||||
LIBS += base-common
|
||||
|
||||
vpath %.cc $(REP_DIR)/src/base
|
||||
vpath %.cc $(BASE_DIR)/src/base
|
||||
|
@ -1,13 +0,0 @@
|
||||
#
|
||||
# Additional symbols we need to keep when using the arm-none-linux-gnueabi
|
||||
# tool chain
|
||||
#
|
||||
KEEP_SYMBOLS += __aeabi_ldivmod __aeabi_uldivmod __dynamic_cast
|
||||
KEEP_SYMBOLS += _ZN10__cxxabiv121__vmi_class_type_infoD0Ev
|
||||
|
||||
#
|
||||
# Override sources of the base repository with our changed version
|
||||
#
|
||||
vpath exception.cc $(REP_DIR)/src/base/cxx
|
||||
|
||||
include $(BASE_DIR)/lib/mk/cxx.mk
|
@ -1,6 +0,0 @@
|
||||
include $(BASE_DIR)/lib/mk/env.mk
|
||||
|
||||
SRC_CC += utcb.cc
|
||||
|
||||
vpath utcb.cc $(REP_DIR)/src/base/env
|
||||
vpath env.cc $(BASE_DIR)/src/base/env
|
@ -1,6 +0,0 @@
|
||||
SRC_CC = ipc.cc pager.cc ipc_marshal_cap.cc
|
||||
INC_DIR += $(REP_DIR)/include/codezero/dummies
|
||||
LIBS = cap_copy
|
||||
|
||||
vpath %.cc $(REP_DIR)/src/base/ipc
|
||||
vpath ipc_marshal_cap.cc $(BASE_DIR)/src/base/ipc
|
@ -1,7 +0,0 @@
|
||||
SRC_CC = lock.cc cmpxchg.cc
|
||||
|
||||
INC_DIR += $(REP_DIR)/include/codezero/dummies
|
||||
INC_DIR += $(REP_DIR)/src/base/lock
|
||||
|
||||
vpath lock.cc $(BASE_DIR)/src/base/lock
|
||||
vpath cmpxchg.cc $(REP_DIR)/src/base/lock
|
@ -1,4 +0,0 @@
|
||||
SRC_CC = pager.cc
|
||||
INC_DIR += $(REP_DIR)/include/codezero/dummies
|
||||
|
||||
vpath pager.cc $(REP_DIR)/src/base/pager
|
@ -1,5 +1,4 @@
|
||||
SRC_CC = core_printf.cc
|
||||
LIBS = cxx console
|
||||
INC_DIR += $(REP_DIR)/src/base/console/pl011
|
||||
INC_DIR += $(REP_DIR)/include/codezero/dummies
|
||||
|
||||
|
5
base-codezero/lib/mk/startup.mk
Normal file
5
base-codezero/lib/mk/startup.mk
Normal file
@ -0,0 +1,5 @@
|
||||
include $(BASE_DIR)/lib/mk/startup.inc
|
||||
|
||||
INC_DIR += $(REP_DIR)/include/codezero/dummies
|
||||
|
||||
vpath crt0.s $(BASE_DIR)/src/platform/arm
|
@ -1,5 +0,0 @@
|
||||
SRC_CC = thread.cc thread_start.cc thread_bootstrap.cc
|
||||
INC_DIR += $(REP_DIR)/include/codezero/dummies
|
||||
|
||||
vpath thread_start.cc $(REP_DIR)/src/base/thread
|
||||
vpath %.cc $(BASE_DIR)/src/base/thread
|
Reference in New Issue
Block a user