3 include $(SRCDIR)/config/aros.cfg
5 #MM- boot-pc-i386: kernel-bootstrap-pc-gz
7 EXEDIR := $(AROS_BOOT)/pc
9 FILES := bootstrap memory_io multiboot1 multiboot2 support vesa_setup
11 ifeq ($(AROS_TARGET_CPU),x86_64)
12 ISA_FLAGS := $(ISA_X86_FLAGS)
13 ARCH_DEFS := -DMULTIBOOT_64BIT
14 ARCH_LIBS := -L$(GENDIR)/lib32 -nostdlib
16 ARCH_LIBS := -L$(AROS_DEVELOPER)/lib -L$(GENDIR)/lib
19 USER_CFLAGS := -Wl,--oformat,elf_i386
20 USER_INCLUDES := -isystem $(SRCDIR)/arch/all-native/bootconsole/include -isystem $(SRCDIR)/bootstrap/include
21 USER_CPPFLAGS := $(ARCH_DEFS) -DBOOTLOADER_$(AROS_TARGET_BOOTLOADER)
22 USER_LDFLAGS := -m32 -Wl,-N,-e,kernel_bootstrap -Wl,-Map,$(GENDIR)/boot/bootstrap-pc.map \
23 -Wl,-T,$(SRCDIR)/$(CURDIR)/ldscript.lds -static-libgcc $(ARCH_LIBS)
24 USER_OBJS := $(OBJDIR)/vesa.bin.o
25 #USER_CPPFLAGS += -DDEBUG
27 kernel-bootstrap-pc_LINK := $(KERNEL_CC) $(SYSROOT_FLAG) $(KERNEL_LDFLAGS)
29 %build_prog mmake=kernel-bootstrap-pc progname=$(EXENAME) \
30 files=$(FILES) targetdir=$(EXEDIR) \
31 uselibs="bootstrap bootconsole stdc.static" usestartup=no lto=no
33 %rule_link_binary mmake=kernel-bootstrap-pc file=$(OBJDIR)/vesa.bin.o name=vesa files=vesa \
34 start=0x1000 ldflags="-m elf_i386"
36 %compress_file mmake=kernel-bootstrap-pc file=$(EXEDIR)/$(EXENAME)
38 # Add $(GENDIR)/boot to file's dependencies
39 $(EXEDIR)/$(EXENAME) : $(GENDIR)/boot
41 GLOB_MKDIRS += $(GENDIR)/boot