]> git.ipfire.org Git - people/ms/u-boot.git/blame - nand_spl/board/sheldon/simpc8313/Makefile
mpc83xx: New board support for SIMPC8313
[people/ms/u-boot.git] / nand_spl / board / sheldon / simpc8313 / Makefile
CommitLineData
5bb907a4
RM
1#
2# (C) Copyright 2007
3# Stefan Roese, DENX Software Engineering, sr@denx.de.
4# (C) Copyright 2008 Freescale Semiconductor
5# (C) Copyright Sheldon Instruments, Inc. 2008
6#
7# See file CREDITS for list of people who contributed to this
8# project.
9#
10# This program is free software; you can redistribute it and/or
11# modify it under the terms of the GNU General Public License as
12# published by the Free Software Foundation; either version 2 of
13# the License, or (at your option) any later version.
14#
15# This program is distributed in the hope that it will be useful,
16# but WITHOUT ANY WARRANTY; without even the implied warranty of
17# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18# GNU General Public License for more details.
19#
20# You should have received a copy of the GNU General Public License
21# along with this program; if not, write to the Free Software
22# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
23# MA 02111-1307 USA
24#
25
26NAND_SPL := y
27TEXT_BASE := 0xfff00000
28
29include $(TOPDIR)/config.mk
30
31LDSCRIPT= $(TOPDIR)/nand_spl/board/$(BOARDDIR)/u-boot.lds
32LDFLAGS = -Bstatic -T $(LDSCRIPT) -Ttext $(TEXT_BASE) $(PLATFORM_LDFLAGS)
33AFLAGS += -DCONFIG_NAND_SPL
34CFLAGS += -DCONFIG_NAND_SPL
35
36SOBJS = start.o ticks.o
37COBJS = nand_boot_fsl_elbc.o $(BOARD).o sdram.o ns16550.o nand_init.o time.o
38
39SRCS := $(addprefix $(obj),$(SOBJS:.o=.S) $(COBJS:.o=.c))
40OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS))
41__OBJS := $(SOBJS) $(COBJS)
42LNDIR := $(OBJTREE)/nand_spl/board/$(BOARDDIR)
43
44nandobj := $(OBJTREE)/nand_spl/
45
46ALL = $(nandobj)u-boot-spl $(nandobj)u-boot-spl.bin $(nandobj)u-boot-spl-16k.bin
47
48all: $(obj).depend $(ALL)
49
50$(nandobj)u-boot-spl-16k.bin: $(nandobj)u-boot-spl
51 $(OBJCOPY) ${OBJCFLAGS} --pad-to=$(PAD_TO) -O binary $< $@
52
53$(nandobj)u-boot-spl.bin: $(nandobj)u-boot-spl
54 $(OBJCOPY) ${OBJCFLAGS} -O binary $< $@
55
56$(nandobj)u-boot-spl: $(OBJS)
57 cd $(LNDIR) && $(LD) $(LDFLAGS) $(__OBJS) \
58 -Map $(nandobj)u-boot-spl.map \
59 -o $(nandobj)u-boot-spl
60
61# create symbolic links for common files
62
63$(obj)start.S:
64 ln -sf $(SRCTREE)/cpu/mpc83xx/start.S $<
65
66$(obj)nand_boot_fsl_elbc.c:
67 ln -sf $(SRCTREE)/nand_spl/nand_boot_fsl_elbc.c $<
68
69$(obj)sdram.c:
70 ln -sf $(SRCTREE)/board/$(BOARDDIR)/sdram.c $<
71
72$(obj)$(BOARD).c:
73 ln -sf $(SRCTREE)/board/$(BOARDDIR)/$(BOARD).c $<
74
75$(obj)ns16550.c:
76 ln -sf $(SRCTREE)/drivers/serial/ns16550.c $<
77
78$(obj)nand_init.c:
79 ln -sf $(SRCTREE)/cpu/mpc83xx/nand_init.c $<
80
81$(obj)time.c:
82 ln -sf $(SRCTREE)/lib_ppc/time.c $<
83
84$(obj)ticks.S:
85 ln -sf $(SRCTREE)/lib_ppc/ticks.S $<
86
87#########################################################################
88
89$(obj)%.o: $(obj)%.S
90 $(CC) $(AFLAGS) -c -o $@ $<
91
92$(obj)%.o: $(obj)%.c
93 $(CC) $(CFLAGS) -c -o $@ $<
94
95# defines $(obj).depend target
96include $(SRCTREE)/rules.mk
97
98sinclude $(obj).depend
99
100#########################################################################