From fae63f4fa9df237a5fa3d658b870def17e82f265 Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Thu, 14 Feb 2013 12:39:51 +0100 Subject: [PATCH] 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 --- base-codezero/lib/mk/arm/startup.mk | 9 --- base-codezero/lib/mk/base-common.mk | 32 +++++++++ base-codezero/lib/mk/base.mk | 12 ++++ base-codezero/lib/mk/cxx.mk | 13 ---- base-codezero/lib/mk/env.mk | 6 -- base-codezero/lib/mk/ipc.mk | 6 -- base-codezero/lib/mk/lock.mk | 7 -- base-codezero/lib/mk/pager.mk | 4 -- base-codezero/lib/mk/pl011/core_printf.mk | 1 - base-codezero/lib/mk/startup.mk | 5 ++ base-codezero/lib/mk/thread.mk | 5 -- base-codezero/mk/spec-codezero.mk | 5 -- base-codezero/src/core/target.inc | 16 ++--- base-fiasco/lib/mk/arm/platform.mk | 6 ++ base-fiasco/lib/mk/arm/startup.mk | 8 --- base-fiasco/lib/mk/base-common.mk | 29 ++++++++ base-fiasco/lib/mk/base.mk | 16 +++++ base-fiasco/lib/mk/core_printf.mk | 5 -- base-fiasco/lib/mk/ipc.mk | 5 -- base-fiasco/lib/mk/lock.mk | 3 - base-fiasco/lib/mk/pager.mk | 3 - base-fiasco/lib/mk/x86/startup.mk | 8 --- base-fiasco/mk/spec-fiasco.mk | 7 -- base-fiasco/src/core/target.inc | 17 +++-- base-foc/lib/mk/arm/base-common.mk | 3 + base-foc/lib/mk/arm/ipc.mk | 4 -- base-foc/lib/mk/arm/startup.mk | 8 --- .../lib/mk/arm/{syscalls.mk => syscall.mk} | 0 base-foc/lib/mk/base-common.inc | 28 ++++++++ base-foc/lib/mk/base.mk | 17 +++++ base-foc/lib/mk/core_printf.mk | 5 -- base-foc/lib/mk/env.mk | 13 ---- base-foc/lib/mk/ipc.inc | 5 -- base-foc/lib/mk/lock.mk | 5 -- base-foc/lib/mk/pager.mk | 3 - base-foc/lib/mk/raw_server.mk | 4 -- base-foc/lib/mk/server.mk | 3 - base-foc/lib/mk/thread.mk | 3 - .../lib/mk/x86/{syscalls.mk => syscall.mk} | 0 base-foc/lib/mk/x86_32/base-common.mk | 3 + base-foc/lib/mk/x86_32/ipc.mk | 3 - base-foc/lib/mk/x86_32/startup.mk | 8 --- base-foc/lib/mk/x86_64/base-common.mk | 3 + base-foc/lib/mk/x86_64/ipc.mk | 3 - base-foc/lib/mk/x86_64/startup.mk | 8 --- base-foc/mk/spec-foc.mk | 6 -- base-foc/src/core/target.inc | 20 +++--- base-foc/src/core/x86/target.mk | 3 +- base-foc/src/test/cap_integrity/target.mk | 2 +- base-host/lib/mk/base-common.mk | 31 ++++++++ base-host/lib/mk/core_printf.mk | 1 - base-host/lib/mk/cxx.mk | 4 ++ base-host/lib/mk/env.mk | 7 -- base-host/lib/mk/ipc.mk | 5 -- base-host/lib/mk/lock.mk | 4 -- base-host/lib/mk/pager.mk | 3 - .../lib/mk/platform.mk | 0 base-host/lib/mk/printf_stdio.mk | 3 - base-host/src/core/target.inc | 11 ++- base-hw/lib/mk/arm/startup.mk | 22 ------ base-hw/lib/mk/base-common.mk | 26 +++++++ base-hw/lib/mk/base.mk | 16 +++++ base-hw/lib/mk/ipc.mk | 12 ---- base-hw/lib/mk/lock.mk | 15 ---- base-hw/lib/mk/pager.mk | 12 ---- base-hw/lib/mk/raw_ipc.mk | 13 ---- base-hw/lib/mk/raw_signal.mk | 15 ---- base-hw/lib/mk/signal.mk | 9 --- base-hw/lib/mk/syscall.mk | 3 + base-hw/lib/mk/thread.mk | 14 ---- base-hw/mk/spec-hw.mk | 10 --- base-hw/src/core/imx31/target.mk | 4 +- base-hw/src/core/imx53/target.mk | 4 +- base-hw/src/core/panda/target.mk | 4 +- base-hw/src/core/pbxa9/target.mk | 4 +- base-hw/src/core/target.inc | 24 ++----- base-hw/src/core/vea9x4/target.inc | 4 +- base-linux/lib/mk/base-common.mk | 29 ++++++++ base-linux/lib/mk/base.inc | 18 +++++ base-linux/lib/mk/core_printf.mk | 5 -- base-linux/lib/mk/env.mk | 7 -- base-linux/lib/mk/ipc.mk | 6 -- base-linux/lib/mk/lock.mk | 5 -- base-linux/lib/mk/lx_hybrid.mk | 9 ++- base-linux/lib/mk/process.mk | 13 ---- base-linux/lib/mk/thread.mk | 6 -- base-linux/lib/mk/x86_32/base.mk | 8 +++ base-linux/lib/mk/x86_32/startup.mk | 11 ++- base-linux/lib/mk/x86_64/base.mk | 8 +++ base-linux/lib/mk/x86_64/startup.mk | 11 ++- base-linux/mk/spec-linux.mk | 1 - base-linux/src/core/target.mk | 15 ++-- base-linux/src/test/lx_hybrid_ctors/target.mk | 2 +- base-linux/src/test/lx_hybrid_errno/target.mk | 2 +- .../src/test/lx_hybrid_exception/target.mk | 2 +- .../src/test/lx_hybrid_pthread_ipc/target.mk | 2 +- base-linux/src/test/rm_session_mmap/target.mk | 2 +- base-mb/src/test/hello/target.mk | 2 +- base-nova/lib/mk/base-common.inc | 26 +++++++ base-nova/lib/mk/base.mk | 17 +++++ base-nova/lib/mk/cap_copy.mk | 0 base-nova/lib/mk/core_printf.mk | 5 -- base-nova/lib/mk/env.mk | 10 --- base-nova/lib/mk/ipc.mk | 6 -- base-nova/lib/mk/lock.mk | 5 -- base-nova/lib/mk/raw_server.mk | 4 -- base-nova/lib/mk/server.mk | 3 - base-nova/lib/mk/thread.mk | 6 -- base-nova/lib/mk/thread_context.mk | 3 - base-nova/lib/mk/x86_32/base-common.mk | 3 + base-nova/lib/mk/x86_32/pager.mk | 3 - base-nova/lib/mk/x86_32/startup.mk | 8 --- base-nova/lib/mk/x86_64/base-common.mk | 3 + base-nova/lib/mk/x86_64/pager.mk | 3 - base-nova/lib/mk/x86_64/startup.mk | 8 --- base-nova/mk/spec-nova.mk | 6 -- base-nova/src/core/target.inc | 15 ++-- base-nova/src/test/cap_integrity/target.mk | 6 +- base-okl4/lib/mk/base-common.mk | 28 ++++++++ base-okl4/lib/mk/base.mk | 10 +++ .../lib/mk/{bootinfo.mk => boot_info.mk} | 0 base-okl4/lib/mk/core_printf.mk | 5 -- base-okl4/lib/mk/ipc.mk | 5 -- base-okl4/lib/mk/lock.mk | 4 -- base-okl4/lib/mk/pager.mk | 3 - base-okl4/lib/mk/thread.mk | 5 -- base-okl4/lib/mk/x86/startup.mk | 8 --- base-okl4/mk/spec-okl4.mk | 6 -- base-okl4/src/core/target.inc | 71 ++++++++++--------- base-okl4/src/core/x86/target.mk | 2 + base-pistachio/lib/mk/base-common.mk | 29 ++++++++ base-pistachio/lib/mk/base.mk | 16 +++++ base-pistachio/lib/mk/core_printf.mk | 5 -- base-pistachio/lib/mk/ipc.mk | 8 --- base-pistachio/lib/mk/kip.mk | 5 -- base-pistachio/lib/mk/lock.mk | 4 -- base-pistachio/lib/mk/pager.mk | 3 - base-pistachio/lib/mk/x86/startup.mk | 8 --- base-pistachio/mk/spec-pistachio.mk | 6 -- base-pistachio/src/core/target.inc | 14 ++-- base/lib/mk/allocator_avl.mk | 4 -- base/lib/mk/arm/startup.mk | 3 + base/lib/mk/avl_tree.mk | 3 - base/lib/mk/cap_copy.mk | 3 - base/lib/mk/child.mk | 4 -- base/lib/mk/console.mk | 3 - base/lib/mk/cxx.mk | 1 - base/lib/mk/elf.mk | 3 - base/lib/mk/env.mk | 7 -- base/lib/mk/heap.mk | 4 -- base/lib/mk/host/cxx.mk | 3 - base/lib/mk/log_console.mk | 4 -- base/lib/mk/process.mk | 4 -- base/lib/mk/raw_server.mk | 3 - base/lib/mk/raw_signal.mk | 3 - base/lib/mk/server.mk | 3 - base/lib/mk/signal.mk | 3 - base/lib/mk/slab.mk | 3 - base/lib/mk/startup.inc | 6 ++ base/lib/mk/syscall.mk | 6 +- base/lib/mk/thread.mk | 3 - base/lib/mk/x86_32/startup.mk | 3 + base/lib/mk/x86_64/startup.mk | 3 + base/mk/base-libs.mk | 4 +- base/mk/lib.mk | 9 +++ base/mk/prg.mk | 10 ++- ...bootstrap.cc => thread_bootstrap_empty.cc} | 0 base/src/test/ada/target.mk | 2 +- base/src/test/cap_integrity/target.mk | 6 +- base/src/test/ds_ownership/target.mk | 6 +- base/src/test/printf/target.mk | 6 +- base/src/test/rm_fault/target.mk | 2 +- base/src/test/rm_nested/target.mk | 2 +- base/src/test/segfault/target.mk | 2 +- base/src/test/sub_rm/target.mk | 2 +- base/src/test/util_mmio/target.mk | 2 +- dde_ipxe/src/drivers/nic/target.mk | 6 +- dde_linux/src/drivers/usb/target.mk | 2 +- dde_oss/src/drivers/oss/target.mk | 2 +- demo/lib/mk/launchpad.mk | 2 +- demo/lib/mk/scout_widgets.mk | 2 +- demo/src/app/backdrop/target.mk | 2 +- demo/src/lib/libpng/target.mk | 2 +- demo/src/server/liquid_framebuffer/target.mk | 2 +- demo/src/server/nitlog/target.mk | 2 +- gems/src/server/d3m/target.mk | 2 +- gems/src/server/http_block/target.mk | 3 +- gems/src/server/tcp_terminal/target.mk | 2 +- gems/src/server/terminal/target.mk | 2 +- gems/src/test/terminal_decoder/target.mk | 2 +- hello_tutorial/doc/hello_tutorial.txt | 4 +- hello_tutorial/src/hello/client/target.mk | 2 +- hello_tutorial/src/hello/server/target.mk | 2 +- libports/lib/import/import-libc.mk | 11 +++ libports/lib/mk/ffat_block.mk | 2 +- libports/lib/mk/libc.mk | 2 +- libports/lib/mk/lwip.mk | 2 +- libports/src/lib/gallium/i915/target.mk | 2 +- libports/src/server/ffat_fs/target.mk | 2 +- libports/src/test/ldso/target.mk | 2 +- libports/src/test/libc/target.mk | 2 +- libports/src/test/libc_ffat/target.mk | 2 +- libports/src/test/libc_fs/target.mk | 2 +- libports/src/test/libc_fs_tar_fs/target.mk | 2 +- libports/src/test/libc_resolv/target.mk | 2 +- libports/src/test/libports/freetype/target.mk | 2 +- libports/src/test/libports/gmp/target.mk | 2 +- libports/src/test/libports/jbig2dec/target.mk | 2 +- libports/src/test/libports/jpeg/target.mk | 2 +- .../src/test/libports/libcrypto/target.mk | 2 +- libports/src/test/libports/libpng/target.mk | 2 +- libports/src/test/libports/libssl/target.mk | 2 +- libports/src/test/libports/lua/target.mk | 2 +- libports/src/test/libports/luacxx/target.mk | 2 +- libports/src/test/libports/mesa/target.mk | 2 +- libports/src/test/libports/mpfr/target.mk | 2 +- libports/src/test/libports/mupdf/target.mk | 2 +- libports/src/test/libports/ncurses/target.mk | 2 +- libports/src/test/libports/openjpeg/target.mk | 2 +- libports/src/test/libports/readline/target.mk | 2 +- libports/src/test/libports/zlib/target.mk | 2 +- libports/src/test/lwip/http_clnt/target.mk | 2 +- libports/src/test/lwip/http_srv/target.mk | 2 +- .../src/test/lwip/http_srv_static/target.mk | 2 +- .../src/test/lwip/http_srv_tracing/target.mk | 2 +- .../http_srv_tracing_nonblocking/target.mk | 2 +- libports/src/test/lwip/loopback/target.mk | 2 +- libports/src/test/moon/target.mk | 2 +- libports/src/test/python/target.mk | 2 +- libports/src/test/sdl/target.mk | 2 +- os/lib/mk/dde_kit.mk | 2 +- os/lib/mk/timed_semaphore.mk | 2 +- os/lib/mk/timer.inc | 2 +- os/src/app/xvfb/target.mk | 2 +- os/src/drivers/acpi/x86/target.mk | 2 +- os/src/drivers/ahci/target.mk | 2 +- os/src/drivers/atapi/target.mk | 2 +- os/src/drivers/audio_out/linux/target.mk | 2 +- .../drivers/framebuffer/fiasco_ux/target.mk | 2 +- os/src/drivers/framebuffer/omap4/target.mk | 2 +- .../drivers/framebuffer/pl11x/pbxa9/target.mk | 2 +- .../framebuffer/pl11x/vea9x4/target.mk | 2 +- .../framebuffer/pl11x/vpb926/target.mk | 2 +- os/src/drivers/framebuffer/sdl/target.mk | 2 +- os/src/drivers/framebuffer/vesa/target.mk | 2 +- os/src/drivers/gpio/omap4/target.mk | 3 +- os/src/drivers/input/dummy/target.mk | 6 +- os/src/drivers/input/fiasco_ux/target.mk | 8 +-- os/src/drivers/input/ps2/pl050/target.mk | 2 +- os/src/drivers/input/ps2/x86/target.mk | 2 +- os/src/drivers/nic/lan9118/target.mk | 2 +- os/src/drivers/nic/linux/target.mk | 2 +- os/src/drivers/pci/x86/target.mk | 2 +- os/src/drivers/platform/gta01/target.mk | 2 +- os/src/drivers/rtc/x86/target.mk | 2 +- os/src/drivers/sd_card/omap4/bench/target.mk | 2 +- os/src/drivers/sd_card/omap4/target.mk | 2 +- os/src/drivers/sd_card/pl180/target.mk | 2 +- os/src/drivers/uart/i8250/target.mk | 2 +- os/src/drivers/uart/omap4/target.mk | 2 +- os/src/drivers/uart/pl011/target.mk | 2 +- os/src/init/target.mk | 2 +- os/src/lib/ldso/target.inc | 2 +- os/src/server/fs_rom/target.mk | 2 +- os/src/server/iso9660/target.mk | 2 +- os/src/server/loader/target.mk | 2 +- os/src/server/mixer/target.mk | 2 +- os/src/server/nic_bridge/target.mk | 4 +- os/src/server/nic_loopback/target.mk | 2 +- os/src/server/nit_fb/target.mk | 2 +- os/src/server/nitpicker/genode/target.mk | 2 +- os/src/server/part_blk/target.mk | 2 +- os/src/server/ram_fs/target.mk | 2 +- os/src/server/rom_loopdev/target.mk | 2 +- os/src/server/rom_prefetcher/target.mk | 2 +- os/src/server/tar_fs/target.mk | 2 +- os/src/server/tar_rom/target.mk | 2 +- os/src/server/terminal_crosslink/target.mk | 5 +- os/src/server/terminal_log/target.mk | 2 +- os/src/server/vmm/target.mk | 4 +- os/src/test/alarm/target.mk | 2 +- os/src/test/audio_out/target.mk | 2 +- os/src/test/block/target.mk | 2 +- os/src/test/bomb/target.mk | 2 +- os/src/test/chroot_loader/target.mk | 2 +- os/src/test/config_args/target.mk | 2 +- os/src/test/dde_kit/target.mk | 2 +- os/src/test/dynamic_config/loader/target.mk | 2 +- os/src/test/dynamic_config/master/target.mk | 2 +- os/src/test/dynamic_config/server/target.mk | 2 +- os/src/test/dynamic_config/target.mk | 2 +- os/src/test/failsafe/target.mk | 2 +- os/src/test/fb_block_adapter/target.mk | 2 +- os/src/test/framebuffer/target.mk | 15 +--- os/src/test/gpio_drv/target.mk | 2 +- os/src/test/input/target.mk | 2 +- os/src/test/iso/target.mk | 2 +- os/src/test/loader/target.mk | 2 +- os/src/test/nic_loopback/target.mk | 2 +- os/src/test/nitpicker/target.mk | 2 +- os/src/test/packet_stream/target.mk | 2 +- os/src/test/part_blk/target.mk | 2 +- os/src/test/pci/target.mk | 2 +- os/src/test/ram_fs_chunk/target.mk | 2 +- os/src/test/rom_blk/target.mk | 2 +- os/src/test/signal/target.mk | 2 +- os/src/test/terminal_crosslink/target.mk | 2 +- os/src/test/terminal_echo/target.mk | 2 +- os/src/test/thread_join/target.mk | 2 +- os/src/test/timed_semaphore/target.mk | 2 +- os/src/test/timer/target.mk | 2 +- os/src/test/timer_accuracy/target.mk | 2 +- os/src/test/uart/target.mk | 2 +- ports-foc/lib/mk/l4lx.mk | 2 +- ports-foc/mk/l4lx.mk | 19 +---- ports-okl4/lib/mk/oklx.mk | 2 +- ports-okl4/patches/oklx_genode.patch | 4 +- ports/mk/noux.mk | 2 +- ports/src/app/gdb_monitor/target.mk | 4 +- ports/src/app/lighttpd/target.inc | 2 +- ports/src/app/lighttpd/target.mk | 2 +- ports/src/noux-pkg/gcc/target.inc | 2 +- ports/src/noux/minimal/target.mk | 2 +- ports/src/noux/net/target.mk | 4 +- ports/src/test/gdb_monitor/target.mk | 2 +- .../test/gdb_monitor_target_config/target.mk | 2 +- ports/src/vancouver/target.mk | 4 +- qt4/lib/mk/qt_core.mk | 2 +- 328 files changed, 779 insertions(+), 949 deletions(-) delete mode 100644 base-codezero/lib/mk/arm/startup.mk create mode 100644 base-codezero/lib/mk/base-common.mk create mode 100644 base-codezero/lib/mk/base.mk delete mode 100644 base-codezero/lib/mk/cxx.mk delete mode 100644 base-codezero/lib/mk/env.mk delete mode 100644 base-codezero/lib/mk/ipc.mk delete mode 100644 base-codezero/lib/mk/lock.mk delete mode 100644 base-codezero/lib/mk/pager.mk create mode 100644 base-codezero/lib/mk/startup.mk delete mode 100644 base-codezero/lib/mk/thread.mk create mode 100644 base-fiasco/lib/mk/arm/platform.mk delete mode 100644 base-fiasco/lib/mk/arm/startup.mk create mode 100644 base-fiasco/lib/mk/base-common.mk create mode 100644 base-fiasco/lib/mk/base.mk delete mode 100644 base-fiasco/lib/mk/core_printf.mk delete mode 100644 base-fiasco/lib/mk/ipc.mk delete mode 100644 base-fiasco/lib/mk/lock.mk delete mode 100644 base-fiasco/lib/mk/pager.mk delete mode 100644 base-fiasco/lib/mk/x86/startup.mk create mode 100644 base-foc/lib/mk/arm/base-common.mk delete mode 100644 base-foc/lib/mk/arm/ipc.mk delete mode 100644 base-foc/lib/mk/arm/startup.mk rename base-foc/lib/mk/arm/{syscalls.mk => syscall.mk} (100%) create mode 100644 base-foc/lib/mk/base-common.inc create mode 100644 base-foc/lib/mk/base.mk delete mode 100644 base-foc/lib/mk/core_printf.mk delete mode 100644 base-foc/lib/mk/env.mk delete mode 100644 base-foc/lib/mk/ipc.inc delete mode 100644 base-foc/lib/mk/lock.mk delete mode 100644 base-foc/lib/mk/pager.mk delete mode 100644 base-foc/lib/mk/raw_server.mk delete mode 100644 base-foc/lib/mk/server.mk delete mode 100644 base-foc/lib/mk/thread.mk rename base-foc/lib/mk/x86/{syscalls.mk => syscall.mk} (100%) create mode 100644 base-foc/lib/mk/x86_32/base-common.mk delete mode 100644 base-foc/lib/mk/x86_32/ipc.mk delete mode 100644 base-foc/lib/mk/x86_32/startup.mk create mode 100644 base-foc/lib/mk/x86_64/base-common.mk delete mode 100644 base-foc/lib/mk/x86_64/ipc.mk delete mode 100644 base-foc/lib/mk/x86_64/startup.mk create mode 100644 base-host/lib/mk/base-common.mk delete mode 100644 base-host/lib/mk/core_printf.mk create mode 100644 base-host/lib/mk/cxx.mk delete mode 100644 base-host/lib/mk/env.mk delete mode 100644 base-host/lib/mk/ipc.mk delete mode 100644 base-host/lib/mk/lock.mk delete mode 100644 base-host/lib/mk/pager.mk rename base-foc/lib/mk/cap_copy.mk => base-host/lib/mk/platform.mk (100%) delete mode 100644 base-host/lib/mk/printf_stdio.mk delete mode 100755 base-hw/lib/mk/arm/startup.mk create mode 100644 base-hw/lib/mk/base-common.mk create mode 100644 base-hw/lib/mk/base.mk delete mode 100644 base-hw/lib/mk/ipc.mk delete mode 100644 base-hw/lib/mk/lock.mk delete mode 100644 base-hw/lib/mk/pager.mk delete mode 100644 base-hw/lib/mk/raw_ipc.mk delete mode 100644 base-hw/lib/mk/raw_signal.mk delete mode 100644 base-hw/lib/mk/signal.mk create mode 100644 base-hw/lib/mk/syscall.mk delete mode 100644 base-hw/lib/mk/thread.mk delete mode 100644 base-hw/mk/spec-hw.mk create mode 100644 base-linux/lib/mk/base-common.mk create mode 100644 base-linux/lib/mk/base.inc delete mode 100644 base-linux/lib/mk/core_printf.mk delete mode 100644 base-linux/lib/mk/env.mk delete mode 100644 base-linux/lib/mk/ipc.mk delete mode 100644 base-linux/lib/mk/lock.mk delete mode 100644 base-linux/lib/mk/process.mk delete mode 100644 base-linux/lib/mk/thread.mk create mode 100644 base-linux/lib/mk/x86_32/base.mk create mode 100644 base-linux/lib/mk/x86_64/base.mk create mode 100644 base-nova/lib/mk/base-common.inc create mode 100644 base-nova/lib/mk/base.mk delete mode 100644 base-nova/lib/mk/cap_copy.mk delete mode 100644 base-nova/lib/mk/core_printf.mk delete mode 100644 base-nova/lib/mk/env.mk delete mode 100644 base-nova/lib/mk/ipc.mk delete mode 100644 base-nova/lib/mk/lock.mk delete mode 100644 base-nova/lib/mk/raw_server.mk delete mode 100644 base-nova/lib/mk/server.mk delete mode 100644 base-nova/lib/mk/thread.mk delete mode 100644 base-nova/lib/mk/thread_context.mk create mode 100644 base-nova/lib/mk/x86_32/base-common.mk delete mode 100644 base-nova/lib/mk/x86_32/pager.mk delete mode 100644 base-nova/lib/mk/x86_32/startup.mk create mode 100644 base-nova/lib/mk/x86_64/base-common.mk delete mode 100644 base-nova/lib/mk/x86_64/pager.mk delete mode 100644 base-nova/lib/mk/x86_64/startup.mk create mode 100644 base-okl4/lib/mk/base-common.mk create mode 100644 base-okl4/lib/mk/base.mk rename base-okl4/lib/mk/{bootinfo.mk => boot_info.mk} (100%) delete mode 100644 base-okl4/lib/mk/core_printf.mk delete mode 100644 base-okl4/lib/mk/ipc.mk delete mode 100644 base-okl4/lib/mk/lock.mk delete mode 100644 base-okl4/lib/mk/pager.mk delete mode 100644 base-okl4/lib/mk/thread.mk delete mode 100644 base-okl4/lib/mk/x86/startup.mk create mode 100644 base-pistachio/lib/mk/base-common.mk create mode 100644 base-pistachio/lib/mk/base.mk delete mode 100644 base-pistachio/lib/mk/core_printf.mk delete mode 100644 base-pistachio/lib/mk/ipc.mk delete mode 100644 base-pistachio/lib/mk/kip.mk delete mode 100644 base-pistachio/lib/mk/lock.mk delete mode 100644 base-pistachio/lib/mk/pager.mk delete mode 100644 base-pistachio/lib/mk/x86/startup.mk delete mode 100644 base/lib/mk/allocator_avl.mk create mode 100644 base/lib/mk/arm/startup.mk delete mode 100644 base/lib/mk/avl_tree.mk delete mode 100644 base/lib/mk/cap_copy.mk delete mode 100644 base/lib/mk/child.mk delete mode 100644 base/lib/mk/console.mk delete mode 100644 base/lib/mk/elf.mk delete mode 100644 base/lib/mk/env.mk delete mode 100644 base/lib/mk/heap.mk delete mode 100644 base/lib/mk/host/cxx.mk delete mode 100644 base/lib/mk/log_console.mk delete mode 100644 base/lib/mk/process.mk delete mode 100644 base/lib/mk/raw_server.mk delete mode 100644 base/lib/mk/raw_signal.mk delete mode 100644 base/lib/mk/server.mk delete mode 100644 base/lib/mk/signal.mk delete mode 100644 base/lib/mk/slab.mk create mode 100644 base/lib/mk/startup.inc delete mode 100644 base/lib/mk/thread.mk create mode 100644 base/lib/mk/x86_32/startup.mk create mode 100644 base/lib/mk/x86_64/startup.mk rename base/src/base/thread/{thread_bootstrap.cc => thread_bootstrap_empty.cc} (100%) diff --git a/base-codezero/lib/mk/arm/startup.mk b/base-codezero/lib/mk/arm/startup.mk deleted file mode 100644 index 66f13e018e..0000000000 --- a/base-codezero/lib/mk/arm/startup.mk +++ /dev/null @@ -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)) diff --git a/base-codezero/lib/mk/base-common.mk b/base-codezero/lib/mk/base-common.mk new file mode 100644 index 0000000000..e11e97cca3 --- /dev/null +++ b/base-codezero/lib/mk/base-common.mk @@ -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 diff --git a/base-codezero/lib/mk/base.mk b/base-codezero/lib/mk/base.mk new file mode 100644 index 0000000000..a63bf952ed --- /dev/null +++ b/base-codezero/lib/mk/base.mk @@ -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 + diff --git a/base-codezero/lib/mk/cxx.mk b/base-codezero/lib/mk/cxx.mk deleted file mode 100644 index b77ed0d06e..0000000000 --- a/base-codezero/lib/mk/cxx.mk +++ /dev/null @@ -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 diff --git a/base-codezero/lib/mk/env.mk b/base-codezero/lib/mk/env.mk deleted file mode 100644 index f7b38556c0..0000000000 --- a/base-codezero/lib/mk/env.mk +++ /dev/null @@ -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 diff --git a/base-codezero/lib/mk/ipc.mk b/base-codezero/lib/mk/ipc.mk deleted file mode 100644 index 9a85fb2e45..0000000000 --- a/base-codezero/lib/mk/ipc.mk +++ /dev/null @@ -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 diff --git a/base-codezero/lib/mk/lock.mk b/base-codezero/lib/mk/lock.mk deleted file mode 100644 index be1457625c..0000000000 --- a/base-codezero/lib/mk/lock.mk +++ /dev/null @@ -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 diff --git a/base-codezero/lib/mk/pager.mk b/base-codezero/lib/mk/pager.mk deleted file mode 100644 index 24f25bcf87..0000000000 --- a/base-codezero/lib/mk/pager.mk +++ /dev/null @@ -1,4 +0,0 @@ -SRC_CC = pager.cc -INC_DIR += $(REP_DIR)/include/codezero/dummies - -vpath pager.cc $(REP_DIR)/src/base/pager diff --git a/base-codezero/lib/mk/pl011/core_printf.mk b/base-codezero/lib/mk/pl011/core_printf.mk index 7b10977e15..d015711803 100644 --- a/base-codezero/lib/mk/pl011/core_printf.mk +++ b/base-codezero/lib/mk/pl011/core_printf.mk @@ -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 diff --git a/base-codezero/lib/mk/startup.mk b/base-codezero/lib/mk/startup.mk new file mode 100644 index 0000000000..be0cff7277 --- /dev/null +++ b/base-codezero/lib/mk/startup.mk @@ -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 diff --git a/base-codezero/lib/mk/thread.mk b/base-codezero/lib/mk/thread.mk deleted file mode 100644 index a0741ed3b8..0000000000 --- a/base-codezero/lib/mk/thread.mk +++ /dev/null @@ -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 diff --git a/base-codezero/mk/spec-codezero.mk b/base-codezero/mk/spec-codezero.mk index 3ad6ea6164..39ed37f329 100644 --- a/base-codezero/mk/spec-codezero.mk +++ b/base-codezero/mk/spec-codezero.mk @@ -34,11 +34,6 @@ INC_DIR += $(CODEZERO_ABS_DIR)/include INC_DIR += $(CODEZERO_ABS_DIR)/conts/userlibs/libl4/include INC_DIR += $(CODEZERO_ABS_DIR)/conts/userlibs/libdev/uart/include -# -# Codezero-specific startup code -# -PRG_LIBS += startup - # # Allow programs to test for the Codezero kernel # diff --git a/base-codezero/src/core/target.inc b/base-codezero/src/core/target.inc index 17ca0139f0..e39d4f4e47 100644 --- a/base-codezero/src/core/target.inc +++ b/base-codezero/src/core/target.inc @@ -1,10 +1,8 @@ TARGET = core -LIBS = cxx ipc heap core_printf child pager lock \ - raw_signal raw_server GEN_CORE_DIR = $(BASE_DIR)/src/core -SRC_CC = \ +SRC_CC += \ main.cc \ ram_session_component.cc \ ram_session_support.cc \ @@ -14,9 +12,7 @@ SRC_CC = \ pd_session_component.cc \ io_mem_session_component.cc \ io_mem_session_support.cc \ - thread.cc \ thread_start.cc \ - thread_bootstrap.cc \ platform_thread.cc \ platform_pd.cc \ platform_services.cc \ @@ -30,10 +26,11 @@ SRC_CC = \ core_rm_session.cc \ core_mem_alloc.cc \ dump_alloc.cc \ - context_area.cc \ - utcb.cc + context_area.cc -INC_DIR = $(REP_DIR)/src/core/include \ +LIBS += core_printf base-common + +INC_DIR += $(REP_DIR)/src/core/include \ $(GEN_CORE_DIR)/include \ $(REP_DIR)/include/codezero/dummies @@ -53,6 +50,3 @@ vpath core_mem_alloc.cc $(GEN_CORE_DIR) vpath dump_alloc.cc $(GEN_CORE_DIR) vpath context_area.cc $(GEN_CORE_DIR) vpath %.cc $(REP_DIR)/src/core -vpath thread_bootstrap.cc $(BASE_DIR)/src/base/thread -vpath thread.cc $(BASE_DIR)/src/base/thread -vpath utcb.cc $(REP_DIR)/src/base/env diff --git a/base-fiasco/lib/mk/arm/platform.mk b/base-fiasco/lib/mk/arm/platform.mk new file mode 100644 index 0000000000..e53cdd8d18 --- /dev/null +++ b/base-fiasco/lib/mk/arm/platform.mk @@ -0,0 +1,6 @@ +# +# Configuration for L4 build system (for kernel-bindings, sigma0, bootstrap). +# +L4_CONFIG = $(REP_DIR)/config/l4env-config.x86 + +include $(REP_DIR)/lib/mk/platform.inc diff --git a/base-fiasco/lib/mk/arm/startup.mk b/base-fiasco/lib/mk/arm/startup.mk deleted file mode 100644 index 9dda379a2a..0000000000 --- a/base-fiasco/lib/mk/arm/startup.mk +++ /dev/null @@ -1,8 +0,0 @@ -REQUIRES = fiasco arm -LIBS = cxx lock -SRC_S = crt0.s -SRC_CC = _main.cc -INC_DIR += $(REP_DIR)/src/platform - -vpath crt0.s $(REP_DIR)/src/platform/arm -vpath _main.cc $(dir $(call select_from_repositories,src/platform/_main.cc)) diff --git a/base-fiasco/lib/mk/base-common.mk b/base-fiasco/lib/mk/base-common.mk new file mode 100644 index 0000000000..f38c976010 --- /dev/null +++ b/base-fiasco/lib/mk/base-common.mk @@ -0,0 +1,29 @@ +# +# \brief Portions of base library shared by core and non-core processes +# \author Norman Feske +# \date 2013-02-14 +# + +LIBS += cxx 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 + +INC_DIR += $(REP_DIR)/src/base/lock + +vpath cap_copy.cc $(BASE_DIR)/src/platform +vpath %.cc $(REP_DIR)/src/base +vpath %.cc $(BASE_DIR)/src/base diff --git a/base-fiasco/lib/mk/base.mk b/base-fiasco/lib/mk/base.mk new file mode 100644 index 0000000000..2a22622393 --- /dev/null +++ b/base-fiasco/lib/mk/base.mk @@ -0,0 +1,16 @@ +# +# \brief Portions of base library that are exclusive to non-core processes +# \author Norman Feske +# \date 2013-02-14 +# + +LIBS += base-common + +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 + +vpath %.cc $(REP_DIR)/src/base +vpath %.cc $(BASE_DIR)/src/base diff --git a/base-fiasco/lib/mk/core_printf.mk b/base-fiasco/lib/mk/core_printf.mk deleted file mode 100644 index 663cf64b90..0000000000 --- a/base-fiasco/lib/mk/core_printf.mk +++ /dev/null @@ -1,5 +0,0 @@ -SRC_CC = core_printf.cc -LIBS = cxx console -INC_DIR += $(REP_DIR)/src/base/console - -vpath core_printf.cc $(BASE_DIR)/src/base/console diff --git a/base-fiasco/lib/mk/ipc.mk b/base-fiasco/lib/mk/ipc.mk deleted file mode 100644 index 282f5ab24c..0000000000 --- a/base-fiasco/lib/mk/ipc.mk +++ /dev/null @@ -1,5 +0,0 @@ -SRC_CC = ipc.cc pager.cc ipc_marshal_cap.cc -LIBS = cap_copy - -vpath %.cc $(REP_DIR)/src/base/ipc -vpath ipc_marshal_cap.cc $(BASE_DIR)/src/base/ipc diff --git a/base-fiasco/lib/mk/lock.mk b/base-fiasco/lib/mk/lock.mk deleted file mode 100644 index 75eddeef14..0000000000 --- a/base-fiasco/lib/mk/lock.mk +++ /dev/null @@ -1,3 +0,0 @@ -SRC_CC = lock.cc - -vpath lock.cc $(REP_DIR)/src/base/lock diff --git a/base-fiasco/lib/mk/pager.mk b/base-fiasco/lib/mk/pager.mk deleted file mode 100644 index c22e66d224..0000000000 --- a/base-fiasco/lib/mk/pager.mk +++ /dev/null @@ -1,3 +0,0 @@ -SRC_CC = pager.cc - -vpath pager.cc $(REP_DIR)/src/base/pager diff --git a/base-fiasco/lib/mk/x86/startup.mk b/base-fiasco/lib/mk/x86/startup.mk deleted file mode 100644 index a3b2d14bde..0000000000 --- a/base-fiasco/lib/mk/x86/startup.mk +++ /dev/null @@ -1,8 +0,0 @@ -REQUIRES = fiasco x86 -LIBS = cxx lock -SRC_S = crt0.s -SRC_CC = _main.cc -INC_DIR += $(BASE_DIR)/src/platform $(REP_DIR)/src/platform - -vpath crt0.s $(dir $(call select_from_repositories,src/platform/x86_32/crt0.s)) -vpath _main.cc $(dir $(call select_from_repositories,src/platform/_main.cc)) diff --git a/base-fiasco/mk/spec-fiasco.mk b/base-fiasco/mk/spec-fiasco.mk index 3b9253af32..6d76b306bd 100644 --- a/base-fiasco/mk/spec-fiasco.mk +++ b/base-fiasco/mk/spec-fiasco.mk @@ -13,19 +13,12 @@ L4_BUILD_DIR ?= $(BUILD_BASE_DIR)/l4 L4_SRC_DIR ?= $(REP_DIR)/contrib/fiasco/snapshot - # # L4/sys headers # L4_INC_DIR += $(L4_BUILD_DIR)/include \ $(L4_BUILD_DIR)/include/l4v2 -# -# Startup code to be used when building a program -# -STARTUP_LIB ?= startup -PRG_LIBS += $(STARTUP_LIB) - clean_contrib: $(VERBOSE)rm -rf $(BUILD_BASE_DIR)/l4 diff --git a/base-fiasco/src/core/target.inc b/base-fiasco/src/core/target.inc index f017a80174..789c72401c 100644 --- a/base-fiasco/src/core/target.inc +++ b/base-fiasco/src/core/target.inc @@ -1,10 +1,8 @@ TARGET = core -REQUIRES = fiasco -LIBS = cxx ipc heap core_printf child pager lock raw_signal raw_server GEN_CORE_DIR = $(BASE_DIR)/src/core -SRC_CC = main.cc \ +SRC_CC += main.cc \ multiboot_info.cc \ ram_session_component.cc \ ram_session_support.cc \ @@ -14,9 +12,7 @@ SRC_CC = main.cc \ pd_session_component.cc \ io_mem_session_component.cc \ io_mem_session_support.cc \ - thread.cc \ thread_start.cc \ - thread_bootstrap.cc \ platform_thread.cc \ platform_pd.cc \ platform_services.cc \ @@ -29,10 +25,14 @@ SRC_CC = main.cc \ signal_session_component.cc \ signal_source_component.cc \ dump_alloc.cc \ - context_area.cc + context_area.cc \ + core_printf.cc INC_DIR += $(REP_DIR)/src/core/include \ - $(GEN_CORE_DIR)/include + $(GEN_CORE_DIR)/include \ + $(REP_DIR)/src/base/console + +LIBS += base-common vpath main.cc $(GEN_CORE_DIR) vpath multiboot_info.cc $(GEN_CORE_DIR) @@ -48,6 +48,5 @@ vpath signal_source_component.cc $(GEN_CORE_DIR) vpath dataspace_component.cc $(GEN_CORE_DIR) vpath dump_alloc.cc $(GEN_CORE_DIR) vpath context_area.cc $(GEN_CORE_DIR) -vpath thread_bootstrap.cc $(BASE_DIR)/src/base/thread -vpath thread.cc $(BASE_DIR)/src/base/thread +vpath core_printf.cc $(BASE_DIR)/src/base/console vpath %.cc $(REP_DIR)/src/core diff --git a/base-foc/lib/mk/arm/base-common.mk b/base-foc/lib/mk/arm/base-common.mk new file mode 100644 index 0000000000..05e75393ed --- /dev/null +++ b/base-foc/lib/mk/arm/base-common.mk @@ -0,0 +1,3 @@ +include $(REP_DIR)/lib/mk/base-common.inc + +SRC_CC += ipc/arm/pager.cc ipc/arm/pager_exception.cc diff --git a/base-foc/lib/mk/arm/ipc.mk b/base-foc/lib/mk/arm/ipc.mk deleted file mode 100644 index 33f3e6cfd2..0000000000 --- a/base-foc/lib/mk/arm/ipc.mk +++ /dev/null @@ -1,4 +0,0 @@ -SRC_CC = arm/pager_exception.cc arm/pager.cc - -include $(REP_DIR)/lib/mk/ipc.inc - diff --git a/base-foc/lib/mk/arm/startup.mk b/base-foc/lib/mk/arm/startup.mk deleted file mode 100644 index 14b52c669d..0000000000 --- a/base-foc/lib/mk/arm/startup.mk +++ /dev/null @@ -1,8 +0,0 @@ -SRC_S = crt0.s -SRC_CC = _main.cc -LIBS += cxx lock - -INC_DIR += $(REP_DIR)/src/platform $(BASE_DIR)/src/platform - -vpath crt0.s $(BASE_DIR)/src/platform/arm -vpath _main.cc $(BASE_DIR)/src/platform diff --git a/base-foc/lib/mk/arm/syscalls.mk b/base-foc/lib/mk/arm/syscall.mk similarity index 100% rename from base-foc/lib/mk/arm/syscalls.mk rename to base-foc/lib/mk/arm/syscall.mk diff --git a/base-foc/lib/mk/base-common.inc b/base-foc/lib/mk/base-common.inc new file mode 100644 index 0000000000..071cb70092 --- /dev/null +++ b/base-foc/lib/mk/base-common.inc @@ -0,0 +1,28 @@ +# +# \brief Portions of base library shared by core and non-core processes +# \author Norman Feske +# \date 2013-02-14 +# + +LIBS += cxx syscall startup + +SRC_CC += ipc/ipc.cc ipc/pager.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 += env/spin_lock.cc env/cap_map.cc +SRC_CC += signal/signal.cc +SRC_CC += server/server.cc server/common.cc +SRC_CC += thread/thread.cc thread/thread_bootstrap.cc + +INC_DIR += $(REP_DIR)/src/base/lock $(BASE_DIR)/src/base/lock + +vpath %.cc $(REP_DIR)/src/base +vpath %.cc $(BASE_DIR)/src/base diff --git a/base-foc/lib/mk/base.mk b/base-foc/lib/mk/base.mk new file mode 100644 index 0000000000..8f0a09bb41 --- /dev/null +++ b/base-foc/lib/mk/base.mk @@ -0,0 +1,17 @@ +# +# \brief Portions of base library that are exclusive to non-core processes +# \author Norman Feske +# \date 2013-02-14 +# + +LIBS += base-common + +SRC_CC += console/log_console.cc +SRC_CC += env/env.cc env/context_area.cc env/reload_parent_cap.cc \ + env/cap_map_remove.cc env/cap_alloc.cc +SRC_CC += thread/thread_start.cc + +INC_DIR += $(BASE_DIR)/src/base/env + +vpath %.cc $(REP_DIR)/src/base +vpath %.cc $(BASE_DIR)/src/base diff --git a/base-foc/lib/mk/core_printf.mk b/base-foc/lib/mk/core_printf.mk deleted file mode 100644 index 663cf64b90..0000000000 --- a/base-foc/lib/mk/core_printf.mk +++ /dev/null @@ -1,5 +0,0 @@ -SRC_CC = core_printf.cc -LIBS = cxx console -INC_DIR += $(REP_DIR)/src/base/console - -vpath core_printf.cc $(BASE_DIR)/src/base/console diff --git a/base-foc/lib/mk/env.mk b/base-foc/lib/mk/env.mk deleted file mode 100644 index 09b9d721d2..0000000000 --- a/base-foc/lib/mk/env.mk +++ /dev/null @@ -1,13 +0,0 @@ -SRC_CC = env.cc context_area.cc cap_map.cc cap_alloc.cc \ - reload_parent_cap.cc spin_lock.cc cap_map_remove.cc -LIBS = ipc heap log_console lock -INC_DIR += $(REP_DIR)/src/base/lock $(BASE_DIR)/src/base/lock -INC_DIR += $(BASE_DIR)/src/base/env - -vpath env.cc $(BASE_DIR)/src/base/env -vpath context_area.cc $(BASE_DIR)/src/base/env -vpath cap_map.cc $(REP_DIR)/src/base/env -vpath cap_map_remove.cc $(REP_DIR)/src/base/env -vpath cap_alloc.cc $(REP_DIR)/src/base/env -vpath spin_lock.cc $(REP_DIR)/src/base/env -vpath reload_parent_cap.cc $(BASE_DIR)/src/base/env diff --git a/base-foc/lib/mk/ipc.inc b/base-foc/lib/mk/ipc.inc deleted file mode 100644 index 9a9abfc516..0000000000 --- a/base-foc/lib/mk/ipc.inc +++ /dev/null @@ -1,5 +0,0 @@ -LIBS = syscalls -SRC_CC += ipc.cc pager.cc -INC_DIR += $(REP_DIR)/src/base/lock - -vpath %.cc $(REP_DIR)/src/base/ipc diff --git a/base-foc/lib/mk/lock.mk b/base-foc/lib/mk/lock.mk deleted file mode 100644 index 83ab108db4..0000000000 --- a/base-foc/lib/mk/lock.mk +++ /dev/null @@ -1,5 +0,0 @@ -SRC_CC = lock.cc -INC_DIR += $(REP_DIR)/src/base/lock -#INC_DIR += $(REP_DIR)/src/platform - -vpath lock.cc $(BASE_DIR)/src/base/lock diff --git a/base-foc/lib/mk/pager.mk b/base-foc/lib/mk/pager.mk deleted file mode 100644 index eb4f42e1ec..0000000000 --- a/base-foc/lib/mk/pager.mk +++ /dev/null @@ -1,3 +0,0 @@ -SRC_CC = pager.cc - -vpath pager.cc $(REP_DIR)/src/base/pager diff --git a/base-foc/lib/mk/raw_server.mk b/base-foc/lib/mk/raw_server.mk deleted file mode 100644 index 3487331b90..0000000000 --- a/base-foc/lib/mk/raw_server.mk +++ /dev/null @@ -1,4 +0,0 @@ -SRC_CC = server.cc common.cc - -vpath server.cc $(REP_DIR)/src/base/server -vpath common.cc $(BASE_DIR)/src/base/server diff --git a/base-foc/lib/mk/server.mk b/base-foc/lib/mk/server.mk deleted file mode 100644 index de155386ef..0000000000 --- a/base-foc/lib/mk/server.mk +++ /dev/null @@ -1,3 +0,0 @@ -LIBS = thread - -include $(REP_DIR)/lib/mk/raw_server.mk diff --git a/base-foc/lib/mk/thread.mk b/base-foc/lib/mk/thread.mk deleted file mode 100644 index 74ce01970c..0000000000 --- a/base-foc/lib/mk/thread.mk +++ /dev/null @@ -1,3 +0,0 @@ -SRC_CC = thread.cc thread_start.cc thread_bootstrap.cc - -vpath %.cc $(REP_DIR)/src/base/thread diff --git a/base-foc/lib/mk/x86/syscalls.mk b/base-foc/lib/mk/x86/syscall.mk similarity index 100% rename from base-foc/lib/mk/x86/syscalls.mk rename to base-foc/lib/mk/x86/syscall.mk diff --git a/base-foc/lib/mk/x86_32/base-common.mk b/base-foc/lib/mk/x86_32/base-common.mk new file mode 100644 index 0000000000..fd290b51d7 --- /dev/null +++ b/base-foc/lib/mk/x86_32/base-common.mk @@ -0,0 +1,3 @@ +include $(REP_DIR)/lib/mk/base-common.inc + +SRC_CC += ipc/x86_32/pager.cc ipc/x86/pager_exception.cc diff --git a/base-foc/lib/mk/x86_32/ipc.mk b/base-foc/lib/mk/x86_32/ipc.mk deleted file mode 100644 index 010cede4f6..0000000000 --- a/base-foc/lib/mk/x86_32/ipc.mk +++ /dev/null @@ -1,3 +0,0 @@ -SRC_CC = x86/pager_exception.cc x86_32/pager.cc - -include $(REP_DIR)/lib/mk/ipc.inc diff --git a/base-foc/lib/mk/x86_32/startup.mk b/base-foc/lib/mk/x86_32/startup.mk deleted file mode 100644 index 8c2ef8fe07..0000000000 --- a/base-foc/lib/mk/x86_32/startup.mk +++ /dev/null @@ -1,8 +0,0 @@ -SRC_S = crt0.s -SRC_CC = _main.cc -LIBS += cxx lock - -INC_DIR += $(REP_DIR)/src/platform $(BASE_DIR)/src/platform - -vpath crt0.s $(BASE_DIR)/src/platform/x86_32 -vpath _main.cc $(BASE_DIR)/src/platform diff --git a/base-foc/lib/mk/x86_64/base-common.mk b/base-foc/lib/mk/x86_64/base-common.mk new file mode 100644 index 0000000000..73a62387dd --- /dev/null +++ b/base-foc/lib/mk/x86_64/base-common.mk @@ -0,0 +1,3 @@ +include $(REP_DIR)/lib/mk/base-common.inc + +SRC_CC += ipc/x86_64/pager.cc ipc/x86/pager_exception.cc diff --git a/base-foc/lib/mk/x86_64/ipc.mk b/base-foc/lib/mk/x86_64/ipc.mk deleted file mode 100644 index 9586dd77be..0000000000 --- a/base-foc/lib/mk/x86_64/ipc.mk +++ /dev/null @@ -1,3 +0,0 @@ -SRC_CC = x86/pager_exception.cc x86_64/pager.cc - -include $(REP_DIR)/lib/mk/ipc.inc diff --git a/base-foc/lib/mk/x86_64/startup.mk b/base-foc/lib/mk/x86_64/startup.mk deleted file mode 100644 index cc3c005055..0000000000 --- a/base-foc/lib/mk/x86_64/startup.mk +++ /dev/null @@ -1,8 +0,0 @@ -SRC_S = crt0.s -SRC_CC = _main.cc -LIBS += cxx lock - -INC_DIR += $(REP_DIR)/src/platform $(BASE_DIR)/src/platform - -vpath crt0.s $(BASE_DIR)/src/platform/x86_64 -vpath _main.cc $(BASE_DIR)/src/platform diff --git a/base-foc/mk/spec-foc.mk b/base-foc/mk/spec-foc.mk index 4a383fec8e..29404f7af6 100644 --- a/base-foc/mk/spec-foc.mk +++ b/base-foc/mk/spec-foc.mk @@ -30,12 +30,6 @@ CC_OPT += -fPIC # CC_OPT += -DL4SYS_USE_UTCB_WRAP=1 -# -# Startup code to be used when building a program -# -STARTUP_LIB ?= startup -PRG_LIBS += $(STARTUP_LIB) - all: # diff --git a/base-foc/src/core/target.inc b/base-foc/src/core/target.inc index 245c62626f..e3a73f24ea 100644 --- a/base-foc/src/core/target.inc +++ b/base-foc/src/core/target.inc @@ -1,13 +1,13 @@ TARGET = core REQUIRES = foc -LIBS = cxx ipc heap core_printf child pager lock raw_signal raw_server LD_TEXT_ADDR = 0x500000 GEN_CORE_DIR = $(BASE_DIR)/src/core -SRC_CC = cap_map.cc \ - cap_session_component.cc \ +LIBS += base-common + +SRC_CC = cap_session_component.cc \ context_area.cc \ cpu_session_component.cc \ cpu_session_extension.cc \ @@ -31,15 +31,14 @@ SRC_CC = cap_map.cc \ rom_session_component.cc \ signal_session_component.cc \ signal_source_component.cc \ - spin_lock.cc \ - thread.cc \ - thread_bootstrap.cc \ - thread_start.cc + thread_start.cc \ + core_printf.cc INC_DIR += $(REP_DIR)/src/core/include \ $(GEN_CORE_DIR)/include \ $(REP_DIR)/src/base/lock \ - $(BASE_DIR)/src/base/lock + $(BASE_DIR)/src/base/lock \ + $(REP_DIR)/src/base/console vpath context_area.cc $(GEN_CORE_DIR) vpath cpu_session_component.cc $(GEN_CORE_DIR) @@ -54,8 +53,5 @@ vpath ram_session_component.cc $(GEN_CORE_DIR) vpath rm_session_component.cc $(GEN_CORE_DIR) vpath rom_session_component.cc $(GEN_CORE_DIR) vpath signal_session_component.cc $(GEN_CORE_DIR) -vpath cap_map.cc $(REP_DIR)/src/base/env -vpath spin_lock.cc $(REP_DIR)/src/base/env -vpath thread.cc $(REP_DIR)/src/base/thread -vpath thread_bootstrap.cc $(REP_DIR)/src/base/thread +vpath core_printf.cc $(BASE_DIR)/src/base/console vpath %.cc $(REP_DIR)/src/core diff --git a/base-foc/src/core/x86/target.mk b/base-foc/src/core/x86/target.mk index 674179f6d2..d36e32095c 100644 --- a/base-foc/src/core/x86/target.mk +++ b/base-foc/src/core/x86/target.mk @@ -1,10 +1,11 @@ include $(PRG_DIR)/../target.inc REQUIRES += x86 + SRC_CC += io_port_session_component.cc \ x86/platform_x86.cc + INC_DIR += $(REP_DIR)/src/core/include/x86 vpath io_port_session_component.cc $(GEN_CORE_DIR)/x86 vpath platform_services.cc $(GEN_CORE_DIR)/x86 - diff --git a/base-foc/src/test/cap_integrity/target.mk b/base-foc/src/test/cap_integrity/target.mk index 792c02df28..403543f96f 100644 --- a/base-foc/src/test/cap_integrity/target.mk +++ b/base-foc/src/test/cap_integrity/target.mk @@ -1,4 +1,4 @@ REQUIRES = foc TARGET = test-cap_integrity SRC_CC = main.cc -LIBS = env +LIBS = base diff --git a/base-host/lib/mk/base-common.mk b/base-host/lib/mk/base-common.mk new file mode 100644 index 0000000000..9c44da0dc0 --- /dev/null +++ b/base-host/lib/mk/base-common.mk @@ -0,0 +1,31 @@ +# +# \brief Portions of base library shared by core and non-core processes +# \author Norman Feske +# \date 2013-02-14 +# + +LIBS += cxx + +SRC_CC += cap_copy.cc +SRC_CC += ipc/ipc.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 + +INC_DIR += $(REP_DIR)/src/base/lock +INC_DIR += $(BASE_DIR)/src/platform $(REP_DIR)/src/platform + +vpath cap_copy.cc $(BASE_DIR)/src/platform +vpath %.cc $(BASE_DIR)/src/base +vpath %.cc $(REP_DIR)/src/base + diff --git a/base-host/lib/mk/core_printf.mk b/base-host/lib/mk/core_printf.mk deleted file mode 100644 index a0fa6a56bf..0000000000 --- a/base-host/lib/mk/core_printf.mk +++ /dev/null @@ -1 +0,0 @@ -LIBS = printf_stdio console diff --git a/base-host/lib/mk/cxx.mk b/base-host/lib/mk/cxx.mk new file mode 100644 index 0000000000..172827d0c5 --- /dev/null +++ b/base-host/lib/mk/cxx.mk @@ -0,0 +1,4 @@ +SRC_CC += new_delete.cc + +vpath %.cc $(BASE_DIR)/src/base/cxx + diff --git a/base-host/lib/mk/env.mk b/base-host/lib/mk/env.mk deleted file mode 100644 index f9f79d7b21..0000000000 --- a/base-host/lib/mk/env.mk +++ /dev/null @@ -1,7 +0,0 @@ -SRC_CC = env.cc parent.cc context_area.cc -LIBS = ipc heap lock log_console -INC_DIR += $(BASE_DIR)/src/base/env - -vpath env.cc $(BASE_DIR)/src/base/env -vpath context_area.cc $(BASE_DIR)/src/base/env -vpath parent.cc $(REP_DIR)/src/base/env diff --git a/base-host/lib/mk/ipc.mk b/base-host/lib/mk/ipc.mk deleted file mode 100644 index 52ec507d55..0000000000 --- a/base-host/lib/mk/ipc.mk +++ /dev/null @@ -1,5 +0,0 @@ -SRC_CC = ipc.cc ipc_marshal_cap.cc -LIBS = cap_copy - -vpath ipc.cc $(REP_DIR)/src/base/ipc -vpath ipc_marshal_cap.cc $(BASE_DIR)/src/base/ipc diff --git a/base-host/lib/mk/lock.mk b/base-host/lib/mk/lock.mk deleted file mode 100644 index a79c1d9a1a..0000000000 --- a/base-host/lib/mk/lock.mk +++ /dev/null @@ -1,4 +0,0 @@ -SRC_CC = lock.cc -INC_DIR += $(REP_DIR)/src/base/lock - -vpath lock.cc $(BASE_DIR)/src/base/lock diff --git a/base-host/lib/mk/pager.mk b/base-host/lib/mk/pager.mk deleted file mode 100644 index c22e66d224..0000000000 --- a/base-host/lib/mk/pager.mk +++ /dev/null @@ -1,3 +0,0 @@ -SRC_CC = pager.cc - -vpath pager.cc $(REP_DIR)/src/base/pager diff --git a/base-foc/lib/mk/cap_copy.mk b/base-host/lib/mk/platform.mk similarity index 100% rename from base-foc/lib/mk/cap_copy.mk rename to base-host/lib/mk/platform.mk diff --git a/base-host/lib/mk/printf_stdio.mk b/base-host/lib/mk/printf_stdio.mk deleted file mode 100644 index 8f910d8e9a..0000000000 --- a/base-host/lib/mk/printf_stdio.mk +++ /dev/null @@ -1,3 +0,0 @@ -SRC_CC = printf_stdio.cc - -vpath printf_stdio.cc $(REP_DIR)/src/lib/printf_stdio diff --git a/base-host/src/core/target.inc b/base-host/src/core/target.inc index ab78bc8e06..29039ccd30 100644 --- a/base-host/src/core/target.inc +++ b/base-host/src/core/target.inc @@ -1,6 +1,5 @@ TARGET = core -LIBS = cxx ipc heap core_printf child pager lock \ - raw_signal raw_server +LIBS = base-common GEN_CORE_DIR = $(BASE_DIR)/src/core @@ -14,9 +13,7 @@ SRC_CC = \ pd_session_component.cc \ io_mem_session_component.cc \ io_mem_session_support.cc \ - thread.cc \ thread_host.cc \ - thread_bootstrap.cc \ platform_thread.cc \ platform_pd.cc \ platform.cc \ @@ -28,7 +25,8 @@ SRC_CC = \ signal_session_component.cc \ signal_source_component.cc \ core_rm_session.cc \ - context_area.cc + context_area.cc \ + printf_stdio.cc INC_DIR = $(REP_DIR)/src/core/include \ $(GEN_CORE_DIR)/include @@ -45,7 +43,6 @@ vpath signal_session_component.cc $(GEN_CORE_DIR) vpath signal_source_component.cc $(GEN_CORE_DIR) vpath dataspace_component.cc $(GEN_CORE_DIR) vpath platform_services.cc $(GEN_CORE_DIR) +vpath printf_stdio.cc $(REP_DIR)/src/lib/printf_stdio vpath %.cc $(REP_DIR)/src/core -vpath thread_bootstrap.cc $(BASE_DIR)/src/base/thread -vpath thread.cc $(BASE_DIR)/src/base/thread diff --git a/base-hw/lib/mk/arm/startup.mk b/base-hw/lib/mk/arm/startup.mk deleted file mode 100755 index 2bde9b7e65..0000000000 --- a/base-hw/lib/mk/arm/startup.mk +++ /dev/null @@ -1,22 +0,0 @@ -# -# \brief Essential platform specific sources for common programs -# \author Martin Stein -# \date 2012-04-16 -# - -# add libraries -LIBS += cxx lock - -# add C++ sources -SRC_CC += _main.cc - -# add assembly sources -SRC_S += crt0.s syscall.cc - -# add include paths -INC_DIR += $(REP_DIR)/src/platform $(BASE_DIR)/src/platform - -# declare source paths -vpath crt0.s $(REP_DIR)/src/platform -vpath _main.cc $(BASE_DIR)/src/platform -vpath syscall.cc $(REP_DIR)/src/base/arm diff --git a/base-hw/lib/mk/base-common.mk b/base-hw/lib/mk/base-common.mk new file mode 100644 index 0000000000..9c7ee58806 --- /dev/null +++ b/base-hw/lib/mk/base-common.mk @@ -0,0 +1,26 @@ +# +# \brief Portions of base library shared by core and non-core processes +# \author Norman Feske +# \date 2013-02-14 +# + +LIBS += cxx syscall + +SRC_CC += ipc.cc ipc/ipc_marshal_cap +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 += child/child.cc +SRC_CC += process/process.cc +SRC_CC += elf/elf_binary.cc +SRC_CC += console/console.cc +SRC_CC += lock/lock.cc +SRC_CC += signal/signal.cc +SRC_CC += server/server.cc server/common.cc +SRC_CC += thread/thread_bootstrap_empty.cc + +INC_DIR += $(REP_DIR)/src/base/lock $(BASE_DIR)/src/base/lock + +vpath %.cc $(REP_DIR)/src/base +vpath %.cc $(BASE_DIR)/src/base diff --git a/base-hw/lib/mk/base.mk b/base-hw/lib/mk/base.mk new file mode 100644 index 0000000000..a5b257a308 --- /dev/null +++ b/base-hw/lib/mk/base.mk @@ -0,0 +1,16 @@ +# +# \brief Portions of base library that are exclusive to non-core processes +# \author Norman Feske +# \date 2013-02-14 +# + +LIBS += base-common startup + +SRC_CC += console/log_console.cc +SRC_CC += env/env.cc env/context_area.cc env/reload_parent_cap.cc +SRC_CC += thread/thread.cc thread_support.cc + +INC_DIR += $(BASE_DIR)/src/base/env + +vpath %.cc $(REP_DIR)/src/base +vpath %.cc $(BASE_DIR)/src/base diff --git a/base-hw/lib/mk/ipc.mk b/base-hw/lib/mk/ipc.mk deleted file mode 100644 index ebf40787e8..0000000000 --- a/base-hw/lib/mk/ipc.mk +++ /dev/null @@ -1,12 +0,0 @@ -# -# \brief Interprocess communication -# \author Martin Stein -# \date 2012-04-16 -# - -# add library dependencies -LIBS += thread - -# include implied libraries -include $(REP_DIR)/lib/mk/raw_ipc.mk - diff --git a/base-hw/lib/mk/lock.mk b/base-hw/lib/mk/lock.mk deleted file mode 100644 index 0978d38ccb..0000000000 --- a/base-hw/lib/mk/lock.mk +++ /dev/null @@ -1,15 +0,0 @@ -# -# \brief Synchronisation through locks -# \author Martin Stein -# \date 2012-04-16 -# - -# add C++ sources -SRC_CC += lock.cc - -# add include paths -INC_DIR += $(REP_DIR)/src/base/lock - -# declare source paths -vpath lock.cc $(BASE_DIR)/src/base/lock - diff --git a/base-hw/lib/mk/pager.mk b/base-hw/lib/mk/pager.mk deleted file mode 100644 index fedbaf0601..0000000000 --- a/base-hw/lib/mk/pager.mk +++ /dev/null @@ -1,12 +0,0 @@ -# -# \brief Genode pager threads -# \author Martin Stein -# \date 2012-04-16 -# - -# add C++ sources -SRC_CC += pager.cc - -# declare source paths -vpath pager.cc $(REP_DIR)/src/base - diff --git a/base-hw/lib/mk/raw_ipc.mk b/base-hw/lib/mk/raw_ipc.mk deleted file mode 100644 index 3b85980e7d..0000000000 --- a/base-hw/lib/mk/raw_ipc.mk +++ /dev/null @@ -1,13 +0,0 @@ -# -# \brief Inter-process communication without thread implementations -# \author Martin Stein -# \date 2012-04-16 -# - -# add C++ source files -SRC_CC += ipc.cc ipc_marshal_cap.cc - -# declare source paths -vpath ipc.cc $(REP_DIR)/src/base -vpath ipc_marshal_cap.cc $(BASE_DIR)/src/base/ipc - diff --git a/base-hw/lib/mk/raw_signal.mk b/base-hw/lib/mk/raw_signal.mk deleted file mode 100644 index da4dd0f277..0000000000 --- a/base-hw/lib/mk/raw_signal.mk +++ /dev/null @@ -1,15 +0,0 @@ -# -# \brief Submit and receive asynchronous events -# \author Martin Stein -# \date 2012-05-07 -# - -# add C++ sources -SRC_CC += signal.cc - -# add library dependencies -LIBS += slab - -# declare source paths -vpath signal.cc $(REP_DIR)/src/base/signal - diff --git a/base-hw/lib/mk/signal.mk b/base-hw/lib/mk/signal.mk deleted file mode 100644 index 43d6803860..0000000000 --- a/base-hw/lib/mk/signal.mk +++ /dev/null @@ -1,9 +0,0 @@ -# -# \brief Shortcut for raw-signal lib to ensure Genode compliance -# \author Martin Stein -# \date 2012-04-16 -# - -# include implied libraries -include $(REP_DIR)/lib/mk/raw_signal.mk - diff --git a/base-hw/lib/mk/syscall.mk b/base-hw/lib/mk/syscall.mk new file mode 100644 index 0000000000..c074c776c6 --- /dev/null +++ b/base-hw/lib/mk/syscall.mk @@ -0,0 +1,3 @@ +SRC_CC = syscall.cc + +vpath syscall.cc $(REP_DIR)/src/base/arm diff --git a/base-hw/lib/mk/thread.mk b/base-hw/lib/mk/thread.mk deleted file mode 100644 index db910a6a1b..0000000000 --- a/base-hw/lib/mk/thread.mk +++ /dev/null @@ -1,14 +0,0 @@ -# -# \brief Implementation of the Genode thread-API -# \author Martin Stein -# \date 2012-04-16 -# - -# add C++ sources -SRC_CC += thread.cc thread_bootstrap.cc thread_support.cc - -# declare source paths -vpath thread_support.cc $(REP_DIR)/src/base/ -vpath thread_bootstrap.cc $(BASE_DIR)/src/base/thread/ -vpath thread.cc $(BASE_DIR)/src/base/thread/ - diff --git a/base-hw/mk/spec-hw.mk b/base-hw/mk/spec-hw.mk deleted file mode 100644 index 7a813ef648..0000000000 --- a/base-hw/mk/spec-hw.mk +++ /dev/null @@ -1,10 +0,0 @@ -# -# \brief Build config for targets with hw spec -# \author Martin Stein -# \date 2012-04-16 -# - -# use the default startup lib if not set already -STARTUP_LIB ?= startup -PRG_LIBS += $(STARTUP_LIB) - diff --git a/base-hw/src/core/imx31/target.mk b/base-hw/src/core/imx31/target.mk index b438511543..61b732e5e3 100644 --- a/base-hw/src/core/imx31/target.mk +++ b/base-hw/src/core/imx31/target.mk @@ -12,8 +12,7 @@ INC_DIR += $(REP_DIR)/src/core/imx31 # add C++ sources SRC_CC += platform_services.cc \ - platform_support.cc \ - syscall.cc + platform_support.cc # add assembly sources SRC_S += mode_transition.s \ @@ -24,7 +23,6 @@ SRC_S += mode_transition.s \ vpath platform_services.cc $(BASE_DIR)/src/core vpath platform_support.cc $(REP_DIR)/src/core/imx31 vpath mode_transition.s $(REP_DIR)/src/core/arm_v6 -vpath syscall.cc $(REP_DIR)/src/base/arm vpath crt0.s $(REP_DIR)/src/core/arm # diff --git a/base-hw/src/core/imx53/target.mk b/base-hw/src/core/imx53/target.mk index 82c9a501c5..24629ca07c 100644 --- a/base-hw/src/core/imx53/target.mk +++ b/base-hw/src/core/imx53/target.mk @@ -13,8 +13,7 @@ INC_DIR += $(REP_DIR)/src/core/imx53 # add C++ sources SRC_CC += platform_services.cc \ - platform_support.cc \ - syscall.cc + platform_support.cc # add assembly sources SRC_S += mode_transition.s \ @@ -25,7 +24,6 @@ SRC_S += mode_transition.s \ vpath platform_services.cc $(BASE_DIR)/src/core vpath platform_support.cc $(REP_DIR)/src/core/imx53 vpath mode_transition.s $(REP_DIR)/src/core/arm_v7 -vpath syscall.cc $(REP_DIR)/src/base/arm vpath crt0.s $(REP_DIR)/src/core/arm # diff --git a/base-hw/src/core/panda/target.mk b/base-hw/src/core/panda/target.mk index ec4504b198..f32a7497e1 100644 --- a/base-hw/src/core/panda/target.mk +++ b/base-hw/src/core/panda/target.mk @@ -13,8 +13,7 @@ INC_DIR += $(REP_DIR)/src/core/panda # add C++ sources SRC_CC += platform_services.cc \ - platform_support.cc \ - syscall.cc + platform_support.cc # add assembly sources SRC_S += mode_transition.s \ @@ -25,7 +24,6 @@ SRC_S += mode_transition.s \ vpath platform_support.cc $(REP_DIR)/src/core/panda vpath platform_services.cc $(BASE_DIR)/src/core vpath mode_transition.s $(REP_DIR)/src/core/arm_v7 -vpath syscall.cc $(REP_DIR)/src/base/arm vpath crt0.s $(REP_DIR)/src/core/arm # diff --git a/base-hw/src/core/pbxa9/target.mk b/base-hw/src/core/pbxa9/target.mk index 33c77392d3..f624601932 100644 --- a/base-hw/src/core/pbxa9/target.mk +++ b/base-hw/src/core/pbxa9/target.mk @@ -13,8 +13,7 @@ INC_DIR += $(REP_DIR)/src/core/pbxa9 # add C++ sources SRC_CC += platform_services.cc \ - platform_support.cc \ - syscall.cc + platform_support.cc # add assembly sources SRC_S += mode_transition.s \ @@ -25,7 +24,6 @@ SRC_S += mode_transition.s \ vpath platform_services.cc $(BASE_DIR)/src/core vpath platform_support.cc $(REP_DIR)/src/core/pbxa9 vpath mode_transition.s $(REP_DIR)/src/core/arm_v7 -vpath syscall.cc $(REP_DIR)/src/base/arm vpath crt0.s $(REP_DIR)/src/core/arm # diff --git a/base-hw/src/core/target.inc b/base-hw/src/core/target.inc index 26a2a7d055..a4af0d337a 100644 --- a/base-hw/src/core/target.inc +++ b/base-hw/src/core/target.inc @@ -10,21 +10,8 @@ TARGET = core # set entry point of core's first thread CC_OPT += -DCORE_MAIN=_main -# core brings its own startup code -STARTUP_LIB = - # add library dependencies -LIBS += cxx \ - raw_ipc \ - heap \ - child \ - process \ - pager \ - lock \ - console \ - signal \ - raw_server \ - syscall +LIBS += base-common # add include paths INC_DIR += $(REP_DIR)/src/core \ @@ -36,8 +23,7 @@ INC_DIR += $(REP_DIR)/src/core \ $(BASE_DIR)/src/platform # add C++ sources -SRC_CC += _main.cc \ - console.cc \ +SRC_CC += console.cc \ cpu_session_component.cc \ cpu_session_support.cc \ dataspace_component.cc \ @@ -59,7 +45,9 @@ SRC_CC += _main.cc \ kernel.cc \ rm_session_support.cc \ kernel_support.cc \ - trustzone.cc + trustzone.cc \ + pager.cc \ + _main.cc # declare file locations vpath _main.cc $(BASE_DIR)/src/platform @@ -74,5 +62,7 @@ vpath rm_session_component.cc $(BASE_DIR)/src/core vpath rom_session_component.cc $(BASE_DIR)/src/core vpath dump_alloc.cc $(BASE_DIR)/src/core vpath console.cc $(REP_DIR)/src/base +vpath pager.cc $(REP_DIR)/src/base +vpath _main.cc $(BASE_DIR)/src/platform vpath % $(REP_DIR)/src/core diff --git a/base-hw/src/core/vea9x4/target.inc b/base-hw/src/core/vea9x4/target.inc index dcf0218952..6d9cff86fd 100644 --- a/base-hw/src/core/vea9x4/target.inc +++ b/base-hw/src/core/vea9x4/target.inc @@ -10,8 +10,7 @@ INC_DIR += $(REP_DIR)/src/core/vea9x4 # add C++ sources SRC_CC += platform_services.cc \ - platform_support.cc \ - syscall.cc + platform_support.cc # add assembly sources SRC_S += crt0.s \ @@ -31,7 +30,6 @@ endif # declare source paths vpath mode_transition.s $(REP_DIR)/src/core/arm_v7 -vpath syscall.cc $(REP_DIR)/src/base/arm vpath crt0.s $(REP_DIR)/src/core/arm # include less specific target parts diff --git a/base-linux/lib/mk/base-common.mk b/base-linux/lib/mk/base-common.mk new file mode 100644 index 0000000000..45b1f07fe4 --- /dev/null +++ b/base-linux/lib/mk/base-common.mk @@ -0,0 +1,29 @@ +# +# \brief Portions of base library shared by core and non-core processes +# \author Norman Feske +# \date 2013-02-14 +# + +LIBS += syscall + +SRC_CC += ipc/ipc.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 += env/rm_session_mmap.cc env/debug.cc +SRC_CC += signal/signal.cc +SRC_CC += server/server.cc server/common.cc + +INC_DIR += $(REP_DIR)/src/base/lock $(BASE_DIR)/src/base/lock +INC_DIR += $(REP_DIR)/src/base/ipc +INC_DIR += $(REP_DIR)/src/base/env +INC_DIR += $(REP_DIR)/src/platform $(BASE_DIR)/src/platform + +vpath %.cc $(REP_DIR)/src/base +vpath %.cc $(BASE_DIR)/src/base diff --git a/base-linux/lib/mk/base.inc b/base-linux/lib/mk/base.inc new file mode 100644 index 0000000000..3cc6e6861e --- /dev/null +++ b/base-linux/lib/mk/base.inc @@ -0,0 +1,18 @@ +# +# \brief Portions of base library that are exclusive to non-core processes +# \author Norman Feske +# \date 2013-02-14 +# +# The content of this file is used for both native Genode as well as hybrid +# Linux/Genode programs. Hence, it must be void of any thread-related code. +# + +LIBS += base-common syscall + +SRC_CC += console/log_console.cc +SRC_CC += env/env.cc env/platform_env.cc env/context_area.cc + +INC_DIR += $(REP_DIR)/src/base/env + +vpath %.cc $(REP_DIR)/src/base +vpath %.cc $(BASE_DIR)/src/base diff --git a/base-linux/lib/mk/core_printf.mk b/base-linux/lib/mk/core_printf.mk deleted file mode 100644 index 32ba726754..0000000000 --- a/base-linux/lib/mk/core_printf.mk +++ /dev/null @@ -1,5 +0,0 @@ -SRC_CC = core_printf.cc -LIBS = cxx console syscall -INC_DIR += $(REP_DIR)/src/base/console - -vpath core_printf.cc $(BASE_DIR)/src/base/console diff --git a/base-linux/lib/mk/env.mk b/base-linux/lib/mk/env.mk deleted file mode 100644 index d458722a2e..0000000000 --- a/base-linux/lib/mk/env.mk +++ /dev/null @@ -1,7 +0,0 @@ -SRC_CC = env.cc rm_session_mmap.cc platform_env.cc debug.cc context_area.cc -LIBS = ipc heap log_console lock syscall -INC_DIR += $(REP_DIR)/src/base/env - -vpath env.cc $(BASE_DIR)/src/base/env -vpath context_area.cc $(BASE_DIR)/src/base/env -vpath %.cc $(REP_DIR)/src/base/env diff --git a/base-linux/lib/mk/ipc.mk b/base-linux/lib/mk/ipc.mk deleted file mode 100644 index 0664bedce7..0000000000 --- a/base-linux/lib/mk/ipc.mk +++ /dev/null @@ -1,6 +0,0 @@ -REQUIRES = linux -SRC_CC = ipc.cc -LIBS = syscall cap_copy -INC_DIR += $(REP_DIR)/src/base/ipc - -vpath ipc.cc $(REP_DIR)/src/base/ipc diff --git a/base-linux/lib/mk/lock.mk b/base-linux/lib/mk/lock.mk deleted file mode 100644 index 51b073080e..0000000000 --- a/base-linux/lib/mk/lock.mk +++ /dev/null @@ -1,5 +0,0 @@ -SRC_CC = lock.cc -LIBS = syscall -INC_DIR += $(REP_DIR)/src/base/lock - -vpath lock.cc $(BASE_DIR)/src/base/lock diff --git a/base-linux/lib/mk/lx_hybrid.mk b/base-linux/lib/mk/lx_hybrid.mk index f2065dc3bd..ce0a8283bd 100644 --- a/base-linux/lib/mk/lx_hybrid.mk +++ b/base-linux/lib/mk/lx_hybrid.mk @@ -1,5 +1,10 @@ -SRC_CC = lx_hybrid.cc new_delete.cc -LIBS += syscall env +SRC_CC += lx_hybrid.cc new_delete.cc vpath new_delete.cc $(BASE_DIR)/src/base/cxx vpath lx_hybrid.cc $(REP_DIR)/src/platform + +# add parts of the base library that are shared with core +LIBS += base-common + +# non-core parts of the base library (except for the startup code) +include $(REP_DIR)/lib/mk/base.inc diff --git a/base-linux/lib/mk/process.mk b/base-linux/lib/mk/process.mk deleted file mode 100644 index 1e3d7795a2..0000000000 --- a/base-linux/lib/mk/process.mk +++ /dev/null @@ -1,13 +0,0 @@ -SRC_CC = process.cc -LIBS = syscall - -# -# The Linux version of the process library does not use Genode's ELF loader for -# loading executables but the 'execve' system call. However, for supporting -# dynamically linked executables, we have to take the decision of whether to load -# the dynamic linker or a static executable based on information provided by -# the ELF program header. We use the ELF library to obtain this information. -# -LIBS += elf - -vpath process.cc $(REP_DIR)/src/base/process diff --git a/base-linux/lib/mk/thread.mk b/base-linux/lib/mk/thread.mk deleted file mode 100644 index db22b1f6d2..0000000000 --- a/base-linux/lib/mk/thread.mk +++ /dev/null @@ -1,6 +0,0 @@ -REQUIRES = linux -SRC_CC = thread.cc thread_linux.cc -LIBS = syscall - -vpath thread.cc $(BASE_DIR)/src/base/thread -vpath thread_linux.cc $(REP_DIR)/src/base/thread diff --git a/base-linux/lib/mk/x86_32/base.mk b/base-linux/lib/mk/x86_32/base.mk new file mode 100644 index 0000000000..aae6655f00 --- /dev/null +++ b/base-linux/lib/mk/x86_32/base.mk @@ -0,0 +1,8 @@ +include $(REP_DIR)/lib/mk/base.inc + +LIBS += startup cxx + +SRC_CC += thread.cc thread_linux.cc + +vpath thread.cc $(BASE_DIR)/src/base/thread +vpath thread_linux.cc $(REP_DIR)/src/base/thread diff --git a/base-linux/lib/mk/x86_32/startup.mk b/base-linux/lib/mk/x86_32/startup.mk index 765f02b6d4..de2ff3bf9c 100644 --- a/base-linux/lib/mk/x86_32/startup.mk +++ b/base-linux/lib/mk/x86_32/startup.mk @@ -1,8 +1,5 @@ -REQUIRES = linux x86 -LIBS = cxx lock syscall -SRC_S = crt0.s -SRC_CC = _main.cc -INC_DIR += $(BASE_DIR)/src/platform +LIBS += syscall -vpath crt0.s $(REP_DIR)/src/platform/x86_32 -vpath _main.cc $(dir $(call select_from_repositories,src/platform/_main.cc)) +include $(BASE_DIR)/lib/mk/startup.inc + +vpath crt0.s $(REP_DIR)/src/platform/x86_32 diff --git a/base-linux/lib/mk/x86_64/base.mk b/base-linux/lib/mk/x86_64/base.mk new file mode 100644 index 0000000000..3a54314ce6 --- /dev/null +++ b/base-linux/lib/mk/x86_64/base.mk @@ -0,0 +1,8 @@ +include $(REP_DIR)/lib/mk/base.inc + +LIBS += startup + +SRC_CC += thread.cc thread_linux.cc + +vpath thread.cc $(BASE_DIR)/src/base/thread +vpath thread_linux.cc $(REP_DIR)/src/base/thread diff --git a/base-linux/lib/mk/x86_64/startup.mk b/base-linux/lib/mk/x86_64/startup.mk index 248c5902a1..c10565d9bb 100644 --- a/base-linux/lib/mk/x86_64/startup.mk +++ b/base-linux/lib/mk/x86_64/startup.mk @@ -1,8 +1,5 @@ -REQUIRES = linux x86 -LIBS = cxx lock syscall -SRC_S = crt0.s -SRC_CC = _main.cc -INC_DIR += $(BASE_DIR)/src/platform +LIBS += syscall -vpath crt0.s $(REP_DIR)/src/platform/x86_64 -vpath _main.cc $(dir $(call select_from_repositories,src/platform/_main.cc)) +include $(BASE_DIR)/lib/mk/startup.inc + +vpath crt0.s $(REP_DIR)/src/platform/x86_64 diff --git a/base-linux/mk/spec-linux.mk b/base-linux/mk/spec-linux.mk index 39d0da2462..a565f6cdd0 100644 --- a/base-linux/mk/spec-linux.mk +++ b/base-linux/mk/spec-linux.mk @@ -8,7 +8,6 @@ # the program under Linux to prevent clashes with vdso. # ifneq ($(USE_HOST_LD_SCRIPT),yes) -PRG_LIBS += startup LD_TEXT_ADDR ?= 0x01000000 LD_SCRIPT_STATIC = $(call select_from_repositories,src/platform/genode.ld) \ $(call select_from_repositories,src/platform/context_area.nostdlib.ld) diff --git a/base-linux/src/core/target.mk b/base-linux/src/core/target.mk index 283e422099..097a8a9b38 100644 --- a/base-linux/src/core/target.mk +++ b/base-linux/src/core/target.mk @@ -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) diff --git a/base-linux/src/test/lx_hybrid_ctors/target.mk b/base-linux/src/test/lx_hybrid_ctors/target.mk index c68e6a0086..c60fda16ef 100644 --- a/base-linux/src/test/lx_hybrid_ctors/target.mk +++ b/base-linux/src/test/lx_hybrid_ctors/target.mk @@ -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 diff --git a/base-linux/src/test/lx_hybrid_errno/target.mk b/base-linux/src/test/lx_hybrid_errno/target.mk index 66a5e93d92..ff7543a6d3 100644 --- a/base-linux/src/test/lx_hybrid_errno/target.mk +++ b/base-linux/src/test/lx_hybrid_errno/target.mk @@ -1,3 +1,3 @@ TARGET = test-lx_hybrid_errno SRC_CC = main.c -LIBS = env cxx thread lx_hybrid +LIBS = lx_hybrid diff --git a/base-linux/src/test/lx_hybrid_exception/target.mk b/base-linux/src/test/lx_hybrid_exception/target.mk index 7a7242111c..f308a0b76e 100644 --- a/base-linux/src/test/lx_hybrid_exception/target.mk +++ b/base-linux/src/test/lx_hybrid_exception/target.mk @@ -1,3 +1,3 @@ TARGET = test-lx_hybrid_exception SRC_CC = main.cc -LIBS = env lx_hybrid +LIBS = lx_hybrid diff --git a/base-linux/src/test/lx_hybrid_pthread_ipc/target.mk b/base-linux/src/test/lx_hybrid_pthread_ipc/target.mk index 6f404deb13..1340121da7 100644 --- a/base-linux/src/test/lx_hybrid_pthread_ipc/target.mk +++ b/base-linux/src/test/lx_hybrid_pthread_ipc/target.mk @@ -1,3 +1,3 @@ TARGET = test-lx_hybrid_pthread_ipc SRC_CC = main.c -LIBS = env cxx thread lx_hybrid +LIBS = lx_hybrid diff --git a/base-linux/src/test/rm_session_mmap/target.mk b/base-linux/src/test/rm_session_mmap/target.mk index fc9d741125..158a121125 100644 --- a/base-linux/src/test/rm_session_mmap/target.mk +++ b/base-linux/src/test/rm_session_mmap/target.mk @@ -1,3 +1,3 @@ TARGET = test-rm_session_mmap -LIBS = cxx env +LIBS = base SRC_CC = main.cc diff --git a/base-mb/src/test/hello/target.mk b/base-mb/src/test/hello/target.mk index ce1e067cdf..2505d5ffa0 100644 --- a/base-mb/src/test/hello/target.mk +++ b/base-mb/src/test/hello/target.mk @@ -1,3 +1,3 @@ TARGET = hello SRC_CC = main.cc -LIBS = cxx env thread +LIBS = base diff --git a/base-nova/lib/mk/base-common.inc b/base-nova/lib/mk/base-common.inc new file mode 100644 index 0000000000..70fb31be69 --- /dev/null +++ b/base-nova/lib/mk/base-common.inc @@ -0,0 +1,26 @@ +# +# \brief Portions of base library shared by core and non-core processes +# \author Norman Feske +# \date 2013-02-14 +# + +LIBS += cxx startup + +SRC_CC += ipc/ipc.cc ipc/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 +SRC_CC += thread/thread.cc thread/thread_context.cc + +INC_DIR += $(REP_DIR)/src/base/lock $(BASE_DIR)/src/base/lock + +vpath %.cc $(REP_DIR)/src/base +vpath %.cc $(BASE_DIR)/src/base diff --git a/base-nova/lib/mk/base.mk b/base-nova/lib/mk/base.mk new file mode 100644 index 0000000000..e73fe2a29c --- /dev/null +++ b/base-nova/lib/mk/base.mk @@ -0,0 +1,17 @@ +# +# \brief Portions of base library that are exclusive to non-core processes +# \author Norman Feske +# \date 2013-02-14 +# + +LIBS += base-common + +SRC_CC += console/log_console.cc +SRC_CC += env/env.cc env/cap_sel_alloc.cc env/main_thread.cc \ + env/context_area.cc env/reload_parent_cap +SRC_CC += thread/thread_nova.cc + +INC_DIR += $(BASE_DIR)/src/base/env + +vpath %.cc $(REP_DIR)/src/base +vpath %.cc $(BASE_DIR)/src/base diff --git a/base-nova/lib/mk/cap_copy.mk b/base-nova/lib/mk/cap_copy.mk deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/base-nova/lib/mk/core_printf.mk b/base-nova/lib/mk/core_printf.mk deleted file mode 100644 index 663cf64b90..0000000000 --- a/base-nova/lib/mk/core_printf.mk +++ /dev/null @@ -1,5 +0,0 @@ -SRC_CC = core_printf.cc -LIBS = cxx console -INC_DIR += $(REP_DIR)/src/base/console - -vpath core_printf.cc $(BASE_DIR)/src/base/console diff --git a/base-nova/lib/mk/env.mk b/base-nova/lib/mk/env.mk deleted file mode 100644 index c6f54bc482..0000000000 --- a/base-nova/lib/mk/env.mk +++ /dev/null @@ -1,10 +0,0 @@ -SRC_CC = env.cc cap_sel_alloc.cc main_thread.cc context_area.cc \ - reload_parent_cap.cc -LIBS = ipc heap lock log_console -INC_DIR += $(BASE_DIR)/src/base/env - -vpath env.cc $(BASE_DIR)/src/base/env -vpath cap_sel_alloc.cc $(REP_DIR)/src/base/env -vpath main_thread.cc $(REP_DIR)/src/base/env -vpath context_area.cc $(BASE_DIR)/src/base/env -vpath reload_parent_cap.cc $(BASE_DIR)/src/base/env diff --git a/base-nova/lib/mk/ipc.mk b/base-nova/lib/mk/ipc.mk deleted file mode 100644 index c76e486f87..0000000000 --- a/base-nova/lib/mk/ipc.mk +++ /dev/null @@ -1,6 +0,0 @@ -SRC_CC = ipc.cc pager.cc -LIBS = thread_context cap_copy -INC_DIR += $(REP_DIR)/src/platform - -vpath ipc.cc $(REP_DIR)/src/base/ipc -vpath pager.cc $(REP_DIR)/src/base/ipc diff --git a/base-nova/lib/mk/lock.mk b/base-nova/lib/mk/lock.mk deleted file mode 100644 index 3b968d2b6b..0000000000 --- a/base-nova/lib/mk/lock.mk +++ /dev/null @@ -1,5 +0,0 @@ -SRC_CC = lock.cc -INC_DIR += $(REP_DIR)/src/base/lock -INC_DIR += $(REP_DIR)/src/platform - -vpath lock.cc $(BASE_DIR)/src/base/lock diff --git a/base-nova/lib/mk/raw_server.mk b/base-nova/lib/mk/raw_server.mk deleted file mode 100644 index 3bbdca3d3c..0000000000 --- a/base-nova/lib/mk/raw_server.mk +++ /dev/null @@ -1,4 +0,0 @@ -SRC_CC = server.cc -INC_DIR = $(REP_DIR)/src/platform - -vpath %.cc $(REP_DIR)/src/base/server diff --git a/base-nova/lib/mk/server.mk b/base-nova/lib/mk/server.mk deleted file mode 100644 index de155386ef..0000000000 --- a/base-nova/lib/mk/server.mk +++ /dev/null @@ -1,3 +0,0 @@ -LIBS = thread - -include $(REP_DIR)/lib/mk/raw_server.mk diff --git a/base-nova/lib/mk/thread.mk b/base-nova/lib/mk/thread.mk deleted file mode 100644 index b599c112ee..0000000000 --- a/base-nova/lib/mk/thread.mk +++ /dev/null @@ -1,6 +0,0 @@ -SRC_CC = thread.cc thread_nova.cc -LIBS = thread_context - -vpath thread.cc $(BASE_DIR)/src/base/thread -vpath thread_nova.cc $(REP_DIR)/src/base/thread - diff --git a/base-nova/lib/mk/thread_context.mk b/base-nova/lib/mk/thread_context.mk deleted file mode 100644 index 55444d8bb0..0000000000 --- a/base-nova/lib/mk/thread_context.mk +++ /dev/null @@ -1,3 +0,0 @@ -SRC_CC = thread_context.cc - -vpath thread_context.cc $(REP_DIR)/src/base/thread diff --git a/base-nova/lib/mk/x86_32/base-common.mk b/base-nova/lib/mk/x86_32/base-common.mk new file mode 100644 index 0000000000..4879b1d231 --- /dev/null +++ b/base-nova/lib/mk/x86_32/base-common.mk @@ -0,0 +1,3 @@ +include $(REP_DIR)/lib/mk/base-common.inc + +SRC_CC += pager/x86_32/pager.cc diff --git a/base-nova/lib/mk/x86_32/pager.mk b/base-nova/lib/mk/x86_32/pager.mk deleted file mode 100644 index 018d9acb97..0000000000 --- a/base-nova/lib/mk/x86_32/pager.mk +++ /dev/null @@ -1,3 +0,0 @@ -SRC_CC = pager.cc x86_32/pager.cc - -vpath %.cc $(REP_DIR)/src/base/pager diff --git a/base-nova/lib/mk/x86_32/startup.mk b/base-nova/lib/mk/x86_32/startup.mk deleted file mode 100644 index e8d8592665..0000000000 --- a/base-nova/lib/mk/x86_32/startup.mk +++ /dev/null @@ -1,8 +0,0 @@ -REQUIRES = nova x86 -LIBS = cxx lock -SRC_S = crt0.s -SRC_CC = _main.cc -INC_DIR += $(REP_DIR)/src/platform - -vpath crt0.s $(BASE_DIR)/src/platform/x86_32 -vpath _main.cc $(dir $(call select_from_repositories,src/platform/_main.cc)) diff --git a/base-nova/lib/mk/x86_64/base-common.mk b/base-nova/lib/mk/x86_64/base-common.mk new file mode 100644 index 0000000000..5bccc9814c --- /dev/null +++ b/base-nova/lib/mk/x86_64/base-common.mk @@ -0,0 +1,3 @@ +include $(REP_DIR)/lib/mk/base-common.inc + +SRC_CC += pager/x86_64/pager.cc diff --git a/base-nova/lib/mk/x86_64/pager.mk b/base-nova/lib/mk/x86_64/pager.mk deleted file mode 100644 index e8abfd2fab..0000000000 --- a/base-nova/lib/mk/x86_64/pager.mk +++ /dev/null @@ -1,3 +0,0 @@ -SRC_CC = pager.cc x86_64/pager.cc - -vpath %.cc $(REP_DIR)/src/base/pager diff --git a/base-nova/lib/mk/x86_64/startup.mk b/base-nova/lib/mk/x86_64/startup.mk deleted file mode 100644 index 57a8c96d3d..0000000000 --- a/base-nova/lib/mk/x86_64/startup.mk +++ /dev/null @@ -1,8 +0,0 @@ -REQUIRES = nova x86_64 -LIBS = cxx lock -SRC_S = crt0.s -SRC_CC = _main.cc -INC_DIR += $(REP_DIR)/src/platform - -vpath crt0.s $(BASE_DIR)/src/platform/x86_64 -vpath _main.cc $(dir $(call select_from_repositories,src/platform/_main.cc)) diff --git a/base-nova/mk/spec-nova.mk b/base-nova/mk/spec-nova.mk index f538c314d2..ac92e46562 100644 --- a/base-nova/mk/spec-nova.mk +++ b/base-nova/mk/spec-nova.mk @@ -9,9 +9,3 @@ SPECS += pci ps2 vesa # Linker options that are specific for x86 # LD_TEXT_ADDR ?= 0x01000000 - -# -# Startup code to be used when building a program -# -STARTUP_LIB ?= startup -PRG_LIBS += $(STARTUP_LIB) diff --git a/base-nova/src/core/target.inc b/base-nova/src/core/target.inc index c8f17a0cf0..e65266759b 100644 --- a/base-nova/src/core/target.inc +++ b/base-nova/src/core/target.inc @@ -1,11 +1,9 @@ TARGET = core -LIBS = cxx ipc heap core_printf child pager lock \ - raw_signal raw_server +LIBS = base-common GEN_CORE_DIR = $(BASE_DIR)/src/core -SRC_CC = \ - main.cc \ +SRC_CC = main.cc \ ram_session_component.cc \ ram_session_support.cc \ rom_session_component.cc \ @@ -14,7 +12,6 @@ SRC_CC = \ pd_session_component.cc \ io_mem_session_component.cc \ io_mem_session_support.cc \ - thread.cc \ thread_start.cc \ platform_thread.cc \ platform_pd.cc \ @@ -34,9 +31,12 @@ SRC_CC = \ context_area.cc \ echo.cc \ dump_alloc.cc \ - cpu_session_extension.cc + cpu_session_extension.cc \ + core_printf.cc \ + pager.cc INC_DIR = $(REP_DIR)/src/core/include \ + $(REP_DIR)/src/base/console \ $(GEN_CORE_DIR)/include vpath main.cc $(GEN_CORE_DIR) @@ -54,7 +54,8 @@ vpath core_mem_alloc.cc $(GEN_CORE_DIR) vpath dump_alloc.cc $(GEN_CORE_DIR) vpath platform_services.cc $(GEN_CORE_DIR)/x86 vpath context_area.cc $(GEN_CORE_DIR) +vpath core_printf.cc $(BASE_DIR)/src/base/console vpath %.cc $(REP_DIR)/src/core -vpath thread.cc $(BASE_DIR)/src/base/thread vpath cap_sel_alloc.cc $(REP_DIR)/src/base/env vpath main_thread.cc $(REP_DIR)/src/base/env +vpath pager.cc $(REP_DIR)/src/base/pager diff --git a/base-nova/src/test/cap_integrity/target.mk b/base-nova/src/test/cap_integrity/target.mk index 024b16ca49..edd745ba70 100644 --- a/base-nova/src/test/cap_integrity/target.mk +++ b/base-nova/src/test/cap_integrity/target.mk @@ -1,3 +1,3 @@ -TARGET = test-cap_integrity -SRC_CC = main.cc -LIBS = env +TARGET = test-cap_integrity +SRC_CC = main.cc +LIBS = base diff --git a/base-okl4/lib/mk/base-common.mk b/base-okl4/lib/mk/base-common.mk new file mode 100644 index 0000000000..78687ffe12 --- /dev/null +++ b/base-okl4/lib/mk/base-common.mk @@ -0,0 +1,28 @@ +# +# \brief Portions of base library shared by core and non-core processes +# \author Norman Feske +# \date 2013-02-14 +# + +LIBS += cxx 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 + +INC_DIR += $(REP_DIR)/src/base/lock + +vpath cap_copy.cc $(BASE_DIR)/src/platform +vpath %.cc $(BASE_DIR)/src/base +vpath %.cc $(REP_DIR)/src/base diff --git a/base-okl4/lib/mk/base.mk b/base-okl4/lib/mk/base.mk new file mode 100644 index 0000000000..8cd239238c --- /dev/null +++ b/base-okl4/lib/mk/base.mk @@ -0,0 +1,10 @@ +SRC_CC += console/log_console.cc +SRC_CC += env/env.cc env/context_area.cc env/reload_parent_cap.cc +SRC_CC += thread/thread.cc thread/thread_start.cc thread/thread_bootstrap.cc + +vpath %.cc $(REP_DIR)/src/base +vpath %.cc $(BASE_DIR)/src/base + +INC_DIR += $(BASE_DIR)/src/base/env + +LIBS += base-common diff --git a/base-okl4/lib/mk/bootinfo.mk b/base-okl4/lib/mk/boot_info.mk similarity index 100% rename from base-okl4/lib/mk/bootinfo.mk rename to base-okl4/lib/mk/boot_info.mk diff --git a/base-okl4/lib/mk/core_printf.mk b/base-okl4/lib/mk/core_printf.mk deleted file mode 100644 index 663cf64b90..0000000000 --- a/base-okl4/lib/mk/core_printf.mk +++ /dev/null @@ -1,5 +0,0 @@ -SRC_CC = core_printf.cc -LIBS = cxx console -INC_DIR += $(REP_DIR)/src/base/console - -vpath core_printf.cc $(BASE_DIR)/src/base/console diff --git a/base-okl4/lib/mk/ipc.mk b/base-okl4/lib/mk/ipc.mk deleted file mode 100644 index 282f5ab24c..0000000000 --- a/base-okl4/lib/mk/ipc.mk +++ /dev/null @@ -1,5 +0,0 @@ -SRC_CC = ipc.cc pager.cc ipc_marshal_cap.cc -LIBS = cap_copy - -vpath %.cc $(REP_DIR)/src/base/ipc -vpath ipc_marshal_cap.cc $(BASE_DIR)/src/base/ipc diff --git a/base-okl4/lib/mk/lock.mk b/base-okl4/lib/mk/lock.mk deleted file mode 100644 index a79c1d9a1a..0000000000 --- a/base-okl4/lib/mk/lock.mk +++ /dev/null @@ -1,4 +0,0 @@ -SRC_CC = lock.cc -INC_DIR += $(REP_DIR)/src/base/lock - -vpath lock.cc $(BASE_DIR)/src/base/lock diff --git a/base-okl4/lib/mk/pager.mk b/base-okl4/lib/mk/pager.mk deleted file mode 100644 index c22e66d224..0000000000 --- a/base-okl4/lib/mk/pager.mk +++ /dev/null @@ -1,3 +0,0 @@ -SRC_CC = pager.cc - -vpath pager.cc $(REP_DIR)/src/base/pager diff --git a/base-okl4/lib/mk/thread.mk b/base-okl4/lib/mk/thread.mk deleted file mode 100644 index 08888f1bc7..0000000000 --- a/base-okl4/lib/mk/thread.mk +++ /dev/null @@ -1,5 +0,0 @@ -SRC_CC = thread.cc thread_start.cc thread_bootstrap.cc - -vpath thread.cc $(BASE_DIR)/src/base/thread -vpath thread_start.cc $(BASE_DIR)/src/base/thread -vpath thread_bootstrap.cc $(REP_DIR)/src/base/thread diff --git a/base-okl4/lib/mk/x86/startup.mk b/base-okl4/lib/mk/x86/startup.mk deleted file mode 100644 index 78d4d7cea0..0000000000 --- a/base-okl4/lib/mk/x86/startup.mk +++ /dev/null @@ -1,8 +0,0 @@ -REQUIRES = okl4 x86 -LIBS = cxx lock -SRC_S = crt0.s -SRC_CC = _main.cc -INC_DIR += $(BASE_DIR)/src/platform $(REP_DIR)/src/platform - -vpath crt0.s $(dir $(call select_from_repositories,src/platform/x86_32/crt0.s)) -vpath _main.cc $(dir $(call select_from_repositories,src/platform/_main.cc)) diff --git a/base-okl4/mk/spec-okl4.mk b/base-okl4/mk/spec-okl4.mk index 067c7d14bb..c52d22d9d7 100644 --- a/base-okl4/mk/spec-okl4.mk +++ b/base-okl4/mk/spec-okl4.mk @@ -29,12 +29,6 @@ MAKEFLAGS += -L # INC_DIR += $(BUILD_BASE_DIR)/include -# -# Startup code to be used when building a program -# -STARTUP_LIB ?= startup -PRG_LIBS += $(STARTUP_LIB) - # # Define maximum number of threads, needed by the OKL4 kernel headers # diff --git a/base-okl4/src/core/target.inc b/base-okl4/src/core/target.inc index 0fc23acd07..b6d4699fc7 100644 --- a/base-okl4/src/core/target.inc +++ b/base-okl4/src/core/target.inc @@ -1,40 +1,43 @@ -TARGET = core -REQUIRES = okl4 -LIBS = cxx ipc heap core_printf child pager lock \ - raw_signal raw_server bootinfo child +TARGET = core + +LIBS += boot_info base-common GEN_CORE_DIR = $(BASE_DIR)/src/core -SRC_CC = main.cc \ - ram_session_component.cc \ - ram_session_support.cc \ - rom_session_component.cc \ - cpu_session_component.cc \ - cpu_session_support.cc \ - pd_session_component.cc \ - okl4_pd_session_component.cc \ - io_mem_session_component.cc \ - io_mem_session_support.cc \ - thread.cc \ - thread_start.cc \ - thread_bootstrap.cc \ - platform_thread.cc \ - platform_pd.cc \ - platform.cc \ - platform_services.cc \ - dataspace_component.cc \ - rm_session_component.cc \ - rm_session_support.cc \ - irq_session_component.cc \ - signal_session_component.cc \ - signal_source_component.cc \ - core_rm_session.cc \ - core_mem_alloc.cc \ - dump_alloc.cc \ - context_area.cc +SRC_CC += main.cc \ + ram_session_component.cc \ + ram_session_support.cc \ + rom_session_component.cc \ + cpu_session_component.cc \ + cpu_session_support.cc \ + pd_session_component.cc \ + okl4_pd_session_component.cc \ + io_mem_session_component.cc \ + io_mem_session_support.cc \ + thread.cc \ + thread_start.cc \ + thread_bootstrap.cc \ + platform_thread.cc \ + platform_pd.cc \ + platform.cc \ + platform_services.cc \ + dataspace_component.cc \ + rm_session_component.cc \ + rm_session_support.cc \ + irq_session_component.cc \ + signal_session_component.cc \ + signal_source_component.cc \ + core_rm_session.cc \ + core_mem_alloc.cc \ + core_printf.cc \ + dump_alloc.cc \ + context_area.cc -INC_DIR = $(REP_DIR)/src/core/include \ - $(GEN_CORE_DIR)/include +INC_DIR += $(REP_DIR)/src/core/include \ + $(GEN_CORE_DIR)/include \ + $(REP_DIR)/src/base/console \ + $(BASE_DIR)/src/platform \ + $(REP_DIR)/src/platform vpath main.cc $(GEN_CORE_DIR) vpath ram_session_component.cc $(GEN_CORE_DIR) @@ -54,3 +57,5 @@ vpath %.cc $(REP_DIR)/src/core vpath thread_bootstrap.cc $(REP_DIR)/src/base/thread vpath thread_start.cc $(BASE_DIR)/src/base/thread vpath thread.cc $(BASE_DIR)/src/base/thread +vpath core_printf.cc $(BASE_DIR)/src/base/console + diff --git a/base-okl4/src/core/x86/target.mk b/base-okl4/src/core/x86/target.mk index d88cf88755..362915b5b5 100644 --- a/base-okl4/src/core/x86/target.mk +++ b/base-okl4/src/core/x86/target.mk @@ -8,3 +8,5 @@ SRC_CC += io_port_session_component.cc \ vpath io_port_session_component.cc $(GEN_CORE_DIR)/x86 vpath platform_services.cc $(GEN_CORE_DIR)/x86 vpath platform_thread_x86.cc $(GEN_CORE_DIR)/x86 + +vpath crt0.s $(dir $(call select_from_repositories,src/platform/x86_32/crt0.s)) diff --git a/base-pistachio/lib/mk/base-common.mk b/base-pistachio/lib/mk/base-common.mk new file mode 100644 index 0000000000..f38c976010 --- /dev/null +++ b/base-pistachio/lib/mk/base-common.mk @@ -0,0 +1,29 @@ +# +# \brief Portions of base library shared by core and non-core processes +# \author Norman Feske +# \date 2013-02-14 +# + +LIBS += cxx 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 + +INC_DIR += $(REP_DIR)/src/base/lock + +vpath cap_copy.cc $(BASE_DIR)/src/platform +vpath %.cc $(REP_DIR)/src/base +vpath %.cc $(BASE_DIR)/src/base diff --git a/base-pistachio/lib/mk/base.mk b/base-pistachio/lib/mk/base.mk new file mode 100644 index 0000000000..2a22622393 --- /dev/null +++ b/base-pistachio/lib/mk/base.mk @@ -0,0 +1,16 @@ +# +# \brief Portions of base library that are exclusive to non-core processes +# \author Norman Feske +# \date 2013-02-14 +# + +LIBS += base-common + +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 + +vpath %.cc $(REP_DIR)/src/base +vpath %.cc $(BASE_DIR)/src/base diff --git a/base-pistachio/lib/mk/core_printf.mk b/base-pistachio/lib/mk/core_printf.mk deleted file mode 100644 index 663cf64b90..0000000000 --- a/base-pistachio/lib/mk/core_printf.mk +++ /dev/null @@ -1,5 +0,0 @@ -SRC_CC = core_printf.cc -LIBS = cxx console -INC_DIR += $(REP_DIR)/src/base/console - -vpath core_printf.cc $(BASE_DIR)/src/base/console diff --git a/base-pistachio/lib/mk/ipc.mk b/base-pistachio/lib/mk/ipc.mk deleted file mode 100644 index 6ba207822a..0000000000 --- a/base-pistachio/lib/mk/ipc.mk +++ /dev/null @@ -1,8 +0,0 @@ -SRC_CC = ipc.cc pager.cc ipc_marshal_cap.cc -LIBS = cap_copy - -# disable warning about array boundaries, caused by L4 headers -CC_WARN = -Wall -Wno-array-bounds - -vpath %.cc $(REP_DIR)/src/base/ipc -vpath ipc_marshal_cap.cc $(BASE_DIR)/src/base/ipc diff --git a/base-pistachio/lib/mk/kip.mk b/base-pistachio/lib/mk/kip.mk deleted file mode 100644 index 53fbf85b9e..0000000000 --- a/base-pistachio/lib/mk/kip.mk +++ /dev/null @@ -1,5 +0,0 @@ -REQUIRES = pistachio -SRC_CC = kip.cc -LIBS = cxx - -vpath %.cc $(REP_DIR)/src/base/kip diff --git a/base-pistachio/lib/mk/lock.mk b/base-pistachio/lib/mk/lock.mk deleted file mode 100644 index a79c1d9a1a..0000000000 --- a/base-pistachio/lib/mk/lock.mk +++ /dev/null @@ -1,4 +0,0 @@ -SRC_CC = lock.cc -INC_DIR += $(REP_DIR)/src/base/lock - -vpath lock.cc $(BASE_DIR)/src/base/lock diff --git a/base-pistachio/lib/mk/pager.mk b/base-pistachio/lib/mk/pager.mk deleted file mode 100644 index 1c3f6ed1a3..0000000000 --- a/base-pistachio/lib/mk/pager.mk +++ /dev/null @@ -1,3 +0,0 @@ -SRC_CC = pager.cc - -vpath pager.cc $(REP_DIR)/src/base/pager diff --git a/base-pistachio/lib/mk/x86/startup.mk b/base-pistachio/lib/mk/x86/startup.mk deleted file mode 100644 index 8cf5e4f086..0000000000 --- a/base-pistachio/lib/mk/x86/startup.mk +++ /dev/null @@ -1,8 +0,0 @@ -REQUIRES = pistachio x86 -LIBS = cxx lock -SRC_S = crt0.s -SRC_CC = _main.cc -INC_DIR += $(BASE_DIR)/src/platform $(REP_DIR)/src/platform - -vpath crt0.s $(dir $(call select_from_repositories,src/platform/x86_32/crt0.s)) -vpath _main.cc $(dir $(call select_from_repositories,src/platform/_main.cc)) diff --git a/base-pistachio/mk/spec-pistachio.mk b/base-pistachio/mk/spec-pistachio.mk index 6e5603ea19..1b896972f2 100644 --- a/base-pistachio/mk/spec-pistachio.mk +++ b/base-pistachio/mk/spec-pistachio.mk @@ -22,12 +22,6 @@ INC_DIR += $(PISTACHIO_USER_BUILD_DIR)/include # REP_INC_DIR += include/pistachio -# -# Startup code to be used when building a program -# -STARTUP_LIB ?= startup -PRG_LIBS += $(STARTUP_LIB) - # # Linker options # diff --git a/base-pistachio/src/core/target.inc b/base-pistachio/src/core/target.inc index 7cf7063531..4b146b8fe2 100644 --- a/base-pistachio/src/core/target.inc +++ b/base-pistachio/src/core/target.inc @@ -1,7 +1,6 @@ TARGET = core REQUIRES = pistachio -LIBS = cxx ipc heap core_printf child pager lock \ - raw_signal raw_server kip +LIBS = base-common GEN_CORE_DIR = $(BASE_DIR)/src/core @@ -15,9 +14,7 @@ SRC_CC = main.cc \ pd_session_component.cc \ io_mem_session_component.cc \ io_mem_session_support.cc \ - thread.cc \ thread_start.cc \ - thread_bootstrap.cc \ platform_thread.cc \ platform_pd.cc \ platform.cc \ @@ -29,9 +26,12 @@ SRC_CC = main.cc \ signal_session_component.cc \ signal_source_component.cc \ dump_alloc.cc \ - context_area.cc + context_area.cc \ + core_printf.cc \ + kip.cc INC_DIR += $(REP_DIR)/src/core/include \ + $(REP_DIR)/src/base/console \ $(GEN_CORE_DIR)/include vpath main.cc $(GEN_CORE_DIR) @@ -47,6 +47,6 @@ vpath signal_source_component.cc $(GEN_CORE_DIR) vpath dataspace_component.cc $(GEN_CORE_DIR) vpath dump_alloc.cc $(GEN_CORE_DIR) vpath context_area.cc $(GEN_CORE_DIR) -vpath thread_bootstrap.cc $(BASE_DIR)/src/base/thread -vpath thread.cc $(BASE_DIR)/src/base/thread +vpath core_printf.cc $(BASE_DIR)/src/base/console +vpath kip.cc $(REP_DIR)/src/base/kip vpath %.cc $(REP_DIR)/src/core diff --git a/base/lib/mk/allocator_avl.mk b/base/lib/mk/allocator_avl.mk deleted file mode 100644 index 2d339fc668..0000000000 --- a/base/lib/mk/allocator_avl.mk +++ /dev/null @@ -1,4 +0,0 @@ -SRC_CC = allocator_avl.cc -LIBS = slab avl_tree - -vpath % $(REP_DIR)/src/base/allocator diff --git a/base/lib/mk/arm/startup.mk b/base/lib/mk/arm/startup.mk new file mode 100644 index 0000000000..f8d8d03973 --- /dev/null +++ b/base/lib/mk/arm/startup.mk @@ -0,0 +1,3 @@ +include $(BASE_DIR)/lib/mk/startup.inc + +vpath crt0.s $(BASE_DIR)/src/platform/arm diff --git a/base/lib/mk/avl_tree.mk b/base/lib/mk/avl_tree.mk deleted file mode 100644 index bc0f3037eb..0000000000 --- a/base/lib/mk/avl_tree.mk +++ /dev/null @@ -1,3 +0,0 @@ -SRC_CC = avl_tree.cc - -vpath %.cc $(REP_DIR)/src/base/avl_tree diff --git a/base/lib/mk/cap_copy.mk b/base/lib/mk/cap_copy.mk deleted file mode 100644 index 7282125a6d..0000000000 --- a/base/lib/mk/cap_copy.mk +++ /dev/null @@ -1,3 +0,0 @@ -SRC_CC = cap_copy.cc - -vpath cap_copy.cc $(BASE_DIR)/src/platform diff --git a/base/lib/mk/child.mk b/base/lib/mk/child.mk deleted file mode 100644 index f868b0daa8..0000000000 --- a/base/lib/mk/child.mk +++ /dev/null @@ -1,4 +0,0 @@ -SRC_CC = child.cc -LIBS += process - -vpath child.cc $(REP_DIR)/src/base/child diff --git a/base/lib/mk/console.mk b/base/lib/mk/console.mk deleted file mode 100644 index 3df277d4b4..0000000000 --- a/base/lib/mk/console.mk +++ /dev/null @@ -1,3 +0,0 @@ -SRC_CC = console.cc - -vpath %.cc $(REP_DIR)/src/base/console diff --git a/base/lib/mk/cxx.mk b/base/lib/mk/cxx.mk index 2185c7c389..ffe5a045e5 100644 --- a/base/lib/mk/cxx.mk +++ b/base/lib/mk/cxx.mk @@ -1,4 +1,3 @@ -LIBS = allocator_avl CXX_SRC_CC += misc.cc new_delete.cc malloc_free.cc exception.cc guard.cc unwind.cc vpath %.cc $(BASE_DIR)/src/base/cxx diff --git a/base/lib/mk/elf.mk b/base/lib/mk/elf.mk deleted file mode 100644 index 0d6f828b85..0000000000 --- a/base/lib/mk/elf.mk +++ /dev/null @@ -1,3 +0,0 @@ -SRC_CC = elf_binary.cc - -vpath % $(REP_DIR)/src/base/elf diff --git a/base/lib/mk/env.mk b/base/lib/mk/env.mk deleted file mode 100644 index 3a01cf0d83..0000000000 --- a/base/lib/mk/env.mk +++ /dev/null @@ -1,7 +0,0 @@ -SRC_CC = env.cc context_area.cc reload_parent_cap.cc -LIBS = ipc heap log_console lock -INC_DIR += $(BASE_DIR)/src/base/env - -vpath env.cc $(REP_DIR)/src/base/env -vpath context_area.cc $(BASE_DIR)/src/base/env -vpath reload_parent_cap.cc $(BASE_DIR)/src/base/env diff --git a/base/lib/mk/heap.mk b/base/lib/mk/heap.mk deleted file mode 100644 index bfb490471a..0000000000 --- a/base/lib/mk/heap.mk +++ /dev/null @@ -1,4 +0,0 @@ -SRC_CC = heap.cc sliced_heap.cc -LIBS = allocator_avl - -vpath %.cc $(REP_DIR)/src/base/heap diff --git a/base/lib/mk/host/cxx.mk b/base/lib/mk/host/cxx.mk deleted file mode 100644 index 4a410956a9..0000000000 --- a/base/lib/mk/host/cxx.mk +++ /dev/null @@ -1,3 +0,0 @@ -SRC_CC = new_delete.cc - -vpath new_delete.cc $(REP_DIR)/src/base/cxx diff --git a/base/lib/mk/log_console.mk b/base/lib/mk/log_console.mk deleted file mode 100644 index 9cd2ea2424..0000000000 --- a/base/lib/mk/log_console.mk +++ /dev/null @@ -1,4 +0,0 @@ -SRC_CC = log_console.cc -LIBS = console - -vpath log_console.cc $(REP_DIR)/src/base/console diff --git a/base/lib/mk/process.mk b/base/lib/mk/process.mk deleted file mode 100644 index e51576aa4f..0000000000 --- a/base/lib/mk/process.mk +++ /dev/null @@ -1,4 +0,0 @@ -SRC_CC = process.cc -LIBS = elf - -vpath process.cc $(REP_DIR)/src/base/process diff --git a/base/lib/mk/raw_server.mk b/base/lib/mk/raw_server.mk deleted file mode 100644 index 744098113b..0000000000 --- a/base/lib/mk/raw_server.mk +++ /dev/null @@ -1,3 +0,0 @@ -SRC_CC = server.cc common.cc - -vpath %.cc $(REP_DIR)/src/base/server diff --git a/base/lib/mk/raw_signal.mk b/base/lib/mk/raw_signal.mk deleted file mode 100644 index 6e08dee0fc..0000000000 --- a/base/lib/mk/raw_signal.mk +++ /dev/null @@ -1,3 +0,0 @@ -SRC_CC = signal.cc - -vpath signal.cc $(REP_DIR)/src/base/signal diff --git a/base/lib/mk/server.mk b/base/lib/mk/server.mk deleted file mode 100644 index de155386ef..0000000000 --- a/base/lib/mk/server.mk +++ /dev/null @@ -1,3 +0,0 @@ -LIBS = thread - -include $(REP_DIR)/lib/mk/raw_server.mk diff --git a/base/lib/mk/signal.mk b/base/lib/mk/signal.mk deleted file mode 100644 index b778fcbf32..0000000000 --- a/base/lib/mk/signal.mk +++ /dev/null @@ -1,3 +0,0 @@ -include $(BASE_DIR)/lib/mk/raw_signal.mk - -LIBS += thread diff --git a/base/lib/mk/slab.mk b/base/lib/mk/slab.mk deleted file mode 100644 index c49922a2d5..0000000000 --- a/base/lib/mk/slab.mk +++ /dev/null @@ -1,3 +0,0 @@ -SRC_CC = slab.cc - -vpath % $(REP_DIR)/src/base/allocator diff --git a/base/lib/mk/startup.inc b/base/lib/mk/startup.inc new file mode 100644 index 0000000000..b984a43699 --- /dev/null +++ b/base/lib/mk/startup.inc @@ -0,0 +1,6 @@ +SRC_S += crt0.s +SRC_CC += _main.cc + +REP_INC_DIR += src/platform + +vpath _main.cc $(BASE_DIR)/src/platform diff --git a/base/lib/mk/syscall.mk b/base/lib/mk/syscall.mk index 055ce220b5..9916d81e35 100644 --- a/base/lib/mk/syscall.mk +++ b/base/lib/mk/syscall.mk @@ -1,6 +1,4 @@ # -# This file is placeholder to enable generic targets to specify the syscall -# library at the 'LIBS' declaration, even on platforms where no such library -# exists. This is done by DDE Kit for reusing the spinlock implementation of -# the base repository. +# Pseudo syscall library used on platforms that do not need a library for +# providing syscall bindings. # diff --git a/base/lib/mk/thread.mk b/base/lib/mk/thread.mk deleted file mode 100644 index 0dfb937d60..0000000000 --- a/base/lib/mk/thread.mk +++ /dev/null @@ -1,3 +0,0 @@ -SRC_CC = thread.cc thread_start.cc thread_bootstrap.cc - -vpath %.cc $(BASE_DIR)/src/base/thread diff --git a/base/lib/mk/x86_32/startup.mk b/base/lib/mk/x86_32/startup.mk new file mode 100644 index 0000000000..7d83d37d59 --- /dev/null +++ b/base/lib/mk/x86_32/startup.mk @@ -0,0 +1,3 @@ +include $(BASE_DIR)/lib/mk/startup.inc + +vpath crt0.s $(BASE_DIR)/src/platform/x86_32 diff --git a/base/lib/mk/x86_64/startup.mk b/base/lib/mk/x86_64/startup.mk new file mode 100644 index 0000000000..614d4f453c --- /dev/null +++ b/base/lib/mk/x86_64/startup.mk @@ -0,0 +1,3 @@ +include $(BASE_DIR)/lib/mk/startup.inc + +vpath crt0.s $(BASE_DIR)/src/platform/x86_64 diff --git a/base/mk/base-libs.mk b/base/mk/base-libs.mk index fa84aafbc8..58c01c5e60 100644 --- a/base/mk/base-libs.mk +++ b/base/mk/base-libs.mk @@ -4,9 +4,7 @@ # These linked against 'ldso' and filtered out for dynamically # linked binaries # -BASE_LIBS = alarm allocator_avl avl_tree cxx env heap \ - ipc lock slab timed_semaphore thread signal \ - log_console slab cap_copy +BASE_LIBS = base-common base cxx timed_semaphore alarm # # Name of Genode's dynamic linker diff --git a/base/mk/lib.mk b/base/mk/lib.mk index e22fe8a77c..018520dd3c 100644 --- a/base/mk/lib.mk +++ b/base/mk/lib.mk @@ -124,6 +124,15 @@ $(LIB_A): $(OBJECTS) $(MSG_MERGE)$(LIB_A) $(VERBOSE)$(AR) -rc $@ $(OBJECTS) +# +# Prevent linkage of startup code against shared libraries except for ld.lib.so +# +ifdef SHARED_LIB +ifneq ($(LIB),ld) +override DEPS := $(filter-out startup.lib,$(DEPS)) +endif +endif + # # The 'sort' is needed to ensure the same link order regardless # of the find order, which uses to vary among different systems. diff --git a/base/mk/prg.mk b/base/mk/prg.mk index 2ffe23499d..e97e8ffe4c 100644 --- a/base/mk/prg.mk +++ b/base/mk/prg.mk @@ -143,15 +143,13 @@ STATIC_LIBS := $(foreach l,$(FILTER_DEPS),$(LIB_CACHE_DIR)/$l/$l.lib.a) STATIC_LIBS := $(sort $(wildcard $(STATIC_LIBS))) # -# For hybrid Linux/Genode programs, prevent the linkage of the normal thread -# library. Because such programs use the glibc, we map Genode's thread API -# to 'pthreads' instead to improve inter-operability with native Linux -# libraries. Furthermore, we do not need Genode's cxx library for such -# programs because the cxx functionality is already provided by the glibc. +# For hybrid Linux/Genode programs, prevent the linkage Genode's cxx, base, +# and startup libraries because these functionalities are covered by the glibc +# or by 'src/platform/lx_hybrid.cc'. # ifeq ($(USE_HOST_LD_SCRIPT),yes) STATIC_LIBS := $(filter-out $(LIB_CACHE_DIR)/startup/startup.lib.a, $(STATIC_LIBS)) -STATIC_LIBS := $(filter-out $(LIB_CACHE_DIR)/thread/thread.lib.a, $(STATIC_LIBS)) +STATIC_LIBS := $(filter-out $(LIB_CACHE_DIR)/base/base.lib.a, $(STATIC_LIBS)) STATIC_LIBS := $(filter-out $(LIB_CACHE_DIR)/cxx/cxx.lib.a, $(STATIC_LIBS)) endif diff --git a/base/src/base/thread/thread_bootstrap.cc b/base/src/base/thread/thread_bootstrap_empty.cc similarity index 100% rename from base/src/base/thread/thread_bootstrap.cc rename to base/src/base/thread/thread_bootstrap_empty.cc diff --git a/base/src/test/ada/target.mk b/base/src/test/ada/target.mk index 25e10633fb..7ea2e80f2e 100644 --- a/base/src/test/ada/target.mk +++ b/base/src/test/ada/target.mk @@ -2,4 +2,4 @@ TARGET = test-ada REQUIRES = gnat SRC_ADA = main.adb SRC_CC = add.cc startup.cc -LIBS = env cxx +LIBS = base diff --git a/base/src/test/cap_integrity/target.mk b/base/src/test/cap_integrity/target.mk index 024b16ca49..edd745ba70 100644 --- a/base/src/test/cap_integrity/target.mk +++ b/base/src/test/cap_integrity/target.mk @@ -1,3 +1,3 @@ -TARGET = test-cap_integrity -SRC_CC = main.cc -LIBS = env +TARGET = test-cap_integrity +SRC_CC = main.cc +LIBS = base diff --git a/base/src/test/ds_ownership/target.mk b/base/src/test/ds_ownership/target.mk index 562d33f381..1592f2ea8f 100644 --- a/base/src/test/ds_ownership/target.mk +++ b/base/src/test/ds_ownership/target.mk @@ -1,3 +1,3 @@ -TARGET = test-ds_ownership -SRC_CC = main.cc -LIBS = env thread +TARGET = test-ds_ownership +SRC_CC = main.cc +LIBS = base diff --git a/base/src/test/printf/target.mk b/base/src/test/printf/target.mk index 3bcfb4eb36..103e3a5bcb 100644 --- a/base/src/test/printf/target.mk +++ b/base/src/test/printf/target.mk @@ -1,3 +1,3 @@ -TARGET = test-printf -SRC_CC = main.cc -LIBS = env +TARGET = test-printf +SRC_CC = main.cc +LIBS = base diff --git a/base/src/test/rm_fault/target.mk b/base/src/test/rm_fault/target.mk index f9a4708d8c..9abb1b219d 100644 --- a/base/src/test/rm_fault/target.mk +++ b/base/src/test/rm_fault/target.mk @@ -1,3 +1,3 @@ TARGET = test-rmfault SRC_CC = main.cc -LIBS = cxx env server signal child +LIBS = base diff --git a/base/src/test/rm_nested/target.mk b/base/src/test/rm_nested/target.mk index 68f4614f86..4e385cc5c0 100644 --- a/base/src/test/rm_nested/target.mk +++ b/base/src/test/rm_nested/target.mk @@ -1,4 +1,4 @@ TARGET = test-rmnested REQUIRES = experimental SRC_CC = main.cc -LIBS = cxx env thread signal +LIBS = base diff --git a/base/src/test/segfault/target.mk b/base/src/test/segfault/target.mk index 9294fe3e9c..1153d546b2 100644 --- a/base/src/test/segfault/target.mk +++ b/base/src/test/segfault/target.mk @@ -1,3 +1,3 @@ TARGET = test-segfault SRC_CC = main.cc -LIBS = cxx env +LIBS = base diff --git a/base/src/test/sub_rm/target.mk b/base/src/test/sub_rm/target.mk index c76642aa66..977c857a49 100644 --- a/base/src/test/sub_rm/target.mk +++ b/base/src/test/sub_rm/target.mk @@ -1,6 +1,6 @@ TARGET = test-sub_rm SRC_CC = main.cc -LIBS = env cxx +LIBS = base # find 'config.h' depending on the current platform REP_INC_DIR += src/test/sub_rm diff --git a/base/src/test/util_mmio/target.mk b/base/src/test/util_mmio/target.mk index 2bbb0a9da7..230b6c25f6 100644 --- a/base/src/test/util_mmio/target.mk +++ b/base/src/test/util_mmio/target.mk @@ -11,4 +11,4 @@ TARGET = test-util_mmio SRC_CC += main.cc # Add libraries -LIBS += cxx env thread +LIBS += base diff --git a/dde_ipxe/src/drivers/nic/target.mk b/dde_ipxe/src/drivers/nic/target.mk index 30a700d968..c9e78f17de 100644 --- a/dde_ipxe/src/drivers/nic/target.mk +++ b/dde_ipxe/src/drivers/nic/target.mk @@ -1,3 +1,3 @@ -TARGET := nic_drv -LIBS := cxx env signal server dde_ipxe_nic -SRC_CC = main.cc +TARGET = nic_drv +LIBS = dde_ipxe_nic +SRC_CC = main.cc diff --git a/dde_linux/src/drivers/usb/target.mk b/dde_linux/src/drivers/usb/target.mk index 85b612fab1..e2d3613067 100644 --- a/dde_linux/src/drivers/usb/target.mk +++ b/dde_linux/src/drivers/usb/target.mk @@ -1,5 +1,5 @@ TARGET = usb_drv -LIBS = cxx env dde_kit server libc-setjmp signal +LIBS = dde_kit libc-setjmp SRC_CC = main.cc lx_emul.cc irq.cc timer.cc event.cc storage.cc \ input_component.cc nic.cc SRC_C = dummies.c scsi.c evdev.c diff --git a/dde_oss/src/drivers/oss/target.mk b/dde_oss/src/drivers/oss/target.mk index df650d1289..189fd52ec7 100644 --- a/dde_oss/src/drivers/oss/target.mk +++ b/dde_oss/src/drivers/oss/target.mk @@ -1,6 +1,6 @@ TARGET = oss_drv REQUIRES = x86_32 -LIBS = cxx env dde_kit signal server +LIBS = dde_kit CONTRIB_DIR = $(REP_DIR)/contrib diff --git a/demo/lib/mk/launchpad.mk b/demo/lib/mk/launchpad.mk index 6b2ded4454..5fd8a31f1a 100644 --- a/demo/lib/mk/launchpad.mk +++ b/demo/lib/mk/launchpad.mk @@ -1,4 +1,4 @@ -LIBS = child signal +LIBS = base SRC_CC = launchpad.cc vpath launchpad.cc $(REP_DIR)/src/lib/launchpad diff --git a/demo/lib/mk/scout_widgets.mk b/demo/lib/mk/scout_widgets.mk index 4863926aba..4126d6eea2 100644 --- a/demo/lib/mk/scout_widgets.mk +++ b/demo/lib/mk/scout_widgets.mk @@ -1,4 +1,4 @@ -LIBS = cxx env ipc server blit signal +LIBS = base blit SRC_CC = sky_texture.cc startup.cc \ elements.cc widgets.cc \ diff --git a/demo/src/app/backdrop/target.mk b/demo/src/app/backdrop/target.mk index 1d7e3a8cd4..99f8448d71 100644 --- a/demo/src/app/backdrop/target.mk +++ b/demo/src/app/backdrop/target.mk @@ -1,4 +1,4 @@ TARGET = backdrop SRC_CC = main.cc -LIBS = cxx env libpng_static libz_static mini_c +LIBS = base libpng_static libz_static mini_c CC_OPT += -DPNG_USER_CONFIG diff --git a/demo/src/lib/libpng/target.mk b/demo/src/lib/libpng/target.mk index 317818db74..5634026037 100644 --- a/demo/src/lib/libpng/target.mk +++ b/demo/src/lib/libpng/target.mk @@ -4,4 +4,4 @@ INC_DIR = $(REP_DIR)/include/libpng \ $(REP_DIR)/include/mini_c \ $(REP_DIR)/include/libz CC_OPT += -DPNG_USER_CONFIG -LIBS = cxx env libpng_static libz_static mini_c +LIBS = base libpng_static libz_static mini_c diff --git a/demo/src/server/liquid_framebuffer/target.mk b/demo/src/server/liquid_framebuffer/target.mk index 08072028e1..5678711021 100644 --- a/demo/src/server/liquid_framebuffer/target.mk +++ b/demo/src/server/liquid_framebuffer/target.mk @@ -1,5 +1,5 @@ TARGET = liquid_fb -LIBS = scout_widgets signal +LIBS = scout_widgets SRC_CC = main.cc services.cc INC_DIR += $(REP_DIR)/src/app/scout/include \ $(REP_DIR)/src/app/scout/include/genode \ diff --git a/demo/src/server/nitlog/target.mk b/demo/src/server/nitlog/target.mk index 44e5cd10b8..59ce45c086 100644 --- a/demo/src/server/nitlog/target.mk +++ b/demo/src/server/nitlog/target.mk @@ -1,5 +1,5 @@ TARGET = nitlog -LIBS = cxx env server blit signal +LIBS = base blit SRC_CC = main.cc SRC_BIN = mono.tff INC_DIR = $(REP_DIR)/src/server/nitpicker/include diff --git a/gems/src/server/d3m/target.mk b/gems/src/server/d3m/target.mk index 9c7e7eaf07..f9a0c63729 100644 --- a/gems/src/server/d3m/target.mk +++ b/gems/src/server/d3m/target.mk @@ -1,4 +1,4 @@ TARGET = d3m SRC_CC = main.cc -LIBS = cxx env signal server child +LIBS = base INC_DIR += $(PRG_DIR) diff --git a/gems/src/server/http_block/target.mk b/gems/src/server/http_block/target.mk index 067a072631..8fbbe750c8 100644 --- a/gems/src/server/http_block/target.mk +++ b/gems/src/server/http_block/target.mk @@ -1,5 +1,4 @@ TARGET = http_block SRC_CC = main.cc http.cc - -LIBS = signal server cxx env lwip libc +LIBS = lwip libc diff --git a/gems/src/server/tcp_terminal/target.mk b/gems/src/server/tcp_terminal/target.mk index fe60b844c2..302077dda3 100644 --- a/gems/src/server/tcp_terminal/target.mk +++ b/gems/src/server/tcp_terminal/target.mk @@ -1,3 +1,3 @@ TARGET = tcp_terminal SRC_CC = main.cc -LIBS = env cxx server libc libc_lwip_nic_dhcp libc_log libc_lock_pipe +LIBS = libc libc_lwip_nic_dhcp libc_log libc_lock_pipe diff --git a/gems/src/server/terminal/target.mk b/gems/src/server/terminal/target.mk index 23920849a5..46b6e93be2 100644 --- a/gems/src/server/terminal/target.mk +++ b/gems/src/server/terminal/target.mk @@ -1,4 +1,4 @@ TARGET = terminal -LIBS = cxx env server signal SRC_CC = main.cc +LIBS = base SRC_BIN = $(notdir $(wildcard $(PRG_DIR)/*.tff)) diff --git a/gems/src/test/terminal_decoder/target.mk b/gems/src/test/terminal_decoder/target.mk index 0a87601f7f..d5d9cd7926 100644 --- a/gems/src/test/terminal_decoder/target.mk +++ b/gems/src/test/terminal_decoder/target.mk @@ -1,4 +1,4 @@ TARGET = test-terminal_decoder SRC_CC = main.cc SRC_BIN = vim.vt -LIBS = cxx env +LIBS = base diff --git a/hello_tutorial/doc/hello_tutorial.txt b/hello_tutorial/doc/hello_tutorial.txt index 151ec7e2c5..a5fbf47d60 100644 --- a/hello_tutorial/doc/hello_tutorial.txt +++ b/hello_tutorial/doc/hello_tutorial.txt @@ -246,7 +246,7 @@ create a 'target.mk' file in 'src/hello/server': ! TARGET = hello_server ! SRC_CC = main.cc -! LIBS = cxx env server +! LIBS = base To tell the init process to start the new program, we have to add the following entry to Init's 'config' file, which is located at 'build/bin/config'. @@ -389,7 +389,7 @@ Add a 'target.mk' file with the following content to 'src/hello/client/': ! TARGET = hello_client ! SRC_CC = main.cc -! LIBS = cxx env +! LIBS = base Add the following entries to your 'config' file: diff --git a/hello_tutorial/src/hello/client/target.mk b/hello_tutorial/src/hello/client/target.mk index 173d307fbe..3d69e29424 100644 --- a/hello_tutorial/src/hello/client/target.mk +++ b/hello_tutorial/src/hello/client/target.mk @@ -1,3 +1,3 @@ TARGET = hello_client SRC_CC = main.cc -LIBS = cxx env +LIBS = base diff --git a/hello_tutorial/src/hello/server/target.mk b/hello_tutorial/src/hello/server/target.mk index a005e0afae..22a0ce6f25 100644 --- a/hello_tutorial/src/hello/server/target.mk +++ b/hello_tutorial/src/hello/server/target.mk @@ -1,3 +1,3 @@ TARGET = hello_server SRC_CC = main.cc -LIBS = cxx env server +LIBS = base diff --git a/libports/lib/import/import-libc.mk b/libports/lib/import/import-libc.mk index 142247e022..8dd614f79c 100644 --- a/libports/lib/import/import-libc.mk +++ b/libports/lib/import/import-libc.mk @@ -49,3 +49,14 @@ CC_OPT += -D__FreeBSD__=8 # or 'sincosf', which is a GNU extension, not provided by our libc. # CC_OPT += -fno-builtin-sin -fno-builtin-cos -fno-builtin-sinf -fno-builtin-cosf + +# +# Automatically add the base library for targets that use the libc +# +# We test for an empty 'LIB_MK' variable to determine whether we are currently +# processing a library or a target. We only want to add the base library to +# targets, not libraries. +# +ifeq ($(LIB_MK),) +LIBS += base +endif diff --git a/libports/lib/mk/ffat_block.mk b/libports/lib/mk/ffat_block.mk index 3a2e5d6c3d..863b2465a1 100644 --- a/libports/lib/mk/ffat_block.mk +++ b/libports/lib/mk/ffat_block.mk @@ -7,7 +7,7 @@ INC_DIR += $(REP_DIR)/src/lib/ffat/contrib SRC_C = ff.c ccsbcs.c SRC_CC = diskio_block.cc -LIBS = signal +LIBS = base vpath % $(REP_DIR)/src/lib/ffat/ vpath % $(REP_DIR)/contrib/ff007e/src diff --git a/libports/lib/mk/libc.mk b/libports/lib/mk/libc.mk index 0e29dc0105..ff3bcf0f93 100644 --- a/libports/lib/mk/libc.mk +++ b/libports/lib/mk/libc.mk @@ -4,7 +4,7 @@ LIBS = libc-string libc-locale libc-stdlib libc-stdio libc-gen libc-gdtoa \ libc-inet libc-stdtime libc-regex libc-compat libc-setjmp -LIBS += timed_semaphore cxx +LIBS += base # # Back end diff --git a/libports/lib/mk/lwip.mk b/libports/lib/mk/lwip.mk index f4d2b8b52d..e821d0ef8a 100644 --- a/libports/lib/mk/lwip.mk +++ b/libports/lib/mk/lwip.mk @@ -25,7 +25,7 @@ SRC_C += err.c api_lib.c api_msg.c netbuf.c netdb.c netifapi.c sockets.c \ # Network interface files SRC_C += etharp.c -LIBS = thread cxx alarm signal libc timed_semaphore +LIBS = alarm libc timed_semaphore D_OPTS = ERRNO D_OPTS := $(addprefix -D,$(D_OPTS)) diff --git a/libports/src/lib/gallium/i915/target.mk b/libports/src/lib/gallium/i915/target.mk index 703d8a0757..2a1b0320bb 100644 --- a/libports/src/lib/gallium/i915/target.mk +++ b/libports/src/lib/gallium/i915/target.mk @@ -1,6 +1,6 @@ TARGET = gallium-i915 REQUIRES = i915 -LIBS = gallium-aux gallium-i915 +LIBS = base gallium-aux gallium-i915 SRC_CC = main.cc vpath main.cc $(PRG_DIR)/.. diff --git a/libports/src/server/ffat_fs/target.mk b/libports/src/server/ffat_fs/target.mk index 5fc1b0d3b2..bea2bf85b2 100644 --- a/libports/src/server/ffat_fs/target.mk +++ b/libports/src/server/ffat_fs/target.mk @@ -1,4 +1,4 @@ TARGET = ffat_fs SRC_CC = main.cc -LIBS = cxx env server signal ffat_block +LIBS = base ffat_block INC_DIR += $(PRG_DIR) diff --git a/libports/src/test/ldso/target.mk b/libports/src/test/ldso/target.mk index b8d5c3184d..dfa9b3b79d 100644 --- a/libports/src/test/ldso/target.mk +++ b/libports/src/test/ldso/target.mk @@ -1,4 +1,4 @@ SRC_CC = main.cc TARGET = test-ldso -LIBS = test-ldso libc libm +LIBS = test-ldso base libc libm INC_DIR += $(REP_DIR)/src/test/ldso/include diff --git a/libports/src/test/libc/target.mk b/libports/src/test/libc/target.mk index 9787e0d516..633b5c2f47 100644 --- a/libports/src/test/libc/target.mk +++ b/libports/src/test/libc/target.mk @@ -1,3 +1,3 @@ TARGET = test-libc SRC_CC = main.cc -LIBS = cxx env libm libc libc_log +LIBS = libm libc libc_log diff --git a/libports/src/test/libc_ffat/target.mk b/libports/src/test/libc_ffat/target.mk index a21989e258..6e81ebb6cb 100644 --- a/libports/src/test/libc_ffat/target.mk +++ b/libports/src/test/libc_ffat/target.mk @@ -1,3 +1,3 @@ TARGET = test-libc_ffat -LIBS = cxx env libc libc_log libc_ffat +LIBS = libc libc_log libc_ffat SRC_CC = main.cc diff --git a/libports/src/test/libc_fs/target.mk b/libports/src/test/libc_fs/target.mk index b831b5595a..c550ca161d 100644 --- a/libports/src/test/libc_fs/target.mk +++ b/libports/src/test/libc_fs/target.mk @@ -1,5 +1,5 @@ TARGET = test-libc_fs -LIBS = cxx env libc libc_log libc_fs +LIBS = libc libc_log libc_fs SRC_CC = main.cc # we re-use the libc_ffat test diff --git a/libports/src/test/libc_fs_tar_fs/target.mk b/libports/src/test/libc_fs_tar_fs/target.mk index 3f435dc638..f2bd5821e7 100644 --- a/libports/src/test/libc_fs_tar_fs/target.mk +++ b/libports/src/test/libc_fs_tar_fs/target.mk @@ -1,3 +1,3 @@ TARGET = test-libc_fs_tar_fs -LIBS = cxx env libc libc_log libc_fs +LIBS = libc libc_log libc_fs SRC_CC = main.cc diff --git a/libports/src/test/libc_resolv/target.mk b/libports/src/test/libc_resolv/target.mk index e250962904..f28e4bb0c3 100644 --- a/libports/src/test/libc_resolv/target.mk +++ b/libports/src/test/libc_resolv/target.mk @@ -1,3 +1,3 @@ TARGET = test-libc_resolv SRC_CC = main.cc -LIBS = cxx env libc libc_resolv +LIBS = libc libc_resolv diff --git a/libports/src/test/libports/freetype/target.mk b/libports/src/test/libports/freetype/target.mk index 27ef359141..8cd63f460e 100644 --- a/libports/src/test/libports/freetype/target.mk +++ b/libports/src/test/libports/freetype/target.mk @@ -1,5 +1,5 @@ TARGET = test-freetype -LIBS = cxx env freetype +LIBS = libc freetype SRC_CC = main.cc vpath main.cc $(PRG_DIR)/.. diff --git a/libports/src/test/libports/gmp/target.mk b/libports/src/test/libports/gmp/target.mk index d81cabe4ef..ca96ffb4d9 100644 --- a/libports/src/test/libports/gmp/target.mk +++ b/libports/src/test/libports/gmp/target.mk @@ -1,5 +1,5 @@ TARGET = test-gmp -LIBS = cxx env gmp +LIBS = libc gmp SRC_CC = main.cc # The gmp.lib by now only compiles for 32-bit so we have to mind that diff --git a/libports/src/test/libports/jbig2dec/target.mk b/libports/src/test/libports/jbig2dec/target.mk index d34a5d8e3e..a9905c1993 100644 --- a/libports/src/test/libports/jbig2dec/target.mk +++ b/libports/src/test/libports/jbig2dec/target.mk @@ -1,5 +1,5 @@ TARGET = test-jbig2dec -LIBS = cxx env jbig2dec +LIBS = libc jbig2dec SRC_CC = main.cc vpath main.cc $(PRG_DIR)/.. diff --git a/libports/src/test/libports/jpeg/target.mk b/libports/src/test/libports/jpeg/target.mk index 5ab788d1d1..1bc8be18b2 100644 --- a/libports/src/test/libports/jpeg/target.mk +++ b/libports/src/test/libports/jpeg/target.mk @@ -1,5 +1,5 @@ TARGET = test-jpeg -LIBS = cxx env jpeg +LIBS = libc jpeg SRC_CC = main.cc vpath main.cc $(PRG_DIR)/.. diff --git a/libports/src/test/libports/libcrypto/target.mk b/libports/src/test/libports/libcrypto/target.mk index 6264e1648e..e50b4fd38a 100644 --- a/libports/src/test/libports/libcrypto/target.mk +++ b/libports/src/test/libports/libcrypto/target.mk @@ -1,5 +1,5 @@ TARGET = test-libcrypto -LIBS = cxx env libcrypto +LIBS = libc libcrypto SRC_CC = main.cc vpath main.cc $(PRG_DIR)/.. diff --git a/libports/src/test/libports/libpng/target.mk b/libports/src/test/libports/libpng/target.mk index 842293d945..44e3010ca2 100644 --- a/libports/src/test/libports/libpng/target.mk +++ b/libports/src/test/libports/libpng/target.mk @@ -1,5 +1,5 @@ TARGET = test-libpng -LIBS = cxx env libpng +LIBS = libc libpng SRC_CC = main.cc vpath main.cc $(PRG_DIR)/.. diff --git a/libports/src/test/libports/libssl/target.mk b/libports/src/test/libports/libssl/target.mk index b64b57834c..b9e7094c66 100644 --- a/libports/src/test/libports/libssl/target.mk +++ b/libports/src/test/libports/libssl/target.mk @@ -1,5 +1,5 @@ TARGET = test-libssl -LIBS = cxx env libcrypto libssl +LIBS = libc libcrypto libssl SRC_CC = main.cc vpath main.cc $(PRG_DIR)/.. diff --git a/libports/src/test/libports/lua/target.mk b/libports/src/test/libports/lua/target.mk index b913c31027..b928e50870 100644 --- a/libports/src/test/libports/lua/target.mk +++ b/libports/src/test/libports/lua/target.mk @@ -1,5 +1,5 @@ TARGET = test-lua -LIBS = cxx env lua libc libm +LIBS = lua libc libm SRC_CC = main.cc vpath main.cc $(PRG_DIR)/.. diff --git a/libports/src/test/libports/luacxx/target.mk b/libports/src/test/libports/luacxx/target.mk index 2abaa04564..47022c7d23 100644 --- a/libports/src/test/libports/luacxx/target.mk +++ b/libports/src/test/libports/luacxx/target.mk @@ -1,5 +1,5 @@ TARGET = test-luacxx -LIBS = cxx env luacxx libc libm +LIBS = luacxx libc libm SRC_CC = main.cc vpath main.cc $(PRG_DIR)/.. diff --git a/libports/src/test/libports/mesa/target.mk b/libports/src/test/libports/mesa/target.mk index d097443e11..454327e231 100644 --- a/libports/src/test/libports/mesa/target.mk +++ b/libports/src/test/libports/mesa/target.mk @@ -1,5 +1,5 @@ TARGET = test-mesa -LIBS = cxx env mesa mesa-egl +LIBS = libc mesa mesa-egl LIBS += $(addprefix gallium-,aux softpipe failover identity egl) SRC_CC = main.cc diff --git a/libports/src/test/libports/mpfr/target.mk b/libports/src/test/libports/mpfr/target.mk index f049e428b2..e3735a067c 100644 --- a/libports/src/test/libports/mpfr/target.mk +++ b/libports/src/test/libports/mpfr/target.mk @@ -1,5 +1,5 @@ TARGET = test-mpfr -LIBS = cxx env mpfr +LIBS = libc mpfr SRC_CC = main.cc # The gmp.lib by now only compiles for 32-bit so we have to mind that diff --git a/libports/src/test/libports/mupdf/target.mk b/libports/src/test/libports/mupdf/target.mk index 86b0f48ec0..5c0e2eb118 100644 --- a/libports/src/test/libports/mupdf/target.mk +++ b/libports/src/test/libports/mupdf/target.mk @@ -1,5 +1,5 @@ TARGET = test-mupdf -LIBS = cxx env mupdf +LIBS = libc mupdf SRC_CC = main.cc vpath main.cc $(PRG_DIR)/.. diff --git a/libports/src/test/libports/ncurses/target.mk b/libports/src/test/libports/ncurses/target.mk index 4eb70d9884..7c9e40ce8e 100644 --- a/libports/src/test/libports/ncurses/target.mk +++ b/libports/src/test/libports/ncurses/target.mk @@ -1,5 +1,5 @@ TARGET = test-ncurses -LIBS = cxx env ncurses +LIBS = libc ncurses SRC_CC = main.cc vpath main.cc $(PRG_DIR)/.. diff --git a/libports/src/test/libports/openjpeg/target.mk b/libports/src/test/libports/openjpeg/target.mk index 5ab0e80dad..008964deed 100644 --- a/libports/src/test/libports/openjpeg/target.mk +++ b/libports/src/test/libports/openjpeg/target.mk @@ -1,5 +1,5 @@ TARGET = test-openjpeg -LIBS = cxx env openjpeg +LIBS = libc openjpeg SRC_CC = main.cc vpath main.cc $(PRG_DIR)/.. diff --git a/libports/src/test/libports/readline/target.mk b/libports/src/test/libports/readline/target.mk index 7199a3b33d..18b4682b93 100644 --- a/libports/src/test/libports/readline/target.mk +++ b/libports/src/test/libports/readline/target.mk @@ -1,5 +1,5 @@ TARGET = test-readline -LIBS = cxx env readline history +LIBS = libc readline history SRC_CC = main.cc vpath main.cc $(PRG_DIR)/.. diff --git a/libports/src/test/libports/zlib/target.mk b/libports/src/test/libports/zlib/target.mk index 6f25a0bbb0..8611a143cd 100644 --- a/libports/src/test/libports/zlib/target.mk +++ b/libports/src/test/libports/zlib/target.mk @@ -1,5 +1,5 @@ TARGET = test-zlib -LIBS = cxx env zlib +LIBS = libc zlib SRC_CC = main.cc vpath main.cc $(PRG_DIR)/.. diff --git a/libports/src/test/lwip/http_clnt/target.mk b/libports/src/test/lwip/http_clnt/target.mk index fa05509f51..133823d954 100644 --- a/libports/src/test/lwip/http_clnt/target.mk +++ b/libports/src/test/lwip/http_clnt/target.mk @@ -1,5 +1,5 @@ TARGET = test-http_clnt -LIBS = cxx env lwip libc libc_log +LIBS = lwip libc libc_log SRC_CC = main.cc REQUIRES = foc diff --git a/libports/src/test/lwip/http_srv/target.mk b/libports/src/test/lwip/http_srv/target.mk index c3d99a6b4e..610133311d 100644 --- a/libports/src/test/lwip/http_srv/target.mk +++ b/libports/src/test/lwip/http_srv/target.mk @@ -1,5 +1,5 @@ TARGET = test-lwip_httpsrv -LIBS = cxx env lwip libc libc_log +LIBS = lwip libc libc_log SRC_CC = main.cc INC_DIR += $(REP_DIR)/src/lib/lwip/include diff --git a/libports/src/test/lwip/http_srv_static/target.mk b/libports/src/test/lwip/http_srv_static/target.mk index a01a6bd023..9f5e5109ad 100644 --- a/libports/src/test/lwip/http_srv_static/target.mk +++ b/libports/src/test/lwip/http_srv_static/target.mk @@ -1,5 +1,5 @@ TARGET = test-lwip_httpsrv_static -LIBS = cxx env lwip libc libc_log +LIBS = lwip libc libc_log SRC_CC = main.cc INC_DIR += $(REP_DIR)/src/lib/lwip/include diff --git a/libports/src/test/lwip/http_srv_tracing/target.mk b/libports/src/test/lwip/http_srv_tracing/target.mk index 1d05623139..ac4741176f 100644 --- a/libports/src/test/lwip/http_srv_tracing/target.mk +++ b/libports/src/test/lwip/http_srv_tracing/target.mk @@ -1,5 +1,5 @@ TARGET = test-lwip_httpsrv_tracing -LIBS = cxx env lwip libc libc_log +LIBS = lwip libc libc_log SRC_CC = main.cc REQUIRES = foc diff --git a/libports/src/test/lwip/http_srv_tracing_nonblocking/target.mk b/libports/src/test/lwip/http_srv_tracing_nonblocking/target.mk index 15528e663e..02679aab4f 100644 --- a/libports/src/test/lwip/http_srv_tracing_nonblocking/target.mk +++ b/libports/src/test/lwip/http_srv_tracing_nonblocking/target.mk @@ -1,5 +1,5 @@ TARGET = test-lwip_httpsrv_tracing_nob -LIBS = cxx env lwip libc libc_log +LIBS = lwip libc libc_log SRC_CC = main.cc REQUIRES = foc diff --git a/libports/src/test/lwip/loopback/target.mk b/libports/src/test/lwip/loopback/target.mk index 2ba5404347..5d4c53f679 100644 --- a/libports/src/test/lwip/loopback/target.mk +++ b/libports/src/test/lwip/loopback/target.mk @@ -1,3 +1,3 @@ TARGET = test-lwip_loop -LIBS = cxx env lwip libc libc_lwip_loopback libc_log +LIBS = lwip libc libc_lwip_loopback libc_log SRC_CC = main.cc diff --git a/libports/src/test/moon/target.mk b/libports/src/test/moon/target.mk index 867e43e66d..da7dcfa862 100644 --- a/libports/src/test/moon/target.mk +++ b/libports/src/test/moon/target.mk @@ -1,3 +1,3 @@ TARGET = test-moon -LIBS = cxx env luacxx libc libc_log libm +LIBS = luacxx libc libc_log libm SRC_CC = main.cc diff --git a/libports/src/test/python/target.mk b/libports/src/test/python/target.mk index be438f573c..0ff94cef7e 100644 --- a/libports/src/test/python/target.mk +++ b/libports/src/test/python/target.mk @@ -1,4 +1,4 @@ TARGET = test-python -LIBS = cxx env python libc libc_log libc_rom libm +LIBS = python libc libc_log libc_rom libm REQUIRES = x86 SRC_CC = main.cc diff --git a/libports/src/test/sdl/target.mk b/libports/src/test/sdl/target.mk index aee1617dcf..d0511ad3ea 100644 --- a/libports/src/test/sdl/target.mk +++ b/libports/src/test/sdl/target.mk @@ -1,3 +1,3 @@ TARGET = test-sdl -LIBS = cxx env sdl libc libc_log +LIBS = sdl libc libc_log SRC_CC = main.cc diff --git a/os/lib/mk/dde_kit.mk b/os/lib/mk/dde_kit.mk index e449c08f1c..0145c3d075 100644 --- a/os/lib/mk/dde_kit.mk +++ b/os/lib/mk/dde_kit.mk @@ -1,7 +1,7 @@ SRC_C = lock.cc semaphore.cc panic.cc printf.cc interrupt.cc pgtab.cc \ memory.cc thread.cc pci_tree.cc pci.cc resources.cc timer.cc \ dde_kit.cc spin_lock.cc -LIBS = thread alarm lock signal +LIBS = base alarm # # Enable 'spin_lock.cc' to reuse the spinlock implementation of the base diff --git a/os/lib/mk/timed_semaphore.mk b/os/lib/mk/timed_semaphore.mk index 6cc27d7867..fc8efb759c 100644 --- a/os/lib/mk/timed_semaphore.mk +++ b/os/lib/mk/timed_semaphore.mk @@ -1,4 +1,4 @@ SRC_CC = timed_semaphore.cc -LIBS = thread alarm signal +LIBS = alarm vpath timed_semaphore.cc $(REP_DIR)/src/lib/timed_semaphore diff --git a/os/lib/mk/timer.inc b/os/lib/mk/timer.inc index 6dab909565..7448720939 100644 --- a/os/lib/mk/timer.inc +++ b/os/lib/mk/timer.inc @@ -1,5 +1,5 @@ SRC_CC += main.cc -LIBS += cxx server env alarm signal +LIBS += base alarm INC_DIR += $(REP_DIR)/src/drivers/timer/include vpath main.cc $(REP_DIR)/src/drivers/timer diff --git a/os/src/app/xvfb/target.mk b/os/src/app/xvfb/target.mk index 2af89bc10a..82ce6cd52c 100644 --- a/os/src/app/xvfb/target.mk +++ b/os/src/app/xvfb/target.mk @@ -1,6 +1,6 @@ TARGET = xvfb REQUIRES = linux x11 xtest xdamage SRC_CC = main.cc inject_input.cc -LIBS = env syscall blit xev_track lx_hybrid signal +LIBS = base_hybrid syscall blit xev_track EXT_OBJECTS += -lX11 -lXdamage /usr/lib/libXtst.so.6 diff --git a/os/src/drivers/acpi/x86/target.mk b/os/src/drivers/acpi/x86/target.mk index 6152294d4e..b41b79351f 100644 --- a/os/src/drivers/acpi/x86/target.mk +++ b/os/src/drivers/acpi/x86/target.mk @@ -1,7 +1,7 @@ TARGET = acpi_drv REQUIRES = x86 SRC_CC = main.cc acpi.cc -LIBS = cxx env server child +LIBS = base INC_DIR = $(PRG_DIR)/.. diff --git a/os/src/drivers/ahci/target.mk b/os/src/drivers/ahci/target.mk index 94ed8f16d1..db519c9f57 100644 --- a/os/src/drivers/ahci/target.mk +++ b/os/src/drivers/ahci/target.mk @@ -1,5 +1,5 @@ TARGET = ahci_drv REQUIRES = x86_32 SRC_CC = main.cc -LIBS = cxx env server signal +LIBS = base diff --git a/os/src/drivers/atapi/target.mk b/os/src/drivers/atapi/target.mk index da6c2e7182..51fc38a0c8 100644 --- a/os/src/drivers/atapi/target.mk +++ b/os/src/drivers/atapi/target.mk @@ -2,7 +2,7 @@ TARGET = atapi_drv REQUIRES = x86 SRC_CC = main.cc ata_device.cc atapi_device.cc io.cc ata_bus_master.cc SRC_C = mindrvr.c -LIBS = signal server cxx env +LIBS = base INC_DIR += $(PRG_DIR)/contrib $(PRG_DIR) diff --git a/os/src/drivers/audio_out/linux/target.mk b/os/src/drivers/audio_out/linux/target.mk index 5ac85d6288..22309f1494 100644 --- a/os/src/drivers/audio_out/linux/target.mk +++ b/os/src/drivers/audio_out/linux/target.mk @@ -1,6 +1,6 @@ REQUIRES = linux TARGET = audio_out_drv -LIBS = lx_hybrid server signal +LIBS = lx_hybrid SRC_CC = main.cc SRC_C = alsa.c LX_LIBS = alsa diff --git a/os/src/drivers/framebuffer/fiasco_ux/target.mk b/os/src/drivers/framebuffer/fiasco_ux/target.mk index d8608bc6c7..88f1e95251 100644 --- a/os/src/drivers/framebuffer/fiasco_ux/target.mk +++ b/os/src/drivers/framebuffer/fiasco_ux/target.mk @@ -1,4 +1,4 @@ TARGET = framebuffer_ux_drv REQUIRES = fiasco x86 SRC_CC = main.cc framebuffer.cc -LIBS = cxx env server +LIBS = base diff --git a/os/src/drivers/framebuffer/omap4/target.mk b/os/src/drivers/framebuffer/omap4/target.mk index 8334c1a179..3af2203926 100644 --- a/os/src/drivers/framebuffer/omap4/target.mk +++ b/os/src/drivers/framebuffer/omap4/target.mk @@ -7,7 +7,7 @@ TARGET = omap4_fb_drv REQUIRES = omap4 SRC_CC = main.cc -LIBS = cxx env server signal +LIBS = base INC_DIR += $(PRG_DIR) vpath main.cc $(PRG_DIR) diff --git a/os/src/drivers/framebuffer/pl11x/pbxa9/target.mk b/os/src/drivers/framebuffer/pl11x/pbxa9/target.mk index 0c093e9330..8df1d66ee6 100644 --- a/os/src/drivers/framebuffer/pl11x/pbxa9/target.mk +++ b/os/src/drivers/framebuffer/pl11x/pbxa9/target.mk @@ -1,7 +1,7 @@ TARGET = pl11x_drv REQUIRES = pl11x platform_pbxa9 SRC_CC = main.cc video_memory.cc -LIBS = cxx env server signal +LIBS = base INC_DIR += $(PRG_DIR)/.. vpath %.cc $(PRG_DIR)/.. diff --git a/os/src/drivers/framebuffer/pl11x/vea9x4/target.mk b/os/src/drivers/framebuffer/pl11x/vea9x4/target.mk index 81cb4a36ba..de662747be 100644 --- a/os/src/drivers/framebuffer/pl11x/vea9x4/target.mk +++ b/os/src/drivers/framebuffer/pl11x/vea9x4/target.mk @@ -1,7 +1,7 @@ TARGET = pl11x_drv REQUIRES = pl11x platform_vea9x4 SRC_CC = main.cc video_memory.cc -LIBS = cxx env server signal +LIBS = base INC_DIR += $(PRG_DIR)/.. vpath main.cc $(PRG_DIR)/.. diff --git a/os/src/drivers/framebuffer/pl11x/vpb926/target.mk b/os/src/drivers/framebuffer/pl11x/vpb926/target.mk index 6186a83034..f8785075e9 100644 --- a/os/src/drivers/framebuffer/pl11x/vpb926/target.mk +++ b/os/src/drivers/framebuffer/pl11x/vpb926/target.mk @@ -1,7 +1,7 @@ TARGET = pl11x_drv REQUIRES = pl11x platform_vpb926 SRC_CC = main.cc video_memory.cc -LIBS = cxx env server signal +LIBS = base INC_DIR += $(PRG_DIR)/.. vpath %.cc $(PRG_DIR)/.. diff --git a/os/src/drivers/framebuffer/sdl/target.mk b/os/src/drivers/framebuffer/sdl/target.mk index cbb9d01c06..df89f8cf25 100644 --- a/os/src/drivers/framebuffer/sdl/target.mk +++ b/os/src/drivers/framebuffer/sdl/target.mk @@ -1,5 +1,5 @@ TARGET = fb_sdl -LIBS = lx_hybrid server +LIBS = lx_hybrid REQUIRES = linux sdl SRC_CC = fb_sdl.cc input.cc LX_LIBS = sdl diff --git a/os/src/drivers/framebuffer/vesa/target.mk b/os/src/drivers/framebuffer/vesa/target.mk index c2cca7b2a8..cd8c90b1e2 100644 --- a/os/src/drivers/framebuffer/vesa/target.mk +++ b/os/src/drivers/framebuffer/vesa/target.mk @@ -3,7 +3,7 @@ REQUIRES = vesa SRC_CC = main.cc framebuffer.cc ifx86emu.cc hw_emul.cc CC_OPT += -fomit-frame-pointer -DNO_SYS_HEADERS SRC_C = decode.c fpu.c ops.c ops2.c prim_ops.c sys.c -LIBS = cxx env server blit +LIBS = base blit INC_DIR += $(PRG_DIR)/include $(PRG_DIR)/contrib vpath %.c $(PRG_DIR)/contrib diff --git a/os/src/drivers/gpio/omap4/target.mk b/os/src/drivers/gpio/omap4/target.mk index 972fcffc32..f6a7c5a62e 100644 --- a/os/src/drivers/gpio/omap4/target.mk +++ b/os/src/drivers/gpio/omap4/target.mk @@ -1,8 +1,7 @@ - TARGET = omap4_gpio_drv REQUIRES = omap4 SRC_CC = main.cc -LIBS = cxx env server signal +LIBS = base INC_DIR += $(PRG_DIR) vpath main.cc $(PRG_DIR) diff --git a/os/src/drivers/input/dummy/target.mk b/os/src/drivers/input/dummy/target.mk index 0e31397ccd..7d81634290 100644 --- a/os/src/drivers/input/dummy/target.mk +++ b/os/src/drivers/input/dummy/target.mk @@ -1,3 +1,3 @@ -TARGET = dummy_input_drv -SRC_CC = main.cc -LIBS = cxx env server +TARGET = dummy_input_drv +SRC_CC = main.cc +LIBS = base diff --git a/os/src/drivers/input/fiasco_ux/target.mk b/os/src/drivers/input/fiasco_ux/target.mk index fe396a3537..8fea3e102f 100644 --- a/os/src/drivers/input/fiasco_ux/target.mk +++ b/os/src/drivers/input/fiasco_ux/target.mk @@ -1,4 +1,4 @@ -TARGET = input_ux_drv -REQUIRES = fiasco x86 -SRC_CC = main.cc input.cc test.cc -LIBS = cxx env server +TARGET = input_ux_drv +REQUIRES = fiasco x86 +SRC_CC = main.cc input.cc test.cc +LIBS = base diff --git a/os/src/drivers/input/ps2/pl050/target.mk b/os/src/drivers/input/ps2/pl050/target.mk index cedd05bee6..3311bd4044 100644 --- a/os/src/drivers/input/ps2/pl050/target.mk +++ b/os/src/drivers/input/ps2/pl050/target.mk @@ -1,6 +1,6 @@ TARGET = ps2_drv REQUIRES = pl050 SRC_CC = main.cc -LIBS = cxx env server +LIBS = base INC_DIR += $(PRG_DIR) $(PRG_DIR)/.. diff --git a/os/src/drivers/input/ps2/x86/target.mk b/os/src/drivers/input/ps2/x86/target.mk index a836fc816c..21a7e738bf 100644 --- a/os/src/drivers/input/ps2/x86/target.mk +++ b/os/src/drivers/input/ps2/x86/target.mk @@ -1,6 +1,6 @@ TARGET = ps2_drv REQUIRES = x86 ps2 SRC_CC = main.cc -LIBS = cxx env server +LIBS = base INC_DIR = $(PRG_DIR)/.. diff --git a/os/src/drivers/nic/lan9118/target.mk b/os/src/drivers/nic/lan9118/target.mk index 2286beb328..5e8635fe9c 100644 --- a/os/src/drivers/nic/lan9118/target.mk +++ b/os/src/drivers/nic/lan9118/target.mk @@ -1,5 +1,5 @@ REQUIRES = lan9118 TARGET = nic_drv SRC_CC = main.cc -LIBS = env cxx server signal +LIBS = base INC_DIR += $(PRG_DIR) diff --git a/os/src/drivers/nic/linux/target.mk b/os/src/drivers/nic/linux/target.mk index d2ca9f6b14..3fa319750f 100644 --- a/os/src/drivers/nic/linux/target.mk +++ b/os/src/drivers/nic/linux/target.mk @@ -1,4 +1,4 @@ TARGET = nic_drv REQUIRES = linux -LIBS = lx_hybrid server signal +LIBS = lx_hybrid SRC_CC = main.cc diff --git a/os/src/drivers/pci/x86/target.mk b/os/src/drivers/pci/x86/target.mk index 0e7dca6349..d3509e1729 100644 --- a/os/src/drivers/pci/x86/target.mk +++ b/os/src/drivers/pci/x86/target.mk @@ -1,7 +1,7 @@ TARGET = pci_drv REQUIRES = x86 SRC_CC = main.cc -LIBS = cxx env server +LIBS = base INC_DIR = $(PRG_DIR)/.. diff --git a/os/src/drivers/platform/gta01/target.mk b/os/src/drivers/platform/gta01/target.mk index 8a6efc3afd..86ca1f4e78 100644 --- a/os/src/drivers/platform/gta01/target.mk +++ b/os/src/drivers/platform/gta01/target.mk @@ -1,4 +1,4 @@ TARGET = gta01_drv REQUIRES = platform_gta01 SRC_CC = main.cc -LIBS = cxx env server +LIBS = base diff --git a/os/src/drivers/rtc/x86/target.mk b/os/src/drivers/rtc/x86/target.mk index 486519e3d9..69285ed74e 100644 --- a/os/src/drivers/rtc/x86/target.mk +++ b/os/src/drivers/rtc/x86/target.mk @@ -1,4 +1,4 @@ TARGET = rtc_drv REQUIRES = x86 SRC_CC = main.cc -LIBS = cxx server env +LIBS = base diff --git a/os/src/drivers/sd_card/omap4/bench/target.mk b/os/src/drivers/sd_card/omap4/bench/target.mk index 61c77f5785..7bc110b916 100644 --- a/os/src/drivers/sd_card/omap4/bench/target.mk +++ b/os/src/drivers/sd_card/omap4/bench/target.mk @@ -1,5 +1,5 @@ TARGET = sd_card_bench REQUIRES = omap4 SRC_CC = main.cc -LIBS = cxx env signal +LIBS = base INC_DIR += $(PRG_DIR)/.. diff --git a/os/src/drivers/sd_card/omap4/target.mk b/os/src/drivers/sd_card/omap4/target.mk index 2bc25cc626..32da61670c 100644 --- a/os/src/drivers/sd_card/omap4/target.mk +++ b/os/src/drivers/sd_card/omap4/target.mk @@ -1,5 +1,5 @@ TARGET = sd_card_drv REQUIRES = omap4 SRC_CC = main.cc -LIBS = cxx env server signal +LIBS = base INC_DIR += $(PRG_DIR) diff --git a/os/src/drivers/sd_card/pl180/target.mk b/os/src/drivers/sd_card/pl180/target.mk index dbe3fc642e..c19a506969 100644 --- a/os/src/drivers/sd_card/pl180/target.mk +++ b/os/src/drivers/sd_card/pl180/target.mk @@ -1,6 +1,6 @@ TARGET = sd_card_drv REQUIRES = pl180 SRC_CC = main.cc -LIBS = cxx env server signal +LIBS = base INC_DIR += $(PRG_DIR) $(PRG_DIR)/.. diff --git a/os/src/drivers/uart/i8250/target.mk b/os/src/drivers/uart/i8250/target.mk index b68cb9a7fe..8422bdb918 100644 --- a/os/src/drivers/uart/i8250/target.mk +++ b/os/src/drivers/uart/i8250/target.mk @@ -1,6 +1,6 @@ TARGET = uart_drv REQUIRES = x86 SRC_CC = main.cc -LIBS = cxx env server signal +LIBS = base INC_DIR += $(PRG_DIR) $(PRG_DIR)/.. diff --git a/os/src/drivers/uart/omap4/target.mk b/os/src/drivers/uart/omap4/target.mk index b9f19b1158..2d005d15f1 100644 --- a/os/src/drivers/uart/omap4/target.mk +++ b/os/src/drivers/uart/omap4/target.mk @@ -1,6 +1,6 @@ TARGET = uart_drv REQUIRES = omap4 SRC_CC = main.cc -LIBS = cxx env server signal +LIBS = base INC_DIR += $(PRG_DIR) $(PRG_DIR)/.. diff --git a/os/src/drivers/uart/pl011/target.mk b/os/src/drivers/uart/pl011/target.mk index 1049d47eae..d755a7ff01 100644 --- a/os/src/drivers/uart/pl011/target.mk +++ b/os/src/drivers/uart/pl011/target.mk @@ -1,6 +1,6 @@ TARGET = uart_drv REQUIRES = pl011 SRC_CC = main.cc -LIBS = cxx env server signal +LIBS = base INC_DIR += $(PRG_DIR) $(PRG_DIR)/.. diff --git a/os/src/init/target.mk b/os/src/init/target.mk index 5c92ec3494..8998b99c90 100644 --- a/os/src/init/target.mk +++ b/os/src/init/target.mk @@ -1,3 +1,3 @@ TARGET = init SRC_CC = main.cc -LIBS = env cxx server child init_pd_args signal +LIBS = base init_pd_args diff --git a/os/src/lib/ldso/target.inc b/os/src/lib/ldso/target.inc index 394e0e041d..74e5802264 100644 --- a/os/src/lib/ldso/target.inc +++ b/os/src/lib/ldso/target.inc @@ -1,7 +1,7 @@ #note: leave empty to disable debugging output DEBUG = -LIBS = cxx ldso-arch startup +LIBS = base ldso-arch SRC_S = rtld_start.S SRC_C = reloc.c rtld.c map_object.c xmalloc.c debug.c main.c \ diff --git a/os/src/server/fs_rom/target.mk b/os/src/server/fs_rom/target.mk index 47f2a31ded..a5872ad86b 100755 --- a/os/src/server/fs_rom/target.mk +++ b/os/src/server/fs_rom/target.mk @@ -1,3 +1,3 @@ TARGET = fs_rom SRC_CC = main.cc -LIBS = cxx env server signal +LIBS = base diff --git a/os/src/server/iso9660/target.mk b/os/src/server/iso9660/target.mk index fdf69678e0..7148a44e85 100644 --- a/os/src/server/iso9660/target.mk +++ b/os/src/server/iso9660/target.mk @@ -1,3 +1,3 @@ TARGET = iso9660 -LIBS = env cxx signal server SRC_CC = main.cc iso9660.cc +LIBS = base diff --git a/os/src/server/loader/target.mk b/os/src/server/loader/target.mk index 754675d237..fd764318ac 100644 --- a/os/src/server/loader/target.mk +++ b/os/src/server/loader/target.mk @@ -1,4 +1,4 @@ TARGET = loader -LIBS = cxx env thread server child signal init_pd_args +LIBS = base init_pd_args SRC_CC = main.cc INC_DIR += $(PRG_DIR) diff --git a/os/src/server/mixer/target.mk b/os/src/server/mixer/target.mk index acd244f44b..d139b832c4 100644 --- a/os/src/server/mixer/target.mk +++ b/os/src/server/mixer/target.mk @@ -1,3 +1,3 @@ TARGET = mixer -LIBS = env cxx server signal SRC_CC = mixer.cc +LIBS = base diff --git a/os/src/server/nic_bridge/target.mk b/os/src/server/nic_bridge/target.mk index 58fab14eeb..64061b0423 100644 --- a/os/src/server/nic_bridge/target.mk +++ b/os/src/server/nic_bridge/target.mk @@ -1,6 +1,6 @@ TARGET = nic_bridge -LIBS = env cxx server net signal +LIBS = base net SRC_CC = address_node.cc component.cc mac.cc \ main.cc packet_handler.cc vlan.cc -vpath *.cc $(REP_DIR)/src/server/proxy_arp \ No newline at end of file +vpath *.cc $(REP_DIR)/src/server/proxy_arp diff --git a/os/src/server/nic_loopback/target.mk b/os/src/server/nic_loopback/target.mk index 30932a6c44..9c63672bfa 100644 --- a/os/src/server/nic_loopback/target.mk +++ b/os/src/server/nic_loopback/target.mk @@ -1,3 +1,3 @@ TARGET = nic_loopback -LIBS = env cxx server signal SRC_CC = main.cc +LIBS = base diff --git a/os/src/server/nit_fb/target.mk b/os/src/server/nit_fb/target.mk index 241ee94f1d..c0aaaa218a 100644 --- a/os/src/server/nit_fb/target.mk +++ b/os/src/server/nit_fb/target.mk @@ -1,3 +1,3 @@ TARGET = nit_fb SRC_CC = main.cc -LIBS = cxx env server signal +LIBS = base diff --git a/os/src/server/nitpicker/genode/target.mk b/os/src/server/nitpicker/genode/target.mk index eaa5b382e3..0aa75cf79f 100644 --- a/os/src/server/nitpicker/genode/target.mk +++ b/os/src/server/nitpicker/genode/target.mk @@ -1,5 +1,5 @@ TARGET = nitpicker -LIBS = cxx env server blit signal +LIBS = base blit SRC_CC = main.cc \ view_stack.cc \ view.cc \ diff --git a/os/src/server/part_blk/target.mk b/os/src/server/part_blk/target.mk index a1ec3391fc..5734caf6d8 100644 --- a/os/src/server/part_blk/target.mk +++ b/os/src/server/part_blk/target.mk @@ -1,3 +1,3 @@ TARGET = part_blk -LIBS = env cxx signal server +LIBS = base SRC_CC = main.cc back_end.cc diff --git a/os/src/server/ram_fs/target.mk b/os/src/server/ram_fs/target.mk index 06861add60..5023a7f3d6 100644 --- a/os/src/server/ram_fs/target.mk +++ b/os/src/server/ram_fs/target.mk @@ -1,4 +1,4 @@ TARGET = ram_fs SRC_CC = main.cc -LIBS = cxx env server signal +LIBS = base INC_DIR += $(PRG_DIR) diff --git a/os/src/server/rom_loopdev/target.mk b/os/src/server/rom_loopdev/target.mk index e4bc6709b3..819c241f21 100644 --- a/os/src/server/rom_loopdev/target.mk +++ b/os/src/server/rom_loopdev/target.mk @@ -1,3 +1,3 @@ TARGET = rom_loopdev -LIBS = env cxx server signal SRC_CC = main.cc +LIBS = base diff --git a/os/src/server/rom_prefetcher/target.mk b/os/src/server/rom_prefetcher/target.mk index d661a07550..aaa5fe061b 100644 --- a/os/src/server/rom_prefetcher/target.mk +++ b/os/src/server/rom_prefetcher/target.mk @@ -1,3 +1,3 @@ TARGET = rom_prefetcher SRC_CC = main.cc -LIBS += env cxx server +LIBS += base diff --git a/os/src/server/tar_fs/target.mk b/os/src/server/tar_fs/target.mk index 874b5c3b9f..6d3e85930f 100644 --- a/os/src/server/tar_fs/target.mk +++ b/os/src/server/tar_fs/target.mk @@ -1,4 +1,4 @@ TARGET = tar_fs SRC_CC = main.cc -LIBS = cxx env server signal +LIBS = base INC_DIR += $(PRG_DIR) diff --git a/os/src/server/tar_rom/target.mk b/os/src/server/tar_rom/target.mk index 0eb191600b..d13b6fbf5c 100755 --- a/os/src/server/tar_rom/target.mk +++ b/os/src/server/tar_rom/target.mk @@ -1,3 +1,3 @@ TARGET = tar_rom SRC_CC = main.cc -LIBS = cxx env server +LIBS = base diff --git a/os/src/server/terminal_crosslink/target.mk b/os/src/server/terminal_crosslink/target.mk index 38a810cc50..edb0ea7bd4 100644 --- a/os/src/server/terminal_crosslink/target.mk +++ b/os/src/server/terminal_crosslink/target.mk @@ -1,4 +1,3 @@ TARGET = terminal_crosslink -SRC_CC = main.cc \ - terminal_session_component.cc -LIBS = cxx env server signal +SRC_CC = main.cc terminal_session_component.cc +LIBS = base diff --git a/os/src/server/terminal_log/target.mk b/os/src/server/terminal_log/target.mk index 4f10baf199..5c7dc1ca8c 100644 --- a/os/src/server/terminal_log/target.mk +++ b/os/src/server/terminal_log/target.mk @@ -1,3 +1,3 @@ TARGET = terminal_log SRC_CC = main.cc -LIBS = cxx env server signal +LIBS = base diff --git a/os/src/server/vmm/target.mk b/os/src/server/vmm/target.mk index ae63a0b1fa..370d770055 100644 --- a/os/src/server/vmm/target.mk +++ b/os/src/server/vmm/target.mk @@ -1,5 +1,5 @@ TARGET = vmm REQUIRES = trustzone platform_vea9x4 -LIBS = env cxx elf signal +LIBS = base SRC_CC = main.cc -INC_DIR += $(PRG_DIR)/include \ No newline at end of file +INC_DIR += $(PRG_DIR)/include diff --git a/os/src/test/alarm/target.mk b/os/src/test/alarm/target.mk index c63dedd442..f1c1e6d407 100644 --- a/os/src/test/alarm/target.mk +++ b/os/src/test/alarm/target.mk @@ -1,3 +1,3 @@ TARGET = test-alarm -LIBS = cxx env thread alarm signal SRC_CC = main.cc +LIBS = base alarm diff --git a/os/src/test/audio_out/target.mk b/os/src/test/audio_out/target.mk index bcfd659698..feb92edbea 100644 --- a/os/src/test/audio_out/target.mk +++ b/os/src/test/audio_out/target.mk @@ -1,3 +1,3 @@ TARGET = test-audio_out -LIBS = env cxx signal SRC_CC = main.cc +LIBS = base diff --git a/os/src/test/block/target.mk b/os/src/test/block/target.mk index affa2df698..09b8fbb69d 100644 --- a/os/src/test/block/target.mk +++ b/os/src/test/block/target.mk @@ -1,3 +1,3 @@ TARGET = test-block -LIBS = env cxx signal SRC_CC = main.cc +LIBS = base diff --git a/os/src/test/bomb/target.mk b/os/src/test/bomb/target.mk index 284d910d89..c1142e2024 100644 --- a/os/src/test/bomb/target.mk +++ b/os/src/test/bomb/target.mk @@ -1,3 +1,3 @@ TARGET = bomb -LIBS = cxx env thread child server signal SRC_CC = main.cc +LIBS = base diff --git a/os/src/test/chroot_loader/target.mk b/os/src/test/chroot_loader/target.mk index cf7798f971..f818a7d7c7 100644 --- a/os/src/test/chroot_loader/target.mk +++ b/os/src/test/chroot_loader/target.mk @@ -1,4 +1,4 @@ TARGET = test-chroot_loader REQUIRES += linux SRC_CC = main.cc -LIBS += cxx env signal +LIBS += base diff --git a/os/src/test/config_args/target.mk b/os/src/test/config_args/target.mk index 08c6b4ccbd..4312f6981e 100644 --- a/os/src/test/config_args/target.mk +++ b/os/src/test/config_args/target.mk @@ -1,3 +1,3 @@ TARGET = test-config_args -LIBS = env config_args SRC_CC = main.cc +LIBS = base config_args diff --git a/os/src/test/dde_kit/target.mk b/os/src/test/dde_kit/target.mk index f7a6cfcc4d..82565b1286 100644 --- a/os/src/test/dde_kit/target.mk +++ b/os/src/test/dde_kit/target.mk @@ -1,3 +1,3 @@ TARGET = test-dde_kit SRC_CC = test.cc -LIBS = cxx env dde_kit +LIBS = dde_kit diff --git a/os/src/test/dynamic_config/loader/target.mk b/os/src/test/dynamic_config/loader/target.mk index 5ae37307f4..4dc7523223 100644 --- a/os/src/test/dynamic_config/loader/target.mk +++ b/os/src/test/dynamic_config/loader/target.mk @@ -1,3 +1,3 @@ TARGET = test-dynamic_config_loader SRC_CC = main.cc -LIBS = env signal +LIBS = base diff --git a/os/src/test/dynamic_config/master/target.mk b/os/src/test/dynamic_config/master/target.mk index 664a335317..dae175e8ea 100644 --- a/os/src/test/dynamic_config/master/target.mk +++ b/os/src/test/dynamic_config/master/target.mk @@ -1,3 +1,3 @@ TARGET = test-dynamic_config_master SRC_CC = main.cc -LIBS = env signal server child +LIBS = base diff --git a/os/src/test/dynamic_config/server/target.mk b/os/src/test/dynamic_config/server/target.mk index 9b18b9f3ac..879b666840 100644 --- a/os/src/test/dynamic_config/server/target.mk +++ b/os/src/test/dynamic_config/server/target.mk @@ -1,3 +1,3 @@ TARGET = test-dynamic_config_server SRC_CC = main.cc -LIBS = env signal server +LIBS = base diff --git a/os/src/test/dynamic_config/target.mk b/os/src/test/dynamic_config/target.mk index b1f1836731..45a4db1519 100644 --- a/os/src/test/dynamic_config/target.mk +++ b/os/src/test/dynamic_config/target.mk @@ -1,3 +1,3 @@ TARGET = test-dynamic_config SRC_CC = main.cc -LIBS = env signal +LIBS = base diff --git a/os/src/test/failsafe/target.mk b/os/src/test/failsafe/target.mk index b708aa84c5..55f67a79ea 100644 --- a/os/src/test/failsafe/target.mk +++ b/os/src/test/failsafe/target.mk @@ -1,3 +1,3 @@ TARGET = test-failsafe SRC_CC = main.cc -LIBS = cxx env server signal child +LIBS = base diff --git a/os/src/test/fb_block_adapter/target.mk b/os/src/test/fb_block_adapter/target.mk index 359522ff49..ecf06a7797 100644 --- a/os/src/test/fb_block_adapter/target.mk +++ b/os/src/test/fb_block_adapter/target.mk @@ -1,3 +1,3 @@ TARGET = test-fb_blk_adapter -LIBS = env cxx signal server SRC_CC = main.cc +LIBS = base diff --git a/os/src/test/framebuffer/target.mk b/os/src/test/framebuffer/target.mk index f10c6ed914..c9ac3242f3 100644 --- a/os/src/test/framebuffer/target.mk +++ b/os/src/test/framebuffer/target.mk @@ -1,14 +1,3 @@ -# -# \brief Basic test for framebuffer session -# \author Martin Stein -# \date 2012-04-25 -# - -# set program name -TARGET = test-framebuffer - -# add c++ sources +TARGET = test-framebuffer SRC_CC += main.cc - -# add libraries -LIBS += cxx env +LIBS += base diff --git a/os/src/test/gpio_drv/target.mk b/os/src/test/gpio_drv/target.mk index 055f00a2ce..d7d363904f 100644 --- a/os/src/test/gpio_drv/target.mk +++ b/os/src/test/gpio_drv/target.mk @@ -1,7 +1,7 @@ TARGET = test-omap4_gpio_drv REQUIRES = omap4 SRC_CC = main.cc -LIBS = cxx env thread signal INC_DIR += $(PRG_DIR) +LIBS = base vpath main.cc $(PRG_DIR) diff --git a/os/src/test/input/target.mk b/os/src/test/input/target.mk index 71af820da4..380d740759 100644 --- a/os/src/test/input/target.mk +++ b/os/src/test/input/target.mk @@ -1,3 +1,3 @@ TARGET = test-input SRC_CC = test.cc -LIBS = cxx env signal +LIBS = base diff --git a/os/src/test/iso/target.mk b/os/src/test/iso/target.mk index 82a1696ba3..2dc42e662c 100644 --- a/os/src/test/iso/target.mk +++ b/os/src/test/iso/target.mk @@ -1,3 +1,3 @@ TARGET = test-iso -LIBS = env cxx signal thread SRC_CC = main.cc +LIBS = base diff --git a/os/src/test/loader/target.mk b/os/src/test/loader/target.mk index c856154832..bc26ce534b 100644 --- a/os/src/test/loader/target.mk +++ b/os/src/test/loader/target.mk @@ -1,3 +1,3 @@ TARGET = test-loader SRC_CC = main.cc -LIBS = cxx env signal +LIBS = base diff --git a/os/src/test/nic_loopback/target.mk b/os/src/test/nic_loopback/target.mk index 21a8a5b8f9..fd40103ee2 100644 --- a/os/src/test/nic_loopback/target.mk +++ b/os/src/test/nic_loopback/target.mk @@ -1,3 +1,3 @@ TARGET = test-nic_loopback -LIBS = env cxx signal SRC_CC = main.cc +LIBS = base diff --git a/os/src/test/nitpicker/target.mk b/os/src/test/nitpicker/target.mk index 75abaecb85..d63a5dc5e1 100644 --- a/os/src/test/nitpicker/target.mk +++ b/os/src/test/nitpicker/target.mk @@ -1,3 +1,3 @@ TARGET = testnit SRC_CC = test.cc -LIBS = cxx env signal +LIBS = base diff --git a/os/src/test/packet_stream/target.mk b/os/src/test/packet_stream/target.mk index 05c8b77ea9..8c5173192b 100644 --- a/os/src/test/packet_stream/target.mk +++ b/os/src/test/packet_stream/target.mk @@ -1,3 +1,3 @@ TARGET = test-packet_stream SRC_CC = main.cc -LIBS = env cxx thread signal +LIBS = base diff --git a/os/src/test/part_blk/target.mk b/os/src/test/part_blk/target.mk index 9d9c321e5b..493302aeff 100644 --- a/os/src/test/part_blk/target.mk +++ b/os/src/test/part_blk/target.mk @@ -1,3 +1,3 @@ TARGET = test-part -LIBS = env cxx signal SRC_CC = main.cc +LIBS = base diff --git a/os/src/test/pci/target.mk b/os/src/test/pci/target.mk index 40ea27292a..118ba90e07 100644 --- a/os/src/test/pci/target.mk +++ b/os/src/test/pci/target.mk @@ -1,3 +1,3 @@ TARGET = test-pci SRC_CC = test.cc -LIBS = cxx env +LIBS = base diff --git a/os/src/test/ram_fs_chunk/target.mk b/os/src/test/ram_fs_chunk/target.mk index 81dd60011b..03bd0b41b4 100644 --- a/os/src/test/ram_fs_chunk/target.mk +++ b/os/src/test/ram_fs_chunk/target.mk @@ -1,4 +1,4 @@ TARGET = test-ram_fs_chunk SRC_CC = main.cc INC_DIR += $(REP_DIR)/src/server/ram_fs -LIBS = env +LIBS = base diff --git a/os/src/test/rom_blk/target.mk b/os/src/test/rom_blk/target.mk index 2bfd153ac7..a7ccab986b 100644 --- a/os/src/test/rom_blk/target.mk +++ b/os/src/test/rom_blk/target.mk @@ -1,3 +1,3 @@ TARGET = test-rom_blk -LIBS = env cxx signal SRC_CC = main.cc +LIBS = base diff --git a/os/src/test/signal/target.mk b/os/src/test/signal/target.mk index b2d42561a0..2091765db5 100644 --- a/os/src/test/signal/target.mk +++ b/os/src/test/signal/target.mk @@ -1,3 +1,3 @@ TARGET = test-signal SRC_CC = main.cc -LIBS = cxx env signal +LIBS = base diff --git a/os/src/test/terminal_crosslink/target.mk b/os/src/test/terminal_crosslink/target.mk index 779c023c68..c053a985f7 100644 --- a/os/src/test/terminal_crosslink/target.mk +++ b/os/src/test/terminal_crosslink/target.mk @@ -1,3 +1,3 @@ TARGET = test-terminal_crosslink -LIBS = cxx env signal SRC_CC = main.cc +LIBS = base diff --git a/os/src/test/terminal_echo/target.mk b/os/src/test/terminal_echo/target.mk index cb4a2a6c00..a1f9255ec0 100644 --- a/os/src/test/terminal_echo/target.mk +++ b/os/src/test/terminal_echo/target.mk @@ -1,3 +1,3 @@ TARGET = test-terminal_echo -LIBS = cxx env signal SRC_CC = main.cc +LIBS = base diff --git a/os/src/test/thread_join/target.mk b/os/src/test/thread_join/target.mk index 18fbdacec0..ab9dd5a0f7 100644 --- a/os/src/test/thread_join/target.mk +++ b/os/src/test/thread_join/target.mk @@ -1,3 +1,3 @@ TARGET = test-thread_join SRC_CC = main.cc -LIBS = cxx env thread signal +LIBS = base diff --git a/os/src/test/timed_semaphore/target.mk b/os/src/test/timed_semaphore/target.mk index d016f802d5..dcc78183fe 100644 --- a/os/src/test/timed_semaphore/target.mk +++ b/os/src/test/timed_semaphore/target.mk @@ -1,3 +1,3 @@ TARGET = test-timed_semaphore SRC_CC = main.cc -LIBS = env cxx thread timed_semaphore +LIBS = base timed_semaphore diff --git a/os/src/test/timer/target.mk b/os/src/test/timer/target.mk index 777c9434f1..4c68602a61 100644 --- a/os/src/test/timer/target.mk +++ b/os/src/test/timer/target.mk @@ -1,3 +1,3 @@ TARGET = test-timer SRC_CC = main.cc -LIBS = cxx env thread signal +LIBS = base diff --git a/os/src/test/timer_accuracy/target.mk b/os/src/test/timer_accuracy/target.mk index cfd3732215..fbaf2bec36 100644 --- a/os/src/test/timer_accuracy/target.mk +++ b/os/src/test/timer_accuracy/target.mk @@ -1,4 +1,4 @@ TARGET = test-timer_accuracy REQUIRES = linux SRC_CC = main.cc -LIBS = env cxx syscall signal +LIBS = base syscall diff --git a/os/src/test/uart/target.mk b/os/src/test/uart/target.mk index 8b9745237b..a54d507f57 100644 --- a/os/src/test/uart/target.mk +++ b/os/src/test/uart/target.mk @@ -1,3 +1,3 @@ TARGET = test-uart SRC_CC = main.cc -LIBS = cxx env signal +LIBS = base diff --git a/ports-foc/lib/mk/l4lx.mk b/ports-foc/lib/mk/l4lx.mk index cdfb0923ad..ff474ffaed 100644 --- a/ports-foc/lib/mk/l4lx.mk +++ b/ports-foc/lib/mk/l4lx.mk @@ -31,6 +31,6 @@ SRC_CC += env.cc \ INC_DIR += $(REP_DIR)/include \ $(REP_DIR)/src/lib/l4lx/include \ -LIBS = cxx env thread signal +LIBS = base vpath %.cc $(REP_DIR)/src/lib/l4lx diff --git a/ports-foc/mk/l4lx.mk b/ports-foc/mk/l4lx.mk index 490f92be9e..4a0c02d59e 100644 --- a/ports-foc/mk/l4lx.mk +++ b/ports-foc/mk/l4lx.mk @@ -3,23 +3,8 @@ VERBOSE_LX_MK ?= 0 REQUIRES += foc INC_DIR += $(REP_DIR)/include LIBS = l4lx l4sys -GENODE_LIBS := allocator_avl \ - avl_tree \ - cap_alloc \ - console \ - cxx \ - env \ - heap \ - ipc \ - l4lx \ - l4sys \ - lock \ - log_console \ - signal \ - slab \ - startup \ - syscalls \ - thread +GENODE_LIBS := base base-common startup syscall cxx l4lx l4sys + GENODE_LIBS := $(foreach l,$(GENODE_LIBS),$(BUILD_BASE_DIR)/var/libcache/$l/$l.lib.a) GENODE_LIBS_SORTED = $(sort $(wildcard $(GENODE_LIBS))) GENODE_LIBS_SORTED += $(shell $(CC) $(CC_MARCH) -print-libgcc-file-name) diff --git a/ports-okl4/lib/mk/oklx.mk b/ports-okl4/lib/mk/oklx.mk index 63821de235..df40296879 100644 --- a/ports-okl4/lib/mk/oklx.mk +++ b/ports-okl4/lib/mk/oklx.mk @@ -21,7 +21,7 @@ SRC_CC += iguana_eas.cc \ iguana_tls.cc INC_DIR += $(REP_DIR)/include/oklx_lib INC_DIR += $(REP_DIR)/src/lib/oklx/include -LIBS = cxx env thread signal +LIBS = base # do not produce position-independent code CC_OPT_PIC = diff --git a/ports-okl4/patches/oklx_genode.patch b/ports-okl4/patches/oklx_genode.patch index 4e29c244dd..31e077cf8a 100644 --- a/ports-okl4/patches/oklx_genode.patch +++ b/ports-okl4/patches/oklx_genode.patch @@ -192,8 +192,8 @@ diff -urNpB kernel-2.6.23-v2/arch/l4/Makefile contrib/arch/l4/Makefile -libs-y += -lvtimer -lvserial -ll4e -lll -liguana -ll4 -lgcc -lmutex -lcircular_buffer -lc -latomic_ops -lfs +#libs-y += -lvtimer -lvserial -ll4e -lll -liguana -ll4 -lgcc -lmutex -lcircular_buffer -lc -latomic_ops -lfs + -+GENODE_LIBS = slab allocator_avl cxx ipc heap console log_console lock env \ -+ thread oklx startup avl_tree signal ++GENODE_LIBS = base base-common cxx startup \ ++ oklx + +libs-y += $(addprefix $(GENODE_LIBS_DIR)/,$(foreach l,$(GENODE_LIBS),$l/$l.lib.a)) + diff --git a/ports/mk/noux.mk b/ports/mk/noux.mk index 9d022c3006..c1c2cb471d 100644 --- a/ports/mk/noux.mk +++ b/ports/mk/noux.mk @@ -31,7 +31,7 @@ TARGET ?= $(lastword $(subst /, ,$(PRG_DIR))) NOUX_PKG ?= $(TARGET) -LIBS += cxx env libc libm libc_noux +LIBS += libc libm libc_noux NOUX_PKG_DIR ?= $(wildcard $(REP_DIR)/contrib/$(NOUX_PKG)-*) diff --git a/ports/src/app/gdb_monitor/target.mk b/ports/src/app/gdb_monitor/target.mk index 209eba3494..a96dd9ad16 100644 --- a/ports/src/app/gdb_monitor/target.mk +++ b/ports/src/app/gdb_monitor/target.mk @@ -10,8 +10,8 @@ INC_DIR += $(GDB_CONTRIB_DIR)/include \ $(PRG_DIR)/gdbserver \ $(PRG_DIR) -LIBS = env signal libc libc_log libc_terminal libc_lock_pipe lock child \ - server gdbserver_platform gdbserver_libc_support +LIBS = libc libc_log libc_terminal libc_lock_pipe \ + gdbserver_platform gdbserver_libc_support SRC_C = event-loop.c \ i386-low.c \ diff --git a/ports/src/app/lighttpd/target.inc b/ports/src/app/lighttpd/target.inc index 6fc73a3abc..b24210f409 100644 --- a/ports/src/app/lighttpd/target.inc +++ b/ports/src/app/lighttpd/target.inc @@ -21,5 +21,5 @@ CC_WARN = -Wall -Wno-unused-variable -Wno-unused-function INC_DIR += $(PRG_DIR) INC_DIR += $(LIGHTTPD_DIR)/src -LIBS += cxx env libc libm +LIBS += libc libm LIBS += zlib config_args diff --git a/ports/src/app/lighttpd/target.mk b/ports/src/app/lighttpd/target.mk index 7542df2f86..0d05c703f0 100644 --- a/ports/src/app/lighttpd/target.mk +++ b/ports/src/app/lighttpd/target.mk @@ -2,4 +2,4 @@ TARGET = lighttpd include $(REP_DIR)/src/app/lighttpd/target.inc -LIBS += cxx env libc libm libc_log libc_fs libc_lwip_nic_dhcp +LIBS += libc libm libc_log libc_fs libc_lwip_nic_dhcp diff --git a/ports/src/noux-pkg/gcc/target.inc b/ports/src/noux-pkg/gcc/target.inc index b99bfc5bb0..3e62f01070 100644 --- a/ports/src/noux-pkg/gcc/target.inc +++ b/ports/src/noux-pkg/gcc/target.inc @@ -61,7 +61,7 @@ libgmp.a libmpfr.a libmpc.a libc.a: Makefile: dummy_libs -LIBS += cxx env libc libm libc_noux +LIBS += libc libm libc_noux NOUX_PKG_DIR = $(wildcard $(REP_DIR)/contrib/gcc-*) diff --git a/ports/src/noux/minimal/target.mk b/ports/src/noux/minimal/target.mk index c9f5fc92f4..986280c4f1 100644 --- a/ports/src/noux/minimal/target.mk +++ b/ports/src/noux/minimal/target.mk @@ -1,5 +1,5 @@ TARGET = noux -LIBS = cxx env server child signal thread alarm +LIBS = base alarm SRC_CC = main.cc dummy_net.cc INC_DIR += $(PRG_DIR) INC_DIR += $(PRG_DIR)/../ diff --git a/ports/src/noux/net/target.mk b/ports/src/noux/net/target.mk index 159a0d8702..67877462b0 100644 --- a/ports/src/noux/net/target.mk +++ b/ports/src/noux/net/target.mk @@ -1,7 +1,5 @@ TARGET = noux_net -LIBS = cxx env server child signal lwip thread alarm - -LIBS += libc libc_lwip +LIBS += alarm libc libc_lwip SRC_CC = main.cc net.cc diff --git a/ports/src/test/gdb_monitor/target.mk b/ports/src/test/gdb_monitor/target.mk index c4f855de02..35bef36635 100644 --- a/ports/src/test/gdb_monitor/target.mk +++ b/ports/src/test/gdb_monitor/target.mk @@ -1,3 +1,3 @@ TARGET = test-gdb_monitor SRC_CC = main.cc -LIBS = env thread libc libc_log +LIBS = libc libc_log diff --git a/ports/src/test/gdb_monitor_target_config/target.mk b/ports/src/test/gdb_monitor_target_config/target.mk index d5b086991f..44568173e2 100644 --- a/ports/src/test/gdb_monitor_target_config/target.mk +++ b/ports/src/test/gdb_monitor_target_config/target.mk @@ -1,3 +1,3 @@ TARGET = test-gdb_monitor_target_config SRC_CC = main.cc -LIBS = env +LIBS = base diff --git a/ports/src/vancouver/target.mk b/ports/src/vancouver/target.mk index c64019ee41..844df81944 100644 --- a/ports/src/vancouver/target.mk +++ b/ports/src/vancouver/target.mk @@ -10,8 +10,8 @@ ifeq ($(wildcard $(VANCOUVER_DIR)),) REQUIRES += prepare_ports_vancouver endif -LIBS += cxx env blit thread alarm signal server -SRC_CC = main.cc nova_user_env.cc device_model_registry.cc +LIBS += base blit alarm +SRC_CC = main.cc nova_user_env.cc device_model_registry.cc SRC_CC += console.cc keyboard.cc network.cc disk.cc SRC_BIN = mono.tff diff --git a/qt4/lib/mk/qt_core.mk b/qt4/lib/mk/qt_core.mk index 21b78bfe89..6e5fdbd5ad 100644 --- a/qt4/lib/mk/qt_core.mk +++ b/qt4/lib/mk/qt_core.mk @@ -36,7 +36,7 @@ INC_DIR += $(REP_DIR)/include/qt4/QtCore/private \ $(REP_DIR)/contrib/$(QT4)/include/QtCore/private \ $(REP_DIR)/contrib/$(QT4)/src/3rdparty/harfbuzz/src -LIBS += launchpad server cxx env thread zlib libc libm alarm libc_lock_pipe +LIBS += launchpad zlib libc libm alarm libc_lock_pipe vpath % $(REP_DIR)/include/qt4/QtCore vpath % $(REP_DIR)/include/qt4/QtCore/private