blob: e16b195c3c8cc9a1e6480ad1232727a58027bafc [file] [log] [blame]
Marian Balakowiczd62379d2006-09-01 19:49:50 +02001# (C) Copyright 2000-2006
wdenke085e5b2005-04-05 23:32:21 +00002# Wolfgang Denk, DENX Software Engineering, wd@denx.de
3#
4# (C) Copyright 2005
5# Ladislav Michl, 2N Telekomunikace, michl@2n.cz
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 modify
11# it under the terms of the GNU General Public License version 2 as
12# published by the Free Software Foundation.
13#
14# This program is distributed in the hope that it will be useful,
15# but WITHOUT ANY WARRANTY; without even the implied warranty of
16# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17# GNU General Public License for more details.
18#
19# You should have received a copy of the GNU General Public License
20# along with this program; if not, write to the Free Software
21# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
22# MA 02111-1307 USA
23#
24
25include $(TOPDIR)/config.mk
26
Sebastien Carliera8d426f2010-11-05 15:48:07 +010027LIB = $(obj)lib$(BOARD).o
wdenke085e5b2005-04-05 23:32:21 +000028
Marian Balakowiczd62379d2006-09-01 19:49:50 +020029COBJS := voiceblue.o
wdenke085e5b2005-04-05 23:32:21 +000030SOBJS := setup.o
31
Ladislav Michl1f1e06f2010-02-17 21:29:45 -050032SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
Marian Balakowiczd62379d2006-09-01 19:49:50 +020033OBJS := $(addprefix $(obj),$(COBJS))
34SOBJS := $(addprefix $(obj),$(SOBJS))
35
wdenke085e5b2005-04-05 23:32:21 +000036LOAD_ADDR = 0x10400000
Ladislav Michl1f1e06f2010-02-17 21:29:45 -050037
38#########################################################################
wdenke085e5b2005-04-05 23:32:21 +000039
Marian Balakowiczd62379d2006-09-01 19:49:50 +020040all: $(obj).depend $(LIB) $(obj)eeprom.srec $(obj)eeprom.bin
wdenke085e5b2005-04-05 23:32:21 +000041
42$(LIB): $(OBJS) $(SOBJS)
Sebastien Carliera8d426f2010-11-05 15:48:07 +010043 $(call cmd_link_o_target, $^)
wdenke085e5b2005-04-05 23:32:21 +000044
Ladislav Michl1f1e06f2010-02-17 21:29:45 -050045$(obj)eeprom_start.o:
46 echo "b eeprom" | $(CC) $(AFLAGS) -c -x assembler -o $@ -
47
48$(obj)eeprom: $(obj)eeprom_start.o $(obj)eeprom.o
49 $(LD) -Ttext $(LOAD_ADDR) -e eeprom -o $@ $^ \
Wolfgang Denk85faf452009-07-22 23:53:23 +020050 -L$(obj)../../examples/standalone -lstubs \
Ladislav Michl1f1e06f2010-02-17 21:29:45 -050051 $(PLATFORM_LIBS)
wdenke085e5b2005-04-05 23:32:21 +000052
Ladislav Michl1f1e06f2010-02-17 21:29:45 -050053$(obj)eeprom.srec: $(obj)eeprom
54 $(OBJCOPY) -S -O srec $(<:.o=) $@
wdenke085e5b2005-04-05 23:32:21 +000055
Ladislav Michl1f1e06f2010-02-17 21:29:45 -050056$(obj)eeprom.bin: $(obj)eeprom
57 $(OBJCOPY) -S -O binary $< $@
Wolfgang Denk18d46c02009-08-17 14:00:53 +020058
wdenke085e5b2005-04-05 23:32:21 +000059clean:
Marian Balakowiczd62379d2006-09-01 19:49:50 +020060 rm -f $(SOBJS) $(OBJS) $(obj)eeprom \
61 $(obj)eeprom.srec $(obj)eeprom.bin \
Ladislav Michl1f1e06f2010-02-17 21:29:45 -050062 $(obj)eeprom.o $(obj)eeprom_start.o
wdenke085e5b2005-04-05 23:32:21 +000063
64distclean: clean
Wolfgang Denk6140a022008-07-02 23:49:18 +020065 rm -f $(LIB) core *.bak $(obj).depend
wdenke085e5b2005-04-05 23:32:21 +000066
67#########################################################################
68
Marian Balakowiczd62379d2006-09-01 19:49:50 +020069# defines $(obj).depend target
70include $(SRCTREE)/rules.mk
wdenke085e5b2005-04-05 23:32:21 +000071
Marian Balakowiczd62379d2006-09-01 19:49:50 +020072sinclude $(obj).depend
wdenke085e5b2005-04-05 23:32:21 +000073
74#########################################################################