blob: 6f81c4abcf372de20530741c9e69a2002e76e0fb [file] [log] [blame]
wdenke831ad52002-10-17 21:52:26 +00001#
Marian Balakowiczf9328632006-09-01 19:49:50 +02002# (C) Copyright 2004-2006
wdenke831ad52002-10-17 21:52:26 +00003# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
4#
5# See file CREDITS for list of people who contributed to this
6# project.
7#
8# This program is free software; you can redistribute it and/or
9# modify it under the terms of the GNU General Public License as
10# published by the Free Software Foundation; either version 2 of
11# the License, or (at your option) any later version.
12#
13# This program is distributed in the hope that it will be useful,
14# but WITHOUT ANY WARRANTY; without even the implied warranty of
wdenk232c1502004-03-12 00:14:09 +000015# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
wdenke831ad52002-10-17 21:52:26 +000016# GNU General Public License for more details.
17#
18# You should have received a copy of the GNU General Public License
19# along with this program; if not, write to the Free Software
20# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
21# MA 02111-1307 USA
22#
23
24include $(TOPDIR)/config.mk
25
Marian Balakowiczf9328632006-09-01 19:49:50 +020026LIB = $(obj)libcommon.a
wdenke831ad52002-10-17 21:52:26 +000027
28AOBJS =
29
Grant Likely3a8ce9a2007-02-20 09:05:23 +010030COBJS = main.o ACEX1K.o altera.o bedbug.o circbuf.o cmd_autoscript.o \
wdenk8bde7f72003-06-27 21:31:46 +000031 cmd_bdinfo.o cmd_bedbug.o cmd_bmp.o cmd_boot.o cmd_bootm.o \
32 cmd_cache.o cmd_console.o \
Wolfgang Denk9f96ae42005-08-30 13:04:12 +020033 cmd_date.o cmd_dcr.o cmd_diag.o cmd_display.o cmd_doc.o cmd_dtt.o \
stroese17406182004-12-16 17:35:57 +000034 cmd_eeprom.o cmd_elf.o cmd_ext2.o \
wdenk8bde7f72003-06-27 21:31:46 +000035 cmd_fat.o cmd_fdc.o cmd_fdos.o cmd_flash.o cmd_fpga.o \
wdenk2d1a5372004-02-23 19:30:57 +000036 cmd_i2c.o cmd_ide.o cmd_immap.o cmd_itest.o cmd_jffs2.o \
wdenk8bde7f72003-06-27 21:31:46 +000037 cmd_load.o cmd_log.o \
38 cmd_mem.o cmd_mii.o cmd_misc.o cmd_mmc.o \
39 cmd_nand.o cmd_net.o cmd_nvedit.o \
wdenk7a8e9bed2003-05-31 18:35:21 +000040 cmd_pci.o cmd_pcmcia.o cmd_portio.o \
Wolfgang Denk9f96ae42005-08-30 13:04:12 +020041 cmd_reginfo.o cmd_reiser.o cmd_scsi.o cmd_spi.o cmd_universe.o \
42 cmd_usb.o cmd_vfd.o \
Stefan Roesef0ff4692006-08-15 14:15:51 +020043 command.o console.o cyclon2.o devices.o dlmalloc.o docecc.o \
wdenk8bde7f72003-06-27 21:31:46 +000044 environment.o env_common.o \
Wolfgang Denk9f96ae42005-08-30 13:04:12 +020045 env_nand.o env_dataflash.o env_flash.o env_eeprom.o \
46 env_nvram.o env_nowhere.o \
47 exports.o \
Wolfgang Denkf57f70a2005-10-13 01:45:54 +020048 flash.o fpga.o ft_build.o \
wdenk8655b6f2004-10-09 23:25:58 +000049 hush.o kgdb.o lcd.o lists.o lynxkdi.o \
50 memsize.o miiphybb.o miiphyutil.o \
Wolfgang Denk875c7892005-09-25 16:44:21 +020051 s_record.o serial.o soft_i2c.o soft_spi.o spartan2.o spartan3.o \
wdenke831ad52002-10-17 21:52:26 +000052 usb.o usb_kbd.o usb_storage.o \
Haiying Wangbea3f282006-07-12 10:48:05 -040053 virtex2.o xilinx.o crc16.o xyzModem.o cmd_mac.o
wdenke831ad52002-10-17 21:52:26 +000054
Marian Balakowiczf9328632006-09-01 19:49:50 +020055SRCS := $(AOBJS:.o=.S) $(COBJS:.o=.c)
56OBJS := $(addprefix $(obj),$(AOBJS) $(COBJS))
wdenke831ad52002-10-17 21:52:26 +000057
58CPPFLAGS += -I..
59
60all: $(LIB) $(AOBJS)
61
Marian Balakowiczf9328632006-09-01 19:49:50 +020062$(LIB): $(obj).depend $(OBJS)
Wolfgang Denk2b208f52006-10-09 01:02:05 +020063 $(AR) $(ARFLAGS) $@ $(OBJS)
wdenke831ad52002-10-17 21:52:26 +000064
Marian Balakowiczf9328632006-09-01 19:49:50 +020065$(obj)environment.o: $(src)environment.c $(obj)../tools/envcrc
wdenke831ad52002-10-17 21:52:26 +000066 $(CC) $(AFLAGS) -Wa,--no-warn \
Marian Balakowiczf9328632006-09-01 19:49:50 +020067 -DENV_CRC=$(shell $(obj)../tools/envcrc) \
68 -c -o $@ $(src)environment.c
wdenke831ad52002-10-17 21:52:26 +000069
Marian Balakowiczf9328632006-09-01 19:49:50 +020070$(obj)../tools/envcrc:
wdenka8c7c702003-12-06 19:49:23 +000071 $(MAKE) -C ../tools
72
wdenke831ad52002-10-17 21:52:26 +000073#########################################################################
74
Marian Balakowiczf9328632006-09-01 19:49:50 +020075# defines $(obj).depend target
76include $(SRCTREE)/rules.mk
wdenke831ad52002-10-17 21:52:26 +000077
Marian Balakowiczf9328632006-09-01 19:49:50 +020078sinclude $(obj).depend
wdenke831ad52002-10-17 21:52:26 +000079
80#########################################################################