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 66f13e018..000000000 --- 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 000000000..e11e97cca --- /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 000000000..a63bf952e --- /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 b77ed0d06..000000000 --- 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 f7b38556c..000000000 --- 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 9a85fb2e4..000000000 --- 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 be1457625..000000000 --- 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 24f25bcf8..000000000 --- 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 7b10977e1..d01571180 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 000000000..be0cff727 --- /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 a0741ed3b..000000000 --- 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 3ad6ea616..39ed37f32 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 17ca0139f..e39d4f4e4 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 000000000..e53cdd8d1 --- /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 9dda379a2..000000000 --- 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 000000000..f38c97601 --- /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 000000000..2a2262239 --- /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 663cf64b9..000000000 --- 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 282f5ab24..000000000 --- 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 75eddeef1..000000000 --- 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 c22e66d22..000000000 --- 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 a3b2d14bd..000000000 --- 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 3b9253af3..6d76b306b 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 f017a8017..789c72401 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 000000000..05e75393e --- /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 33f3e6cfd..000000000 --- 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 14b52c669..000000000 --- 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 000000000..071cb7009 --- /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 000000000..8f0a09bb4 --- /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 663cf64b9..000000000 --- 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 09b9d721d..000000000 --- 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 9a9abfc51..000000000 --- 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 83ab108db..000000000 --- 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 eb4f42e1e..000000000 --- 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 3487331b9..000000000 --- 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 de155386e..000000000 --- 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 74ce01970..000000000 --- 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 000000000..fd290b51d --- /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 010cede4f..000000000 --- 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 8c2ef8fe0..000000000 --- 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 000000000..73a62387d --- /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 9586dd77b..000000000 --- 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 cc3c00505..000000000 --- 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 4a383fec8..29404f7af 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 245c62626..e3a73f24e 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 674179f6d..d36e32095 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 792c02df2..403543f96 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 000000000..9c44da0dc --- /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 a0fa6a56b..000000000 --- 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 000000000..172827d0c --- /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 f9f79d7b2..000000000 --- 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 52ec507d5..000000000 --- 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 a79c1d9a1..000000000 --- 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 c22e66d22..000000000 --- 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 8f910d8e9..000000000 --- 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 ab78bc8e0..29039ccd3 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 2bde9b7e6..000000000 --- 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 000000000..9c7ee5880 --- /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 000000000..a5b257a30 --- /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 ebf40787e..000000000 --- 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 0978d38cc..000000000 --- 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 fedbaf060..000000000 --- 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 3b85980e7..000000000 --- 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 da4dd0f27..000000000 --- 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 43d680386..000000000 --- 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 000000000..c074c776c --- /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 db910a6a1..000000000 --- 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 7a813ef64..000000000 --- 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 b43851154..61b732e5e 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 82c9a501c..24629ca07 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 ec4504b19..f32a7497e 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 33c77392d..f62460193 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 26a2a7d05..a4af0d337 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 dcf021895..6d9cff86f 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 000000000..45b1f07fe --- /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 000000000..3cc6e6861 --- /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 32ba72675..000000000 --- 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 d458722a2..000000000 --- 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 0664bedce..000000000 --- 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 51b073080..000000000 --- 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 f2065dc3b..ce0a8283b 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 1e3d7795a..000000000 --- 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 db22b1f6d..000000000 --- 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 000000000..aae6655f0 --- /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 765f02b6d..de2ff3bf9 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 000000000..3a54314ce --- /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 248c5902a..c10565d9b 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 39d0da246..a565f6cdd 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 283e42209..097a8a9b3 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 c68e6a008..c60fda16e 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 66a5e93d9..ff7543a6d 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 7a7242111..f308a0b76 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 6f404deb1..1340121da 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 fc9d74112..158a12112 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 ce1e067cd..2505d5ffa 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 000000000..70fb31be6 --- /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 000000000..e73fe2a29 --- /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 e69de29bb..000000000 diff --git a/base-nova/lib/mk/core_printf.mk b/base-nova/lib/mk/core_printf.mk deleted file mode 100644 index 663cf64b9..000000000 --- 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 c6f54bc48..000000000 --- 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 c76e486f8..000000000 --- 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 3b968d2b6..000000000 --- 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 3bbdca3d3..000000000 --- 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 de155386e..000000000 --- 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 b599c112e..000000000 --- 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 55444d8bb..000000000 --- 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 000000000..4879b1d23 --- /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 018d9acb9..000000000 --- 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 e8d859266..000000000 --- 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 000000000..5bccc9814 --- /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 e8abfd2fa..000000000 --- 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 57a8c96d3..000000000 --- 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 f538c314d..ac92e4656 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 c8f17a0cf..e65266759 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 024b16ca4..edd745ba7 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 000000000..78687ffe1 --- /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 000000000..8cd239238 --- /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 663cf64b9..000000000 --- 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 282f5ab24..000000000 --- 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 a79c1d9a1..000000000 --- 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 c22e66d22..000000000 --- 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 08888f1bc..000000000 --- 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 78d4d7cea..000000000 --- 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 067c7d14b..c52d22d9d 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 0fc23acd0..b6d4699fc 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 d88cf8875..362915b5b 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 000000000..f38c97601 --- /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 000000000..2a2262239 --- /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 663cf64b9..000000000 --- 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 6ba207822..000000000 --- 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 53fbf85b9..000000000 --- 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 a79c1d9a1..000000000 --- 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 1c3f6ed1a..000000000 --- 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 8cf5e4f08..000000000 --- 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 6e5603ea1..1b896972f 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 7cf706353..4b146b8fe 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 2d339fc66..000000000 --- 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 000000000..f8d8d0397 --- /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 bc0f3037e..000000000 --- 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 7282125a6..000000000 --- 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 f868b0daa..000000000 --- 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 3df277d4b..000000000 --- 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 2185c7c38..ffe5a045e 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 0d6f828b8..000000000 --- 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 3a01cf0d8..000000000 --- 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 bfb490471..000000000 --- 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 4a410956a..000000000 --- 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 9cd2ea242..000000000 --- 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 e51576aa4..000000000 --- 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 744098113..000000000 --- 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 6e08dee0f..000000000 --- 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 de155386e..000000000 --- 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 b778fcbf3..000000000 --- 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 c49922a2d..000000000 --- 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 000000000..b984a4369 --- /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 055ce220b..9916d81e3 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 0dfb937d6..000000000 --- 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 000000000..7d83d37d5 --- /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 000000000..614d4f453 --- /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 fa84aafbc..58c01c5e6 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 e22fe8a77..018520dd3 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 2ffe23499..e97e8ffe4 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 25e10633f..7ea2e80f2 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 024b16ca4..edd745ba7 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 562d33f38..1592f2ea8 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 3bcfb4eb3..103e3a5bc 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 f9a4708d8..9abb1b219 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 68f4614f8..4e385cc5c 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 9294fe3e9..1153d546b 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 c76642aa6..977c857a4 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 2bbb0a9da..230b6c25f 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 30a700d96..c9e78f17d 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 85b612fab..e2d361306 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 df650d128..189fd52ec 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 6b2ded445..5fd8a31f1 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 4863926ab..4126d6eea 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 1d7e3a8cd..99f8448d7 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 317818db7..563402603 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 08072028e..567871102 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 44e5cd10b..59ce45c08 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 9c7e7eaf0..f9a0c6372 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 067a07263..8fbbe750c 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 fe60b844c..302077dda 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 23920849a..46b6e93be 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 0a87601f7..d5d9cd792 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 151ec7e2c..a5fbf47d6 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 173d307fb..3d69e2942 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 a005e0afa..22a0ce6f2 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 142247e02..8dd614f79 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 3a2e5d6c3..863b2465a 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 0e29dc010..ff3bcf0f9 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 f4d2b8b52..e821d0ef8 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 703d8a075..2a1b0320b 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 5fc1b0d3b..bea2bf85b 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 b8d5c3184..dfa9b3b79 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 9787e0d51..633b5c2f4 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 a21989e25..6e81ebb6c 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 b831b5595..c550ca161 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 3f435dc63..f2bd5821e 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 e25096290..f28e4bb0c 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 27ef35914..8cd63f460 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 d81cabe4e..ca96ffb4d 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 d34a5d8e3..a9905c199 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 5ab788d1d..1bc8be18b 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 6264e1648..e50b4fd38 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 842293d94..44e3010ca 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 b64b57834..b9e7094c6 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 b913c3102..b928e5087 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 2abaa0456..47022c7d2 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 d097443e1..454327e23 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 f049e428b..e3735a067 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 86b0f48ec..5c0e2eb11 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 4eb70d988..7c9e40ce8 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 5ab0e80da..008964dee 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 7199a3b33..18b4682b9 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 6f25a0bbb..8611a143c 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 fa05509f5..133823d95 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 c3d99a6b4..610133311 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 a01a6bd02..9f5e5109a 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 1d0562313..ac4741176 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 15528e663..02679aab4 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 2ba540434..5d4c53f67 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 867e43e66..da7dcfa86 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 be438f573..0ff94cef7 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 aee1617dc..d0511ad3e 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 e449c08f1..0145c3d07 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 6cc27d786..fc8efb759 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 6dab90956..744872093 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 2af89bc10..82ce6cd52 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 6152294d4..b41b79351 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 94ed8f16d..db519c9f5 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 da6c2e718..51fc38a0c 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 5ac85d628..22309f149 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 d8608bc6c..88f1e9525 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 8334c1a17..3af220392 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 0c093e933..8df1d66ee 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 81cb4a36b..de662747b 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 6186a8303..f8785075e 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 cbb9d01c0..df89f8cf2 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 c2cca7b2a..cd8c90b1e 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 972fcffc3..f6a7c5a62 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 0e31397cc..7d8163429 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 fe396a353..8fea3e102 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 cedd05bee..3311bd404 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 a836fc816..21a7e738b 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 2286beb32..5e8635fe9 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 d2ca9f6b1..3fa319750 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 0e7dca634..d3509e172 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 8a6efc3af..86ca1f4e7 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 486519e3d..69285ed74 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 61c77f578..7bc110b91 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 2bc25cc62..32da61670 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 dbe3fc642..c19a50696 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 b68cb9a7f..8422bdb91 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 b9f19b115..2d005d15f 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 1049d47ea..d755a7ff0 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 5c92ec349..8998b99c9 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 394e0e041..74e580226 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 47f2a31de..a5872ad86 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 fdf69678e..7148a44e8 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 754675d23..fd764318a 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 acd244f44..d139b832c 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 58fab14ee..64061b042 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 30932a6c4..9c63672bf 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 241ee94f1..c0aaaa218 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 eaa5b382e..0aa75cf79 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 a1ec3391f..5734caf6d 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 06861add6..5023a7f3d 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 e4bc6709b..819c241f2 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 d661a0755..aaa5fe061 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 874b5c3b9..6d3e85930 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 0eb191600..d13b6fbf5 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 38a810cc5..edb0ea7bd 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 4f10baf19..5c7dc1ca8 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 ae63a0b1f..370d77005 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 c63dedd44..f1c1e6d40 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 bcfd65969..feb92edbe 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 affa2df69..09b8fbb69 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 284d910d8..c1142e202 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 cf7798f97..f818a7d7c 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 08c6b4ccb..4312f6981 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 f7a6cfcc4..82565b128 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 5ae37307f..4dc752322 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 664a33531..dae175e8e 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 9b18b9f3a..879b66684 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 b1f183673..45a4db151 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 b708aa84c..55f67a79e 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 359522ff4..ecf06a779 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 f10c6ed91..c9ac3242f 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 055f00a2c..d7d363904 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 71af820da..380d74075 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 82a1696ba..2dc42e662 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 c85615483..bc26ce534 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 21a8a5b8f..fd40103ee 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 75abaecb8..d63a5dc5e 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 05c8b77ea..8c5173192 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 9d9c321e5..493302aef 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 40ea27292..118ba90e0 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 81dd60011..03bd0b41b 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 2bfd153ac..a7ccab986 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 b2d42561a..2091765db 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 779c023c6..c053a985f 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 cb4a2a6c0..a1f9255ec 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 18fbdacec..ab9dd5a0f 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 d016f802d..dcc78183f 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 777c9434f..4c68602a6 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 cfd373221..fbaf2bec3 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 8b9745237..a54d507f5 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 cdfb0923a..ff474ffae 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 490f92be9..4a0c02d59 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 63821de23..df4029687 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 4e29c244d..31e077cf8 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 9d022c300..c1c2cb471 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 209eba349..a96dd9ad1 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 6fc73a3ab..b24210f40 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 7542df2f8..0d05c703f 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 b99bfc5bb..3e62f0107 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 c9f5fc92f..986280c4f 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 159a0d870..67877462b 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 c4f855de0..35bef3663 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 d5b086991..44568173e 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 c64019ee4..844df8194 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 21b78bfe8..6e5fdbd5a 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