1SubDir HAIKU_TOP src system boot platform u-boot ;
2
3SubDirHdrs $(HAIKU_TOP) headers private kernel boot platform $(TARGET_BOOT_PLATFORM) ;
4SubDirHdrs $(HAIKU_TOP) headers private kernel platform $(TARGET_BOOT_PLATFORM) ;
5SubDirHdrs $(HAIKU_TOP) src add-ons kernel bus_managers fdt ;
6
7SubDirHdrs $(HAIKU_TOP) src system boot arch $(TARGET_KERNEL_ARCH_DIR) ;
8SubDirHdrs $(HAIKU_TOP) src system boot platform u-boot arch $(TARGET_KERNEL_ARCH_DIR) ;
9
10UseLibraryHeaders [ FDirName libfdt ] ;
11
12UsePrivateHeaders [ FDirName kernel disk_device_manager ] ;
13UsePrivateHeaders [ FDirName graphics common ] ;
14UsePrivateHeaders [ FDirName graphics vesa ] ;
15UsePrivateHeaders [ FDirName storage ] ;
16UsePrivateHeaders [ FDirName kernel arch generic ] ;
17
18{
19    SubDirCcFlags -g3 -O0 ;
20    SubDirC++Flags -fno-rtti -g3 -O0 ;
21}
22
23SEARCH_SOURCE += [ FDirName $(HAIKU_TOP) src add-ons accelerants common ] ;
24
25SEARCH on [ FGristFiles $(genericPlatformSources) ]
26    = [ FDirName $(HAIKU_TOP) src system boot platform generic ] ;
27
28local platform ;
29for platform in [ MultiBootSubDirSetup u-boot ] {
30	on $(platform) {
31
32		# First build the non arch dependent parts
33		BootMergeObject boot_platform_u-boot_common.o :
34		    start.cpp
35		    debug.cpp
36		    console.cpp
37		    serial.cpp
38		    devices.cpp
39		    keyboard.cpp
40		    menu.cpp
41		    cpu.cpp
42		    uimage.cpp
43		    video.cpp
44		    $(genericPlatformSources)
45		    :
46		    :
47		    boot_platform_generic_u-boot.a
48		    [ MultiBootGristFiles boot_fdt.a ]
49		;
50
51		BootMergeObject boot_platform_u-boot.o :
52		    : :
53		    # must come first to have _start_* at correct locations
54		    boot_platform_u-boot_$(TARGET_ARCH).o
55		    boot_platform_u-boot_common.o
56		;
57	}
58}
59
60
61# Tell the build system to where stage1.bin can be found, so it can be used
62# elsewhere.
63SEARCH on stage1.bin = $(SUBDIR) ;
64
65SubInclude HAIKU_TOP src system boot platform u-boot arch ;
66