xref: /haiku/src/system/boot/platform/pxe_ia32/Jamfile (revision e0ef64750f3169cd634bb2f7a001e22488b05231)
1SubDir HAIKU_TOP src system boot platform pxe_ia32 ;
2
3SubDirHdrs $(SUBDIR) $(DOTDOT) bios_ia32 ;
4SubDirHdrs $(HAIKU_TOP) headers private kernel boot platform bios_ia32 ;
5SubDirHdrs $(HAIKU_TOP) headers private kernel boot platform $(TARGET_BOOT_PLATFORM) ;
6
7UsePrivateHeaders [ FDirName kernel disk_device_manager ] ;
8UsePrivateHeaders [ FDirName graphics common ] ;
9UsePrivateHeaders [ FDirName graphics vesa ] ;
10UsePrivateHeaders [ FDirName storage ] ;
11
12{
13	local defines = _BOOT_MODE _PXE_ENV ;
14
15	defines = [ FDefines $(defines) ] ;
16	SubDirCcFlags $(defines) -Wall -Wno-multichar ;
17	SubDirC++Flags $(defines) -Wall -Wno-multichar -fno-rtti ;
18}
19
20local genericPlatformSources =
21	text_menu.cpp
22	video_blit.cpp
23	video_splash.cpp
24	video_rle.cpp
25;
26
27local bios_ia32_src =
28	start.cpp
29	debug.cpp
30	bios.S
31	console.cpp
32	serial.cpp
33	keyboard.cpp
34	menu.cpp
35	mmu.cpp
36	multiboot.cpp
37	cpu.cpp
38	acpi.cpp
39	smp.cpp
40	support.S
41	video.cpp
42	hpet.cpp
43	apm.cpp
44;
45
46local bios_ia32_edid_src =
47	decode_edid.c
48	dump_edid.c
49;
50
51
52KernelMergeObject boot_platform_pxe_ia32.o :
53	pxe_stage2.S
54	smp_trampoline.S
55	pxe_bios.S
56	devices.cpp
57	network.cpp
58	pxe_undi.cpp
59	$(bios_ia32_src)
60	$(bios_ia32_edid_src)
61	$(genericPlatformSources)
62
63	: -fno-pic
64;
65
66
67rule BuildPXEstage1 bin : source {
68	SEARCH on $(source) = $(SEARCH_SOURCE) ;
69	Depends $(bin) : $(source) ;
70	MakeLocateDebug $(bin) ;
71	LocalClean clean : $(bin) ;
72}
73
74
75actions BuildPXEstage1 {
76	rm -f $(1)
77	$(TARGET_CC) -c -o $(1).o $(2) &&
78	$(TARGET_LD) --oformat binary --Ttext 0x7C00 -o $(1) $(1).o
79}
80
81BuildPXEstage1 pxehaiku : pxe_stage1.S ;
82
83SEARCH on [ FGristFiles $(bios_ia32_src) ]
84	= [ FDirName $(SUBDIR) $(DOTDOT) bios_ia32 ] ;
85
86SEARCH on [ FGristFiles $(bios_ia32_edid_src) ]
87	= [ FDirName $(HAIKU_TOP) src add-ons accelerants common ] ;
88
89SEARCH on [ FGristFiles $(genericPlatformSources) ]
90	= [ FDirName $(HAIKU_TOP) src system boot platform generic ] ;
91
92# We also need the bios_ia32 stage1.bin for building bin/makebootable
93SEARCH on stage1.bin
94 	= [ FDirName $(SUBDIR) $(DOTDOT) bios_ia32 ] ;
95