~ubuntu-branches/ubuntu/maverick/u-boot-omap3/maverick

« back to all changes in this revision

Viewing changes to nand_spl/board/sheldon/simpc8313/Makefile

  • Committer: Bazaar Package Importer
  • Author(s): Oliver Grawert
  • Date: 2010-03-22 15:06:23 UTC
  • Revision ID: james.westby@ubuntu.com-20100322150623-i21g8rgiyl5dohag
Tags: upstream-2010.3git20100315
ImportĀ upstreamĀ versionĀ 2010.3git20100315

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
 
 
26
NAND_SPL := y
 
27
TEXT_BASE := 0xfff00000
 
28
 
 
29
include $(TOPDIR)/config.mk
 
30
 
 
31
LDSCRIPT= $(TOPDIR)/nand_spl/board/$(BOARDDIR)/u-boot.lds
 
32
LDFLAGS = -Bstatic -T $(nandobj)u-boot.lds -Ttext $(TEXT_BASE) $(PLATFORM_LDFLAGS)
 
33
AFLAGS  += -DCONFIG_NAND_SPL
 
34
CFLAGS  += -DCONFIG_NAND_SPL
 
35
 
 
36
SOBJS   = start.o ticks.o
 
37
COBJS   = nand_boot_fsl_elbc.o $(BOARD).o sdram.o ns16550.o nand_init.o \
 
38
          time.o cache.o
 
39
 
 
40
SRCS    := $(addprefix $(obj),$(SOBJS:.o=.S) $(COBJS:.o=.c))
 
41
OBJS    := $(addprefix $(obj),$(SOBJS) $(COBJS))
 
42
__OBJS  := $(SOBJS) $(COBJS)
 
43
LNDIR   := $(OBJTREE)/nand_spl/board/$(BOARDDIR)
 
44
 
 
45
nandobj := $(OBJTREE)/nand_spl/
 
46
 
 
47
ALL     = $(nandobj)u-boot-spl $(nandobj)u-boot-spl.bin $(nandobj)u-boot-spl-16k.bin
 
48
 
 
49
all:    $(obj).depend $(ALL)
 
50
 
 
51
$(nandobj)u-boot-spl-16k.bin:   $(nandobj)u-boot-spl
 
52
        $(OBJCOPY) ${OBJCFLAGS} --pad-to=$(PAD_TO) -O binary $< $@
 
53
 
 
54
$(nandobj)u-boot-spl.bin:       $(nandobj)u-boot-spl
 
55
        $(OBJCOPY) ${OBJCFLAGS} -O binary $< $@
 
56
 
 
57
$(nandobj)u-boot-spl:   $(OBJS) $(nandobj)u-boot.lds
 
58
        cd $(LNDIR) && $(LD) $(LDFLAGS) $(__OBJS) \
 
59
                -Map $(nandobj)u-boot-spl.map \
 
60
                -o $(nandobj)u-boot-spl
 
61
 
 
62
$(nandobj)u-boot.lds: $(LDSCRIPT)
 
63
        $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ -P - <$^ >$@
 
64
 
 
65
# create symbolic links for common files
 
66
 
 
67
$(obj)start.S:
 
68
        @rm -f $@
 
69
        ln -s $(SRCTREE)/cpu/mpc83xx/start.S $@
 
70
 
 
71
$(obj)nand_boot_fsl_elbc.c:
 
72
        @rm -f $@
 
73
        ln -s $(SRCTREE)/nand_spl/nand_boot_fsl_elbc.c $@
 
74
 
 
75
$(obj)sdram.c:
 
76
        @rm -f $@
 
77
        ln -s $(SRCTREE)/board/$(BOARDDIR)/sdram.c $@
 
78
 
 
79
$(obj)$(BOARD).c:
 
80
        @rm -f $@
 
81
        ln -s $(SRCTREE)/board/$(BOARDDIR)/$(BOARD).c $@
 
82
 
 
83
$(obj)ns16550.c:
 
84
        @rm -f $@
 
85
        ln -s $(SRCTREE)/drivers/serial/ns16550.c $@
 
86
 
 
87
$(obj)nand_init.c:
 
88
        @rm -f $@
 
89
        ln -s $(SRCTREE)/cpu/mpc83xx/nand_init.c $@
 
90
 
 
91
$(obj)cache.c:
 
92
        @rm -f $@
 
93
        ln -s $(SRCTREE)/lib_ppc/cache.c $@
 
94
 
 
95
$(obj)time.c:
 
96
        @rm -f $@
 
97
        ln -s $(SRCTREE)/lib_ppc/time.c $@
 
98
 
 
99
$(obj)ticks.S:
 
100
        @rm -f $@
 
101
        ln -s $(SRCTREE)/lib_ppc/ticks.S $@
 
102
 
 
103
#########################################################################
 
104
 
 
105
$(obj)%.o:      $(obj)%.S
 
106
        $(CC) $(AFLAGS) -c -o $@ $<
 
107
 
 
108
$(obj)%.o:      $(obj)%.c
 
109
        $(CC) $(CFLAGS) -c -o $@ $<
 
110
 
 
111
# defines $(obj).depend target
 
112
include $(SRCTREE)/rules.mk
 
113
 
 
114
sinclude $(obj).depend
 
115
 
 
116
#########################################################################