xref: /haiku/src/tests/system/boot/loader/Jamfile (revision 020cbad9d40235a2c50a81a42d69912a5ff8fbc4)
1SubDir HAIKU_TOP src tests system boot loader ;
2
3SetSubDirSupportedPlatformsBeOSCompatible ;
4
5UsePrivateHeaders [ FDirName kernel ] ;
6UsePrivateHeaders [ FDirName kernel disk_device_manager ] ;
7UsePrivateHeaders [ FDirName storage ] ;
8UsePrivateHeaders [ FDirName shared ] ;
9SubDirSysHdrs $(HAIKU_TOP) headers private kernel 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
38	# other
39	platform_menu.cpp
40	driver_settings.c
41
42	# partitions
43	amiga_rdb.cpp
44	apple.cpp
45	efi_gpt.cpp
46	intel.cpp
47	PartitionMap.cpp
48	PartitionMapParser.cpp
49	:
50	read_pos=boot_read_pos fstat=boot_fstat open=boot_open close=boot_close main=boot_main
51	;
52
53{
54	local defines =
55		_BOOT_MODE
56		BOOT_ARCH=\\\"$(TARGET_ARCH)\\\"
57			# the boot loader test application will try to load the BeOS kernel
58			# from a supported partition/file system
59
60		BOOT_SUPPORT_PARTITION_AMIGA
61		BOOT_SUPPORT_PARTITION_APPLE
62		BOOT_SUPPORT_PARTITION_EFI
63		BOOT_SUPPORT_PARTITION_INTEL
64
65		BOOT_SUPPORT_FILE_SYSTEM_BFS
66		BOOT_SUPPORT_FILE_SYSTEM_AMIGA_FFS
67		BOOT_SUPPORT_FILE_SYSTEM_TARFS
68		;
69
70	defines = [ FDefines $(defines) ] ;
71
72	if $(OS) = "LINUX" {
73	} else {
74		#SubDirC++Flags $(defines) -DHAVE_READ_POS=1 -fcheck-memory-usage -D_NO_INLINE_ASM ;
75		SubDirC++Flags $(defines) -DHAVE_READ_POS=1 -D_NO_INLINE_ASM ;
76	}
77}
78
79SimpleTest BootLoaderTest :
80	# userland bindings
81	platform_start.cpp
82	platform_debug.cpp
83	platform_devices.cpp
84	platform_heap.cpp
85	platform_menu.cpp
86	platform_misc.cpp
87	platform_mmu.cpp
88	Handle.cpp
89
90	# boot loader
91	main.cpp
92	vfs.cpp
93	partitions.cpp
94	RootFileSystem.cpp
95	elf.cpp
96	menu.cpp
97	loader.cpp
98	kernel_args.cpp
99	load_driver_settings.cpp
100
101	# partitioning systems
102	amiga_rdb.cpp
103	apple.cpp
104	efi_gpt.cpp
105	intel.cpp
106	PartitionMap.cpp
107	PartitionMapParser.cpp
108
109	# utility functions - Dano has a strlcpy() function in libroot.so, while R5 has not
110	list.c
111	strlcat.c
112	strlcpy.c
113	driver_settings.c
114	KMessage.cpp
115
116	: boottest_bfs.a boottest_amiga_ffs.a boottest_tarfs.a libz.a
117	;
118
119# Tell Jam where to find the utility sources
120
121SEARCH on [ FGristFiles list.c ]
122	= [ FDirName $(HAIKU_TOP) src system kernel util ] ;
123
124SEARCH on [ FGristFiles KMessage.cpp ]
125    = [ FDirName $(HAIKU_TOP) src system kernel messaging ] ;
126
127SEARCH on [ FGristFiles strlcat.c strlcpy.c ]
128	= [ FDirName $(HAIKU_TOP) src system libroot posix string ] ;
129
130SEARCH on [ FGristFiles driver_settings.c ]
131	= [ FDirName $(HAIKU_TOP) src system libroot os ] ;
132
133SEARCH on [ FGristFiles
134		main.cpp vfs.cpp partitions.cpp
135		heap.cpp RootFileSystem.cpp
136		elf.cpp menu.cpp loader.cpp
137		kernel_args.cpp load_driver_settings.cpp
138	] = [ FDirName $(HAIKU_TOP) src system boot loader ] ;
139
140# partitioning system modules
141
142SEARCH on [ FGristFiles amiga_rdb.cpp ]
143	= [ FDirName $(HAIKU_TOP) src add-ons kernel partitioning_systems amiga ] ;
144
145SEARCH on [ FGristFiles apple.cpp ]
146	= [ FDirName $(HAIKU_TOP) src add-ons kernel partitioning_systems apple ] ;
147
148SEARCH on [ FGristFiles efi_gpt.cpp ]
149	= [ FDirName $(HAIKU_TOP) src add-ons kernel partitioning_systems efi ] ;
150
151SEARCH on [ FGristFiles intel.cpp PartitionMap.cpp PartitionMapParser.cpp ]
152	= [ FDirName $(HAIKU_TOP) src add-ons kernel partitioning_systems intel ] ;
153
154
155SubInclude HAIKU_TOP src tests system boot loader file_systems ;
156