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