Marian Balakowicz | f932863 | 2006-09-01 19:49:50 +0200 | [diff] [blame] | 1 | # (C) Copyright 2000-2006 |
wdenk | 3c2b3d4 | 2005-04-05 23:32:21 +0000 | [diff] [blame] | 2 | # 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 | |
| 25 | include $(TOPDIR)/config.mk |
| 26 | |
Sebastien Carlier | 6d8962e | 2010-11-05 15:48:07 +0100 | [diff] [blame] | 27 | LIB = $(obj)lib$(BOARD).o |
wdenk | 3c2b3d4 | 2005-04-05 23:32:21 +0000 | [diff] [blame] | 28 | |
Marian Balakowicz | f932863 | 2006-09-01 19:49:50 +0200 | [diff] [blame] | 29 | COBJS := voiceblue.o |
wdenk | 3c2b3d4 | 2005-04-05 23:32:21 +0000 | [diff] [blame] | 30 | SOBJS := setup.o |
| 31 | |
Ladislav Michl | 5c97a1d | 2010-02-17 21:29:45 -0500 | [diff] [blame] | 32 | SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) |
Marian Balakowicz | f932863 | 2006-09-01 19:49:50 +0200 | [diff] [blame] | 33 | OBJS := $(addprefix $(obj),$(COBJS)) |
| 34 | SOBJS := $(addprefix $(obj),$(SOBJS)) |
| 35 | |
wdenk | 3c2b3d4 | 2005-04-05 23:32:21 +0000 | [diff] [blame] | 36 | LOAD_ADDR = 0x10400000 |
Ladislav Michl | 5c97a1d | 2010-02-17 21:29:45 -0500 | [diff] [blame] | 37 | |
| 38 | ######################################################################### |
wdenk | 3c2b3d4 | 2005-04-05 23:32:21 +0000 | [diff] [blame] | 39 | |
Marian Balakowicz | f932863 | 2006-09-01 19:49:50 +0200 | [diff] [blame] | 40 | all: $(obj).depend $(LIB) $(obj)eeprom.srec $(obj)eeprom.bin |
wdenk | 3c2b3d4 | 2005-04-05 23:32:21 +0000 | [diff] [blame] | 41 | |
| 42 | $(LIB): $(OBJS) $(SOBJS) |
Sebastien Carlier | 6d8962e | 2010-11-05 15:48:07 +0100 | [diff] [blame] | 43 | $(call cmd_link_o_target, $^) |
wdenk | 3c2b3d4 | 2005-04-05 23:32:21 +0000 | [diff] [blame] | 44 | |
Ladislav Michl | 5c97a1d | 2010-02-17 21:29:45 -0500 | [diff] [blame] | 45 | $(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 Denk | 48677a1 | 2009-07-22 23:53:23 +0200 | [diff] [blame] | 50 | -L$(obj)../../examples/standalone -lstubs \ |
Ladislav Michl | 5c97a1d | 2010-02-17 21:29:45 -0500 | [diff] [blame] | 51 | $(PLATFORM_LIBS) |
wdenk | 3c2b3d4 | 2005-04-05 23:32:21 +0000 | [diff] [blame] | 52 | |
Ladislav Michl | 5c97a1d | 2010-02-17 21:29:45 -0500 | [diff] [blame] | 53 | $(obj)eeprom.srec: $(obj)eeprom |
| 54 | $(OBJCOPY) -S -O srec $(<:.o=) $@ |
wdenk | 3c2b3d4 | 2005-04-05 23:32:21 +0000 | [diff] [blame] | 55 | |
Ladislav Michl | 5c97a1d | 2010-02-17 21:29:45 -0500 | [diff] [blame] | 56 | $(obj)eeprom.bin: $(obj)eeprom |
| 57 | $(OBJCOPY) -S -O binary $< $@ |
Wolfgang Denk | 1aada9c | 2009-08-17 14:00:53 +0200 | [diff] [blame] | 58 | |
wdenk | 3c2b3d4 | 2005-04-05 23:32:21 +0000 | [diff] [blame] | 59 | clean: |
Marian Balakowicz | f932863 | 2006-09-01 19:49:50 +0200 | [diff] [blame] | 60 | rm -f $(SOBJS) $(OBJS) $(obj)eeprom \ |
| 61 | $(obj)eeprom.srec $(obj)eeprom.bin \ |
Ladislav Michl | 5c97a1d | 2010-02-17 21:29:45 -0500 | [diff] [blame] | 62 | $(obj)eeprom.o $(obj)eeprom_start.o |
wdenk | 3c2b3d4 | 2005-04-05 23:32:21 +0000 | [diff] [blame] | 63 | |
| 64 | distclean: clean |
Wolfgang Denk | c8a3b10 | 2008-07-02 23:49:18 +0200 | [diff] [blame] | 65 | rm -f $(LIB) core *.bak $(obj).depend |
wdenk | 3c2b3d4 | 2005-04-05 23:32:21 +0000 | [diff] [blame] | 66 | |
| 67 | ######################################################################### |
| 68 | |
Marian Balakowicz | f932863 | 2006-09-01 19:49:50 +0200 | [diff] [blame] | 69 | # defines $(obj).depend target |
| 70 | include $(SRCTREE)/rules.mk |
wdenk | 3c2b3d4 | 2005-04-05 23:32:21 +0000 | [diff] [blame] | 71 | |
Marian Balakowicz | f932863 | 2006-09-01 19:49:50 +0200 | [diff] [blame] | 72 | sinclude $(obj).depend |
wdenk | 3c2b3d4 | 2005-04-05 23:32:21 +0000 | [diff] [blame] | 73 | |
| 74 | ######################################################################### |