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:
Norman Feske
2013-02-14 12:39:51 +01:00
parent 4c3d49459b
commit fae63f4fa9
328 changed files with 779 additions and 949 deletions

View File

@ -1,6 +1,6 @@
TARGET = core
REQUIRES = linux
LIBS = cxx ipc heap core_printf child lock raw_server syscall raw_signal
LIBS = cxx base-common syscall startup
GEN_CORE_DIR = $(BASE_DIR)/src/core
@ -18,17 +18,17 @@ SRC_CC = main.cc \
io_mem_session_component.cc \
signal_session_component.cc \
signal_source_component.cc \
thread.cc \
thread_linux.cc \
context_area.cc \
debug.cc \
rm_session_mmap.cc
core_printf.cc \
thread.cc
INC_DIR += $(REP_DIR)/src/core/include \
$(GEN_CORE_DIR)/include \
$(REP_DIR)/src/platform \
$(REP_DIR)/src/base/ipc \
$(REP_DIR)/src/base/env
$(REP_DIR)/src/base/env \
$(REP_DIR)/src/base/console
HOST_INC_DIR += /usr/include
@ -43,12 +43,11 @@ LD_SCRIPT_STATIC = $(LD_SCRIPT_DEFAULT) \
endif
vpath main.cc $(GEN_CORE_DIR)
vpath thread.cc $(BASE_DIR)/src/base/thread
vpath ram_session_component.cc $(GEN_CORE_DIR)
vpath cpu_session_component.cc $(GEN_CORE_DIR)
vpath platform_services.cc $(GEN_CORE_DIR)
vpath signal_session_component.cc $(GEN_CORE_DIR)
vpath signal_source_component.cc $(GEN_CORE_DIR)
vpath debug.cc $(REP_DIR)/src/base/env
vpath rm_session_mmap.cc $(REP_DIR)/src/base/env
vpath core_printf.cc $(BASE_DIR)/src/base/console
vpath thread.cc $(BASE_DIR)/src/base/thread
vpath %.cc $(PRG_DIR)

View File

@ -1,6 +1,6 @@
TARGET = test-lx_hybrid_ctors
SRC_CC = main.cc
LIBS = env lx_hybrid
LIBS = lx_hybrid
TESTLIB_SO = libtestlib.so
TESTLIB_SRC_CC = testlib.cc

View File

@ -1,3 +1,3 @@
TARGET = test-lx_hybrid_errno
SRC_CC = main.c
LIBS = env cxx thread lx_hybrid
LIBS = lx_hybrid

View File

@ -1,3 +1,3 @@
TARGET = test-lx_hybrid_exception
SRC_CC = main.cc
LIBS = env lx_hybrid
LIBS = lx_hybrid

View File

@ -1,3 +1,3 @@
TARGET = test-lx_hybrid_pthread_ipc
SRC_CC = main.c
LIBS = env cxx thread lx_hybrid
LIBS = lx_hybrid

View File

@ -1,3 +1,3 @@
TARGET = test-rm_session_mmap
LIBS = cxx env
LIBS = base
SRC_CC = main.cc