xref: /haiku/src/system/kernel/arch/x86/Jamfile (revision 5e96d7d537fbec23bad4ae9b4c8e7b02e769f0c6)
1SubDir HAIKU_TOP src system kernel arch x86 ;
2
3SubDirHdrs [ FDirName $(TARGET_COMMON_DEBUG_OBJECT_DIR_$(TARGET_PACKAGING_ARCH))
4	system kernel ] ;
5	# for syscall_numbers.h
6SubDirHdrs $(HAIKU_TOP) src add-ons kernel bus_managers ps2 ;
7SubDirHdrs $(HAIKU_TOP) src add-ons kernel bus_managers acpi acpica include ;
8SubDirHdrs $(HAIKU_TOP) src add-ons kernel bus_managers acpi acpica include
9	platform ;
10SubDirHdrs $(SUBDIR) timers ;
11
12UsePrivateKernelHeaders ;
13UsePrivateHeaders shared ;
14
15SEARCH_SOURCE += [ FDirName $(SUBDIR) paging ] ;
16SEARCH_SOURCE += [ FDirName $(SUBDIR) timers ] ;
17
18local archSpecificSources ;
19if $(TARGET_ARCH) = x86_64 {
20	SEARCH_SOURCE += [ FDirName $(SUBDIR) 64 ] ;
21	SEARCH_SOURCE += [ FDirName $(SUBDIR) paging 64bit ] ;
22
23	archSpecificSources =
24		arch.S
25		cpuid.S
26		descriptors.cpp
27		interrupts.S
28		signals.cpp
29		signals_asm.S
30		syscalls.cpp
31		thread.cpp
32
33		# paging
34		x86_physical_page_mapper_mapped.cpp
35
36		# paging/64bit
37		X86PagingMethod64Bit.cpp
38		X86PagingStructures64Bit.cpp
39		X86VMTranslationMap64Bit.cpp
40	;
41} else {
42	SEARCH_SOURCE += [ FDirName $(SUBDIR) 32 ] ;
43	SEARCH_SOURCE += [ FDirName $(SUBDIR) paging 32bit ] ;
44	SEARCH_SOURCE += [ FDirName $(SUBDIR) paging pae ] ;
45
46	archSpecificSources =
47		apm.cpp
48		arch.S
49		bios.cpp
50		cpuid.S
51		descriptors.cpp
52		interrupts.S
53		signals.cpp
54		signals_asm.S
55		syscalls.cpp
56		syscalls_asm.S
57		thread.cpp
58
59		# paging
60		x86_physical_page_mapper_large_memory.cpp
61
62		# paging/32bit
63		X86PagingMethod32Bit.cpp
64		X86PagingStructures32Bit.cpp
65		X86VMTranslationMap32Bit.cpp
66
67		# paging/pae
68		X86PagingMethodPAE.cpp
69		X86PagingStructuresPAE.cpp
70		X86VMTranslationMapPAE.cpp
71	;
72}
73
74local archGenericSources =
75	arch_cpu.cpp
76	arch_commpage.cpp
77	arch_debug.cpp
78	arch_debug_console.cpp
79	arch_elf.cpp
80	arch_int.cpp
81	arch_platform.cpp
82	arch_real_time_clock.cpp
83	arch_smp.cpp
84	arch_system_info.cpp
85	arch_thread.cpp
86	arch_timer.cpp
87	arch_user_debugger.cpp
88	arch_vm.cpp
89	arch_vm_translation_map.cpp
90	apic.cpp
91	ioapic.cpp
92	irq_routing_table.cpp
93	msi.cpp
94	pic.cpp
95
96	# paging
97	x86_physical_page_mapper.cpp
98	X86PagingMethod.cpp
99	X86PagingStructures.cpp
100	X86VMTranslationMap.cpp
101
102	# timers
103	x86_apic.cpp
104	x86_hpet.cpp
105	x86_pit.cpp
106;
107
108KernelMergeObject kernel_arch_x86.o :
109	$(archSpecificSources)
110	$(archGenericSources)
111	:
112	$(TARGET_KERNEL_PIC_CCFLAGS)
113;
114
115CreateAsmStructOffsetsHeader asm_offsets.h : asm_offsets.cpp ;
116
117# We need to specify the dependency on the generated syscalls file explicitly.
118Includes [ FGristFiles interrupts.S arch.S signals.cpp signals_asm.S ]
119	: <syscalls!$(TARGET_PACKAGING_ARCH)>syscall_numbers.h ;
120Includes [ FGristFiles interrupts.S ]
121	: <syscalls!$(TARGET_PACKAGING_ARCH)>syscall_table.h ;
122