xref: /haiku/src/system/kernel/Jamfile (revision 5115ca085884f7b604a3d607688f0ca20fb7cf57)
1SubDir HAIKU_TOP src system kernel ;
2
3{
4	local defines =
5		HAIKU_ARCH=\\\"$(TARGET_ARCH)\\\"
6		;
7
8	defines = [ FDefines $(defines) ] ;
9	SubDirCcFlags $(defines) ;
10	SubDirC++Flags $(defines) ;
11}
12
13AddResources kernel_$(TARGET_ARCH) : kernel.rdef ;
14
15KernelMergeObject kernel_core.o :
16	boot_item.cpp
17	cpu.c
18	elf.cpp
19	heap.c
20	image.c
21	int.c
22	kernel_daemon.c
23	linkhack.c
24	lock.c
25	main.c
26	module.cpp
27	port.c
28	real_time_clock.c
29	scheduler.cpp
30	sem.c
31	shutdown.c
32	signal.c
33	system_info.c
34	smp.c
35	syscalls.c
36	team.c
37	thread.c
38	timer.c
39
40	: $(TARGET_KERNEL_PIC_CCFLAGS)
41;
42
43# We need to specify the dependency on the generated syscalls files explicitly.
44Includes [ FGristFiles syscalls.c ]
45	: <syscalls>syscall_dispatcher.h <syscalls>syscall_table.h ;
46
47KernelLd linkhack.so :
48	<$(SOURCE_GRIST)>linkhack.o
49	:
50	:
51	-shared -Bdynamic
52;
53
54KernelLd kernel_$(TARGET_ARCH) :
55	kernel_core.o
56	kernel_fs.o
57	kernel_vm.o
58	kernel_cache.o
59	kernel_device_manager.o
60	kernel_disk_device_manager.o
61	kernel_util.o
62	kernel_messaging.o
63	kernel_debug.o
64	kernel_slab.o
65
66	lib$(TARGET_ARCH).a
67	kernel_platform_$(TARGET_BOOT_PLATFORM).o
68
69	linkhack.so
70
71	# kernel libroot parts
72	kernel_os_main.o
73	kernel_os_arch_$(TARGET_ARCH).o
74	kernel_posix.o
75	kernel_posix_arch_$(TARGET_ARCH).o
76
77	$(HAIKU_STATIC_LIBSUPC++)
78
79	: $(HAIKU_TOP)/src/system/ldscripts/$(TARGET_ARCH)/kernel.ld
80	: -Bdynamic -export-dynamic -dynamic-linker /foo/bar
81	  $(TARGET_KERNEL_PIC_LINKFLAGS)
82	:
83;
84
85KernelLd kernel.so :
86	kernel_core.o
87	kernel_fs.o
88	kernel_vm.o
89	kernel_cache.o
90	kernel_device_manager.o
91	kernel_disk_device_manager.o
92	kernel_util.o
93	kernel_messaging.o
94	kernel_debug.o
95	kernel_slab.o
96
97	lib$(TARGET_ARCH).a
98	kernel_platform_$(TARGET_BOOT_PLATFORM).o
99
100	linkhack.so
101
102	# kernel libroot parts
103	kernel_os_main.o
104	kernel_os_arch_$(TARGET_ARCH).o
105	kernel_posix.o
106	kernel_posix_arch_$(TARGET_ARCH).o
107
108	$(HAIKU_STATIC_LIBSUPC++)
109
110	: $(HAIKU_TOP)/src/system/ldscripts/$(TARGET_ARCH)/kernel.ld
111	: -Bdynamic -shared -export-dynamic -dynamic-linker /foo/bar
112	  $(TARGET_KERNEL_PIC_LINKFLAGS)
113;
114
115NotFile kernel ;
116Depends kernel : kernel_$(TARGET_ARCH) ;
117Depends kernel.so : kernel ;
118	# kernel.so will be rebuilt with the kernel
119
120
121SubInclude HAIKU_TOP src system kernel arch ;
122SubInclude HAIKU_TOP src system kernel cache ;
123SubInclude HAIKU_TOP src system kernel device_manager ;
124SubInclude HAIKU_TOP src system kernel debug ;
125SubInclude HAIKU_TOP src system kernel disk_device_manager ;
126SubInclude HAIKU_TOP src system kernel fs ;
127SubInclude HAIKU_TOP src system kernel lib ;
128SubInclude HAIKU_TOP src system kernel messaging ;
129SubInclude HAIKU_TOP src system kernel slab ;
130SubInclude HAIKU_TOP src system kernel util ;
131SubInclude HAIKU_TOP src system kernel vm ;
132
133if $(TARGET_BOOT_PLATFORM) {
134	SubInclude HAIKU_TOP src system kernel platform $(TARGET_BOOT_PLATFORM) ;
135}
136