Magnus Lilja | 24f8b41 | 2009-07-04 10:31:24 +0200 | [diff] [blame] | 1 | CONFIG_NAND_SPL = y |
| 2 | |
| 3 | include $(TOPDIR)/config.mk |
| 4 | include $(TOPDIR)/nand_spl/board/$(BOARDDIR)/config.mk |
| 5 | |
| 6 | LDSCRIPT= $(TOPDIR)/nand_spl/board/$(BOARDDIR)/u-boot.lds |
Wolfgang Denk | 18d46c0 | 2009-08-17 14:00:53 +0200 | [diff] [blame] | 7 | LDFLAGS = -Bstatic -T $(nandobj)u-boot.lds -Ttext $(TEXT_BASE) $(PLATFORM_LDFLAGS) |
Magnus Lilja | 24f8b41 | 2009-07-04 10:31:24 +0200 | [diff] [blame] | 8 | AFLAGS += -DCONFIG_PRELOADER -DCONFIG_NAND_SPL |
| 9 | CFLAGS += -DCONFIG_PRELOADER -DCONFIG_NAND_SPL |
| 10 | |
| 11 | SOBJS = start.o lowlevel_init.o |
| 12 | COBJS = nand_boot_fsl_nfc.o |
| 13 | |
| 14 | SRCS := $(SRCTREE)/nand_spl/nand_boot_fsl_nfc.c |
Peter Tyser | f7c6737 | 2010-04-12 22:28:11 -0500 | [diff] [blame^] | 15 | SRCS += $(SRCTREE)/arch/arm/cpu/arm1136/start.S |
Magnus Lilja | 24f8b41 | 2009-07-04 10:31:24 +0200 | [diff] [blame] | 16 | SRCS += $(SRCTREE)/board/freescale/mx31pdk/lowlevel_init.S |
| 17 | OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS)) |
| 18 | __OBJS := $(SOBJS) $(COBJS) |
| 19 | LNDIR := $(OBJTREE)/nand_spl/board/$(BOARDDIR) |
| 20 | |
| 21 | nandobj := $(OBJTREE)/nand_spl/ |
| 22 | |
| 23 | ALL = $(nandobj)u-boot-spl $(nandobj)u-boot-spl.bin $(nandobj)u-boot-spl-16k.bin |
| 24 | |
| 25 | all: $(obj).depend $(ALL) |
| 26 | |
| 27 | $(nandobj)u-boot-spl-16k.bin: $(nandobj)u-boot-spl |
| 28 | $(OBJCOPY) ${OBJCFLAGS} --pad-to=$(PAD_TO) -O binary $< $@ |
| 29 | |
| 30 | $(nandobj)u-boot-spl.bin: $(nandobj)u-boot-spl |
| 31 | $(OBJCOPY) ${OBJCFLAGS} -O binary $< $@ |
| 32 | |
Wolfgang Denk | 18d46c0 | 2009-08-17 14:00:53 +0200 | [diff] [blame] | 33 | $(nandobj)u-boot-spl: $(OBJS) $(nandobj)u-boot.lds |
Magnus Lilja | 24f8b41 | 2009-07-04 10:31:24 +0200 | [diff] [blame] | 34 | cd $(LNDIR) && $(LD) $(LDFLAGS) $(__OBJS) \ |
| 35 | -Map $(nandobj)u-boot-spl.map \ |
| 36 | -o $@ |
| 37 | |
Wolfgang Denk | 18d46c0 | 2009-08-17 14:00:53 +0200 | [diff] [blame] | 38 | $(nandobj)u-boot.lds: $(LDSCRIPT) |
| 39 | $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ -P - <$^ >$@ |
| 40 | |
Magnus Lilja | 24f8b41 | 2009-07-04 10:31:24 +0200 | [diff] [blame] | 41 | ######################################################################### |
| 42 | |
Peter Tyser | f7c6737 | 2010-04-12 22:28:11 -0500 | [diff] [blame^] | 43 | $(obj)%.o: $(SRCTREE)/arch/arm/cpu/arm1136/%.S |
Magnus Lilja | 24f8b41 | 2009-07-04 10:31:24 +0200 | [diff] [blame] | 44 | $(CC) $(AFLAGS) -c -o $@ $< |
| 45 | |
| 46 | $(obj)%.o: $(SRCTREE)/board/freescale/mx31pdk/%.S |
| 47 | $(CC) $(AFLAGS) -c -o $@ $< |
| 48 | |
| 49 | $(obj)%.o: $(SRCTREE)/nand_spl/%.c |
| 50 | $(CC) $(CFLAGS) -c -o $@ $< |
| 51 | |
| 52 | # defines $(obj).depend target |
| 53 | include $(SRCTREE)/rules.mk |
| 54 | |
| 55 | sinclude $(obj).depend |
| 56 | |
| 57 | ######################################################################### |