xref: /haiku/src/tests/system/boot/loader/Jamfile (revision 5d0fd0e4220b461e2021d5768ebaa936c13417f8)
1SubDir HAIKU_TOP src tests system boot loader ;
2
3SetSubDirSupportedPlatformsBeOSCompatible ;
4
5UsePrivateHeaders [ FDirName kernel disk_device_manager ] ;
6UsePrivateHeaders [ FDirName kernel util ] ;
7UsePrivateHeaders kernel shared storage system ;
8SubDirSysHdrs $(HAIKU_TOP) headers private kernel arch $(TARGET_KERNEL_ARCH) ;
9SubDirSysHdrs $(HAIKU_TOP) headers private system arch $(TARGET_ARCH) ;
10SubDirSysHdrs $(HAIKU_TOP) src tests system boot loader ;
11SubDirHdrs $(HAIKU_TOP) src system boot loader ;
12SubDirHdrs $(HAIKU_TOP) src add-ons kernel partitioning_systems amiga ;
13SubDirHdrs $(HAIKU_TOP) src add-ons kernel partitioning_systems apple ;
14SubDirHdrs $(HAIKU_TOP) src add-ons kernel partitioning_systems gpt ;
15SubDirHdrs $(HAIKU_TOP) src add-ons kernel partitioning_systems intel ;
16
17# we need to redefine certain calls in the boot loader so that
18# they will really be used instead of their POSIX counterparts
19# in libroot.so
20
21ObjectDefines
22	# boot loader
23	main.cpp
24	vfs.cpp
25	partitions.cpp
26	RootFileSystem.cpp
27	elf.cpp
28	menu.cpp
29	loader.cpp
30	kernel_args.cpp
31	load_driver_settings.cpp
32	pager.cpp
33
34	# other
35	platform_menu.cpp
36	driver_settings.cpp
37
38	# partitions
39	amiga_rdb.cpp
40	apple.cpp
41
42	efi_gpt.cpp
43	Header.cpp
44	crc32.cpp
45	utility.cpp
46
47	intel.cpp
48	PartitionMap.cpp
49	PartitionMapParser.cpp
50	:
51	read_pos=boot_read_pos fstat=boot_fstat open=boot_open close=boot_close main=boot_main
52	;
53
54{
55	local defines =
56		_BOOT_MODE
57		BOOT_ARCH=\\\"$(TARGET_ARCH)\\\"
58			# the boot loader test application will try to load the BeOS kernel
59			# from a supported partition/file system
60
61		BOOT_SUPPORT_PARTITION_AMIGA
62		BOOT_SUPPORT_PARTITION_APPLE
63		BOOT_SUPPORT_PARTITION_EFI
64		BOOT_SUPPORT_PARTITION_INTEL
65
66		BOOT_SUPPORT_FILE_SYSTEM_BFS
67		BOOT_SUPPORT_FILE_SYSTEM_AMIGA_FFS
68		BOOT_SUPPORT_FILE_SYSTEM_TARFS
69		;
70
71	defines = [ FDefines $(defines) ] ;
72
73	if $(OS) = "LINUX" {
74		SubDirC++Flags $(defines) ;
75	} else {
76		#SubDirC++Flags $(defines) -DHAVE_READ_POS=1 -fcheck-memory-usage -D_NO_INLINE_ASM ;
77		SubDirC++Flags $(defines) -DHAVE_READ_POS=1 -D_NO_INLINE_ASM ;
78	}
79}
80
81SimpleTest BootLoaderTest :
82	# userland bindings
83	platform_start.cpp
84	platform_console.cpp
85	platform_debug.cpp
86	platform_devices.cpp
87	platform_heap.cpp
88	platform_menu.cpp
89	platform_misc.cpp
90	platform_mmu.cpp
91	Handle.cpp
92
93	# boot loader
94	main.cpp
95	vfs.cpp
96	partitions.cpp
97	RootFileSystem.cpp
98	elf.cpp
99	menu.cpp
100	loader.cpp
101	kernel_args.cpp
102	load_driver_settings.cpp
103	pager.cpp
104
105	# partitioning systems
106	amiga_rdb.cpp
107	apple.cpp
108
109	efi_gpt.cpp
110	Header.cpp
111	crc32.cpp
112	utility.cpp
113
114	intel.cpp
115	PartitionMap.cpp
116	PartitionMapParser.cpp
117
118	# utility functions
119	list.cpp
120	driver_settings.cpp
121	ring_buffer.cpp
122	KMessage.cpp
123
124	:
125	boottest_bfs.a boottest_amiga_ffs.a boottest_tarfs.a libz.a
126	kernelland_emu
127;
128
129# Tell Jam where to find the utility sources
130
131SEARCH on [ FGristFiles list.cpp ring_buffer.cpp ]
132	= [ FDirName $(HAIKU_TOP) src system kernel util ] ;
133
134SEARCH on [ FGristFiles KMessage.cpp ]
135    = [ FDirName $(HAIKU_TOP) src system kernel messaging ] ;
136
137SEARCH on [ FGristFiles strlcat.c strlcpy.c ]
138	= [ FDirName $(HAIKU_TOP) src system libroot posix string ] ;
139
140SEARCH on [ FGristFiles driver_settings.cpp ]
141	= [ FDirName $(HAIKU_TOP) src system libroot os ] ;
142
143SEARCH on [ FGristFiles
144		main.cpp vfs.cpp partitions.cpp
145		heap.cpp RootFileSystem.cpp
146		elf.cpp menu.cpp loader.cpp
147		kernel_args.cpp load_driver_settings.cpp pager.cpp
148	] = [ FDirName $(HAIKU_TOP) src system boot loader ] ;
149
150# partitioning system modules
151
152SEARCH on [ FGristFiles amiga_rdb.cpp ]
153	= [ FDirName $(HAIKU_TOP) src add-ons kernel partitioning_systems amiga ] ;
154
155SEARCH on [ FGristFiles apple.cpp ]
156	= [ FDirName $(HAIKU_TOP) src add-ons kernel partitioning_systems apple ] ;
157
158SEARCH on [ FGristFiles efi_gpt.cpp Header.cpp crc32.cpp utility.cpp ]
159	= [ FDirName $(HAIKU_TOP) src add-ons kernel partitioning_systems gpt ] ;
160
161SEARCH on [ FGristFiles intel.cpp PartitionMap.cpp PartitionMapParser.cpp ]
162	= [ FDirName $(HAIKU_TOP) src add-ons kernel partitioning_systems intel ] ;
163
164
165SubInclude HAIKU_TOP src tests system boot loader file_systems ;
166