xref: /haiku/src/tests/system/boot/loader/Jamfile (revision 079c69cbfd7cd3c97baae91332251c8388a8bb02)
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
115	: boottest_bfs.a boottest_amiga_ffs.a boottest_tarfs.a libz.a
116	;
117
118# Tell Jam where to find the utility sources
119
120SEARCH on [ FGristFiles list.c ]
121	= [ FDirName $(HAIKU_TOP) src system kernel util ] ;
122
123SEARCH on [ FGristFiles strlcat.c strlcpy.c ]
124	= [ FDirName $(HAIKU_TOP) src system libroot posix string ] ;
125
126SEARCH on [ FGristFiles driver_settings.c ]
127	= [ FDirName $(HAIKU_TOP) src system libroot os ] ;
128
129SEARCH on [ FGristFiles
130		main.cpp vfs.cpp partitions.cpp
131		heap.cpp RootFileSystem.cpp
132		elf.cpp menu.cpp loader.cpp
133		kernel_args.cpp load_driver_settings.cpp
134	] = [ FDirName $(HAIKU_TOP) src system boot loader ] ;
135
136# partitioning system modules
137
138SEARCH on [ FGristFiles amiga_rdb.cpp ]
139	= [ FDirName $(HAIKU_TOP) src add-ons kernel partitioning_systems amiga ] ;
140
141SEARCH on [ FGristFiles apple.cpp ]
142	= [ FDirName $(HAIKU_TOP) src add-ons kernel partitioning_systems apple ] ;
143
144SEARCH on [ FGristFiles efi_gpt.cpp ]
145	= [ FDirName $(HAIKU_TOP) src add-ons kernel partitioning_systems efi ] ;
146
147SEARCH on [ FGristFiles intel.cpp PartitionMap.cpp PartitionMapParser.cpp ]
148	= [ FDirName $(HAIKU_TOP) src add-ons kernel partitioning_systems intel ] ;
149
150
151SubInclude HAIKU_TOP src tests system boot loader file_systems ;
152