1 # (C) Copyright 2000-2002
2 # Wolfgang Denk, DENX Software Engineering, wd@denx.de
5 # Ladislav Michl, 2N Telekomunikace, michl@2n.cz
7 # See file CREDITS for list of people who contributed to this
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.
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.
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,
25 include $(TOPDIR)/config.mk
32 gcclibdir := $(shell dirname `$(CC) -print-libgcc-file-name`)
34 LOAD_ADDR = 0x10400000
36 all: $(LIB) eeprom.srec eeprom.bin
38 $(LIB): $(OBJS) $(SOBJS)
39 $(AR) crv $@ $(OBJS) $(SOBJS)
42 $(LD) -g -Ttext $(LOAD_ADDR) -o $(<:.o=) -e $(<:.o=) $^ \
43 -L../../examples -lstubs \
44 -L../../lib_generic -lgeneric \
46 $(OBJCOPY) -O srec $(<:.o=) $@
48 eeprom.bin: eeprom.srec
49 $(OBJCOPY) -O binary $< $@ 2>/dev/null
52 rm -f $(SOBJS) $(OBJS) eeprom eeprom.srec eeprom.bin
55 rm -f $(LIB) core config.tmp *.bak .depend
57 #########################################################################
59 .depend: Makefile $(SOBJS:.o=.S) $(OBJS:.o=.c)
60 $(CC) -M $(CPPFLAGS) $(SOBJS:.o=.S) $(OBJS:.o=.c) > $@
64 #########################################################################