xref: /haiku/src/system/kernel/arch/x86/Jamfile (revision 02354704729d38c3b078c696adc1bbbd33cbcf72)
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.cpp
26		descriptors.cpp
27		errata.cpp
28		interrupts.S
29		signals.cpp
30		signals_asm.S
31		syscalls.cpp
32		thread.cpp
33
34		# paging
35		x86_physical_page_mapper_mapped.cpp
36
37		# paging/64bit
38		X86PagingMethod64Bit.cpp
39		X86PagingStructures64Bit.cpp
40		X86VMTranslationMap64Bit.cpp
41	;
42} else {
43	SEARCH_SOURCE += [ FDirName $(SUBDIR) 32 ] ;
44	SEARCH_SOURCE += [ FDirName $(SUBDIR) paging 32bit ] ;
45	SEARCH_SOURCE += [ FDirName $(SUBDIR) paging pae ] ;
46
47	archSpecificSources =
48		apm.cpp
49		arch.S
50		bios.cpp
51		cpuid.S
52		descriptors.cpp
53		errata.cpp
54		interrupts.S
55		signals.cpp
56		signals_asm.S
57		syscalls.cpp
58		syscalls_asm.S
59		thread.cpp
60
61		# paging
62		x86_physical_page_mapper_large_memory.cpp
63
64		# paging/32bit
65		X86PagingMethod32Bit.cpp
66		X86PagingStructures32Bit.cpp
67		X86VMTranslationMap32Bit.cpp
68
69		# paging/pae
70		X86PagingMethodPAE.cpp
71		X86PagingStructuresPAE.cpp
72		X86VMTranslationMapPAE.cpp
73	;
74}
75
76local archGenericSources =
77	arch_altcodepatch.cpp
78	arch_cpu.cpp
79	arch_commpage.cpp
80	arch_debug.cpp
81	arch_debug_console.cpp
82	arch_elf.cpp
83	arch_int.cpp
84	arch_platform.cpp
85	arch_real_time_clock.cpp
86	arch_smp.cpp
87	arch_system_info.cpp
88	arch_thread.cpp
89	arch_timer.cpp
90	arch_user_debugger.cpp
91	arch_vm.cpp
92	arch_vm_translation_map.cpp
93	apic.cpp
94	ioapic.cpp
95	irq_routing_table.cpp
96	msi.cpp
97	pic.cpp
98
99	# paging
100	X86PagingMethod.cpp
101	X86PagingStructures.cpp
102	X86VMTranslationMap.cpp
103
104	# timers
105	x86_apic.cpp
106	x86_hpet.cpp
107	x86_pit.cpp
108;
109
110KernelMergeObject kernel_arch_$(TARGET_KERNEL_ARCH).o :
111	$(archSpecificSources)
112	$(archGenericSources)
113	:
114	$(TARGET_KERNEL_PIC_CCFLAGS)
115;
116
117CreateAsmStructOffsetsHeader asm_offsets.h : asm_offsets.cpp : $(TARGET_KERNEL_ARCH) ;
118
119# We need to specify the dependency on the generated syscalls file explicitly.
120Includes [ FGristFiles interrupts.S arch.S signals.cpp signals_asm.S ]
121	: <syscalls!$(TARGET_PACKAGING_ARCH)>syscall_numbers.h ;
122Includes [ FGristFiles interrupts.S ]
123	: <syscalls!$(TARGET_PACKAGING_ARCH)>syscall_table.h ;
124