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