haiku/src/system/kernel/Jamfile
Oliver Tappe 0cb3f70926 Revert "Fix build problems of btrfs and packagefs for x86_64."
This reverts commit f272e63f393449d3a816970ca632764895a78cd6.
2013-09-02 12:03:05 +02:00

217 lines
5.4 KiB
Plaintext
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

SubDir HAIKU_TOP src system kernel ;
{
local defines =
HAIKU_ARCH=\\\"$(TARGET_ARCH)\\\"
;
defines = [ FDefines $(defines) ] ;
SubDirCcFlags $(defines) ;
SubDirC++Flags $(defines) ;
}
SEARCH_SOURCE += [ FDirName $(SUBDIR) locks ] ;
SEARCH_SOURCE += [ FDirName $(SUBDIR) scheduler ] ;
UsePrivateHeaders libroot ;
UsePrivateHeaders shared ;
UsePrivateHeaders runtime_loader ;
AddResources kernel_$(TARGET_ARCH) : kernel.rdef ;
SetVersionScript kernel_$(TARGET_ARCH) : kernel_versions ;
SetVersionScript kernel.so : kernel_versions ;
KernelMergeObject kernel_core.o :
boot_item.cpp
boot_splash.cpp
commpage.cpp
condition_variable.cpp
cpu.cpp
DPC.cpp
elf.cpp
guarded_heap.cpp
heap.cpp
image.cpp
int.cpp
kernel_daemon.cpp
linkhack.c
listeners.cpp
low_resource_manager.cpp
main.cpp
module.cpp
Notifications.cpp
port.cpp
real_time_clock.cpp
sem.cpp
shutdown.cpp
signal.cpp
system_info.cpp
smp.cpp
syscalls.cpp
team.cpp
thread.cpp
timer.cpp
UserEvent.cpp
usergroup.cpp
UserTimer.cpp
wait_for_objects.cpp
# locks
lock.cpp
user_mutex.cpp
# scheduler
scheduler.cpp
scheduler_affine.cpp
scheduler_simple.cpp
scheduler_simple_smp.cpp
scheduler_tracing.cpp
scheduling_analysis.cpp
: $(TARGET_KERNEL_PIC_CCFLAGS)
;
# Generate the header defining macros for C++ structure sizes.
local kernelC++StructSizesHeader = [ FGristFiles kernel_c++_struct_sizes.h ] ;
TARGET_HDRS_$(TARGET_PACKAGING_ARCH) on $(kernelC++StructSizesHeader)
= [ on $(kernelC++StructSizesHeader)
return $(TARGET_HDRS_$(TARGET_PACKAGING_ARCH)) ]
$(TARGET_PRIVATE_KERNEL_HEADERS) ;
CreateAsmStructOffsetsHeader $(kernelC++StructSizesHeader)
: kernel_c++_structs.cpp ;
# We need to specify the dependency on the generated syscalls files explicitly.
Includes [ FGristFiles syscalls.cpp ]
:
<syscalls!$(TARGET_PACKAGING_ARCH)>syscall_dispatcher.h
<syscalls!$(TARGET_PACKAGING_ARCH)>syscall_table.h
<syscalls!$(TARGET_PACKAGING_ARCH)>syscall_numbers.h
;
# TODO: fix or update binutils for ppc, in the meantime this should get things going.
local linkHackLdFlags ;
if $(TARGET_ARCH) = ppc {
linkHackLdFlags = -Bdynamic ;
} else {
linkHackLdFlags = -shared -Bdynamic ;
}
KernelLd linkhack.so :
<$(SOURCE_GRIST)>linkhack.o
:
:
$(linkHackLdFlags)
;
KernelLd kernel_$(TARGET_ARCH) :
kernel_cache.o
kernel_core.o
kernel_debug.o
kernel_device_manager.o
kernel_disk_device_manager.o
kernel_fs.o
kernel_messaging.o
kernel_posix.o
kernel_slab.o
kernel_util.o
kernel_vm.o
kernel_arch_$(TARGET_KERNEL_ARCH).o
kernel_platform_$(TARGET_BOOT_PLATFORM).o
linkhack.so
# kernel parts borrowed from libroot and others
kernel_os_main.o
kernel_os_arch_$(TARGET_ARCH).o
kernel_lib_posix.o
kernel_lib_posix_arch_$(TARGET_ARCH).o
kernel_misc.o
$(TARGET_KERNEL_LIBSUPC++)
: $(HAIKU_TOP)/src/system/ldscripts/$(TARGET_ARCH)/kernel.ld
: -Bdynamic -export-dynamic -dynamic-linker /foo/bar
$(TARGET_KERNEL_PIC_LINKFLAGS)
:
;
if $(HAIKU_ARCH) = x86_64 {
# Cannot relink everything as a shared object on x86_64 as shared library
# code is required to be position-independent. Instead create a copy of the
# executable kernel image and change the ELF header type to DYN. A bit of
# a hack, but avoids having to recompile a PIC copy of the kernel code.
# kernel.so is only used when linking modules to provide symbol information,
# this is sufficient for that purpose.
KernelSo kernel.so : kernel_$(TARGET_ARCH) ;
} else {
KernelLd kernel.so :
kernel_cache.o
kernel_core.o
kernel_debug.o
kernel_device_manager.o
kernel_disk_device_manager.o
kernel_fs.o
kernel_messaging.o
kernel_posix.o
kernel_slab.o
kernel_util.o
kernel_vm.o
kernel_arch_$(TARGET_KERNEL_ARCH).o
kernel_platform_$(TARGET_BOOT_PLATFORM).o
linkhack.so
# kernel libroot parts
kernel_os_main.o
kernel_os_arch_$(TARGET_ARCH).o
kernel_lib_posix.o
kernel_lib_posix_arch_$(TARGET_ARCH).o
kernel_misc.o
$(TARGET_KERNEL_LIBSUPC++)
: $(HAIKU_TOP)/src/system/ldscripts/$(TARGET_ARCH)/kernel.ld
: -Bdynamic -shared -export-dynamic -dynamic-linker /foo/bar
$(TARGET_KERNEL_PIC_LINKFLAGS)
;
}
NotFile kernel ;
Depends kernel : kernel_$(TARGET_ARCH) ;
Depends kernel.so : kernel ;
# kernel.so will be rebuilt with the kernel
# propagate the container update variable from kernel to kernel_$(TARGET_ARCH)
PropagateContainerUpdateTargetFlags kernel_$(TARGET_ARCH) : kernel ;
# Copy kernel and update the copy's revision section. We link everything
# against the original, but the copy will end up on the disk image (this way
# we avoid unnecessary dependencies). The copy will be located in a subdirectory.
if $(TARGET_PLATFORM) = haiku {
MakeLocate <revisioned>kernel_$(TARGET_ARCH)
: [ FDirName $(TARGET_DEBUG_$(DEBUG)_LOCATE_TARGET) revisioned ] ;
CopySetHaikuRevision <revisioned>kernel_$(TARGET_ARCH)
: kernel_$(TARGET_ARCH) ;
}
SubInclude HAIKU_TOP src system kernel arch ;
SubInclude HAIKU_TOP src system kernel cache ;
SubInclude HAIKU_TOP src system kernel device_manager ;
SubInclude HAIKU_TOP src system kernel debug ;
SubInclude HAIKU_TOP src system kernel disk_device_manager ;
SubInclude HAIKU_TOP src system kernel fs ;
SubInclude HAIKU_TOP src system kernel lib ;
SubInclude HAIKU_TOP src system kernel messaging ;
SubInclude HAIKU_TOP src system kernel posix ;
SubInclude HAIKU_TOP src system kernel slab ;
SubInclude HAIKU_TOP src system kernel util ;
SubInclude HAIKU_TOP src system kernel vm ;
if $(TARGET_BOOT_PLATFORM) {
SubInclude HAIKU_TOP src system kernel platform $(TARGET_BOOT_PLATFORM) ;
}