xref: /haiku/src/tests/system/boot/loader/Jamfile (revision 7a74a5df454197933bc6e80a542102362ee98703)
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_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 efi ;
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	efi_gpt.cpp
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	} else {
75		#SubDirC++Flags $(defines) -DHAVE_READ_POS=1 -fcheck-memory-usage -D_NO_INLINE_ASM ;
76		SubDirC++Flags $(defines) -DHAVE_READ_POS=1 -D_NO_INLINE_ASM ;
77	}
78}
79
80SimpleTest BootLoaderTest :
81	# userland bindings
82	platform_start.cpp
83	platform_console.cpp
84	platform_debug.cpp
85	platform_devices.cpp
86	platform_heap.cpp
87	platform_menu.cpp
88	platform_misc.cpp
89	platform_mmu.cpp
90	Handle.cpp
91
92	# boot loader
93	main.cpp
94	vfs.cpp
95	partitions.cpp
96	RootFileSystem.cpp
97	elf.cpp
98	menu.cpp
99	loader.cpp
100	kernel_args.cpp
101	load_driver_settings.cpp
102	pager.cpp
103
104	# partitioning systems
105	amiga_rdb.cpp
106	apple.cpp
107	efi_gpt.cpp
108	intel.cpp
109	PartitionMap.cpp
110	PartitionMapParser.cpp
111
112	# utility functions
113	list.cpp
114	driver_settings.cpp
115	ring_buffer.cpp
116	KMessage.cpp
117
118	:
119	boottest_bfs.a boottest_amiga_ffs.a boottest_tarfs.a libz.a
120	kernelland_emu
121;
122
123# Tell Jam where to find the utility sources
124
125SEARCH on [ FGristFiles list.cpp ring_buffer.cpp ]
126	= [ FDirName $(HAIKU_TOP) src system kernel util ] ;
127
128SEARCH on [ FGristFiles KMessage.cpp ]
129    = [ FDirName $(HAIKU_TOP) src system kernel messaging ] ;
130
131SEARCH on [ FGristFiles strlcat.c strlcpy.c ]
132	= [ FDirName $(HAIKU_TOP) src system libroot posix string ] ;
133
134SEARCH on [ FGristFiles driver_settings.cpp ]
135	= [ FDirName $(HAIKU_TOP) src system libroot os ] ;
136
137SEARCH on [ FGristFiles
138		main.cpp vfs.cpp partitions.cpp
139		heap.cpp RootFileSystem.cpp
140		elf.cpp menu.cpp loader.cpp
141		kernel_args.cpp load_driver_settings.cpp pager.cpp
142	] = [ FDirName $(HAIKU_TOP) src system boot loader ] ;
143
144# partitioning system modules
145
146SEARCH on [ FGristFiles amiga_rdb.cpp ]
147	= [ FDirName $(HAIKU_TOP) src add-ons kernel partitioning_systems amiga ] ;
148
149SEARCH on [ FGristFiles apple.cpp ]
150	= [ FDirName $(HAIKU_TOP) src add-ons kernel partitioning_systems apple ] ;
151
152SEARCH on [ FGristFiles efi_gpt.cpp ]
153	= [ FDirName $(HAIKU_TOP) src add-ons kernel partitioning_systems efi ] ;
154
155SEARCH on [ FGristFiles intel.cpp PartitionMap.cpp PartitionMapParser.cpp ]
156	= [ FDirName $(HAIKU_TOP) src add-ons kernel partitioning_systems intel ] ;
157
158
159SubInclude HAIKU_TOP src tests system boot loader file_systems ;
160