2 include $(TOP)/config/make.cfg
4 TARGETDIR := $(GENDIR)/$(CURDIR)
5 FILES := bootstrap kprintf
6 USER_CFLAGS := -Os -ffreestanding
8 #MM- sun4i-bootstrap: sun4i-bootstrap-img
11 sun4i-bootstrap-img: $(foreach f, $(FILES), $(TARGETDIR)/$(f).o $(TARGETDIR)/$(f).d)
12 $(KERNEL_LD) --entry=bootstrapS --script=$(SRCDIR)/$(CURDIR)/ldscript.lds -Map $(TARGETDIR)/sun4i-bootstrap-img.map $(foreach f, $(FILES), $(TARGETDIR)/$(f).o) -L$(AROS_LIB) -laeabi -o $(TARGETDIR)/sun4i-bootstrap-img
13 $(OBJDUMP) -d -S $(TARGETDIR)/sun4i-bootstrap-img >>$(TARGETDIR)/sun4i-bootstrap-img.asm
14 $(TARGET_OBJCOPY) -O binary $(TARGETDIR)/sun4i-bootstrap-img
15 $(MKSUNXIBOOT) $(TARGETDIR)/sun4i-bootstrap-img $(AROSDIR)/sun4i-bootstrap-img
21 $(TARGETDIR)/%.o : %.c
22 %compile_q cmd=$(KERNEL_CC) opt="$(CFLAGS) $(KERNEL_CFLAGS) $(KERNEL_OBJCFLAGS) -g -c"
24 $(TARGETDIR)/%.o : %.S
27 $(TARGETDIR)/%.d : %.c
30 $(TARGETDIR)/%.d : %.S
33 DEPS := $(foreach f, $(FILES), $(TARGETDIR)/$(f).d)