blob: fa5c6195fe6b6107d26cb2ab31072029a49d1253 [file] [log] [blame]
wdenke831ad52002-10-17 21:52:26 +00001#
Marian Balakowiczd62379d2006-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
wdenk29e7f5a2004-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 Balakowiczd62379d2006-09-01 19:49:50 +020026LIB = $(obj)libcommon.a
wdenke831ad52002-10-17 21:52:26 +000027
28AOBJS =
29
Grant Likely1179ad12007-09-24 09:05:30 -060030COBJS-y += main.o
31COBJS-y += ACEX1K.o
32COBJS-y += altera.o
33COBJS-y += bedbug.o
34COBJS-y += circbuf.o
35COBJS-y += cmd_autoscript.o
Grant Likelyc0d32e92007-09-24 09:05:31 -060036COBJS-$(CONFIG_CMD_BDI) += cmd_bdinfo.o
37COBJS-$(CONFIG_CMD_BEDBUG) += cmd_bedbug.o
38COBJS-$(CONFIG_CMD_BMP) += cmd_bmp.o
Marian Balakowicz41d71ed2008-01-08 18:14:09 +010039COBJS-y += image.o
Marian Balakowiczbe946ba2008-01-08 18:11:43 +010040COBJS-y += gunzip.o
Grant Likely1179ad12007-09-24 09:05:30 -060041COBJS-y += cmd_boot.o
42COBJS-y += cmd_bootm.o
Grant Likelyc0d32e92007-09-24 09:05:31 -060043COBJS-$(CONFIG_CMD_CACHE) += cmd_cache.o
44COBJS-$(CONFIG_CMD_CONSOLE) += cmd_console.o
45COBJS-$(CONFIG_CMD_DATE) += cmd_date.o
46ifdef CONFIG_4xx
47COBJS-$(CONFIG_CMD_SETGETDCR) += cmd_dcr.o
48endif
49ifdef CONFIG_POST
50COBJS-$(CONFIG_CMD_DIAG) += cmd_diag.o
51endif
52COBJS-$(CONFIG_CMD_DISPLAY) += cmd_display.o
53COBJS-$(CONFIG_CMD_DOC) += cmd_doc.o
54COBJS-$(CONFIG_CMD_DTT) += cmd_dtt.o
Grant Likely1179ad12007-09-24 09:05:30 -060055COBJS-y += cmd_eeprom.o
Grant Likelyc0d32e92007-09-24 09:05:31 -060056COBJS-$(CONFIG_CMD_ELF) += cmd_elf.o
57COBJS-$(CONFIG_CMD_EXT2) += cmd_ext2.o
58COBJS-$(CONFIG_CMD_FAT) += cmd_fat.o
Grant Likely1179ad12007-09-24 09:05:30 -060059COBJS-y += cmd_fdc.o
Kumar Gala78a658c2007-11-26 11:19:12 -060060COBJS-$(CONFIG_OF_LIBFDT) += cmd_fdt.o fdt_support.o
Grant Likelyc0d32e92007-09-24 09:05:31 -060061COBJS-$(CONFIG_CMD_FDOS) += cmd_fdos.o
62COBJS-$(CONFIG_CMD_FLASH) += cmd_flash.o
63ifdef CONFIG_FPGA
64COBJS-$(CONFIG_CMD_FPGA) += cmd_fpga.o
65endif
66COBJS-$(CONFIG_CMD_I2C) += cmd_i2c.o
67COBJS-$(CONFIG_CMD_IDE) += cmd_ide.o
68COBJS-$(CONFIG_CMD_IMMAP) += cmd_immap.o
69COBJS-$(CONFIG_CMD_ITEST) += cmd_itest.o
70COBJS-$(CONFIG_CMD_JFFS2) += cmd_jffs2.o
Grant Likely1179ad12007-09-24 09:05:30 -060071COBJS-y += cmd_load.o
Grant Likelyc0d32e92007-09-24 09:05:31 -060072COBJS-$(CONFIG_LOGBUFFER) += cmd_log.o
Grant Likely1179ad12007-09-24 09:05:30 -060073COBJS-y += cmd_mem.o
Grant Likelyc0d32e92007-09-24 09:05:31 -060074COBJS-$(CONFIG_CMD_MII) += cmd_mii.o
75COBJS-$(CONFIG_CMD_MISC) += cmd_misc.o
76COBJS-$(CONFIG_CMD_MMC) += cmd_mmc.o
Grant Likely1179ad12007-09-24 09:05:30 -060077COBJS-y += cmd_nand.o
Grant Likelyc0d32e92007-09-24 09:05:31 -060078COBJS-$(CONFIG_CMD_NET) += cmd_net.o
Grant Likely1179ad12007-09-24 09:05:30 -060079COBJS-y += cmd_nvedit.o
80COBJS-y += cmd_onenand.o
Grant Likelyc0d32e92007-09-24 09:05:31 -060081ifdef CONFIG_PCI
82COBJS-$(CONFIG_CMD_PCI) += cmd_pci.o
83endif
Grant Likely1179ad12007-09-24 09:05:30 -060084COBJS-y += cmd_pcmcia.o
Grant Likelyc0d32e92007-09-24 09:05:31 -060085COBJS-$(CONFIG_CMD_PORTIO) += cmd_portio.o
86COBJS-$(CONFIG_CMD_REGINFO) += cmd_reginfo.o
87COBJS-$(CONFIG_CMD_REISER) += cmd_reiser.o
Grant Likely1179ad12007-09-24 09:05:30 -060088COBJS-y += cmd_sata.o
Grant Likelyc0d32e92007-09-24 09:05:31 -060089COBJS-$(CONFIG_CMD_SCSI) += cmd_scsi.o
90COBJS-$(CONFIG_CMD_SPI) += cmd_spi.o
Harald Weltea311ef32007-12-19 14:14:47 +010091COBJS-$(CONFIG_CMD_TERMINAL) += cmd_terminal.o
Grant Likelyc0d32e92007-09-24 09:05:31 -060092COBJS-$(CONFIG_CMD_UNIVERSE) += cmd_universe.o
93COBJS-$(CONFIG_CMD_USB) += cmd_usb.o
Marian Balakowicz4b6095a2008-01-31 13:19:58 +010094COBJS-$(CONFIG_CMD_XIMG) += cmd_ximg.o
Grant Likely1179ad12007-09-24 09:05:30 -060095COBJS-y += cmd_vfd.o
96COBJS-y += command.o
97COBJS-y += console.o
98COBJS-y += cyclon2.o
99COBJS-y += devices.o
100COBJS-y += dlmalloc.o
101COBJS-y += docecc.o
102COBJS-y += environment.o
103COBJS-y += env_common.o
104COBJS-y += env_nand.o
105COBJS-y += env_dataflash.o
106COBJS-y += env_flash.o
107COBJS-y += env_eeprom.o
108COBJS-y += env_onenand.o
109COBJS-y += env_nvram.o
110COBJS-y += env_nowhere.o
111COBJS-y += exports.o
Grant Likely1179ad12007-09-24 09:05:30 -0600112COBJS-y += flash.o
113COBJS-y += fpga.o
114COBJS-y += ft_build.o
115COBJS-y += hush.o
116COBJS-y += kgdb.o
117COBJS-y += lcd.o
118COBJS-y += lists.o
119COBJS-y += lynxkdi.o
120COBJS-y += memsize.o
121COBJS-y += miiphybb.o
122COBJS-y += miiphyutil.o
123COBJS-y += s_record.o
124COBJS-y += serial.o
125COBJS-y += soft_i2c.o
126COBJS-y += soft_spi.o
127COBJS-y += spartan2.o
128COBJS-y += spartan3.o
129COBJS-y += usb.o
130COBJS-y += usb_kbd.o
131COBJS-y += usb_storage.o
132COBJS-y += virtex2.o
133COBJS-y += xilinx.o
134COBJS-y += crc16.o
135COBJS-y += xyzModem.o
136COBJS-y += cmd_mac.o
Grant Likelyc0d32e92007-09-24 09:05:31 -0600137COBJS-$(CONFIG_CMD_MFSL) += cmd_mfsl.o
wdenke831ad52002-10-17 21:52:26 +0000138
Grant Likely1179ad12007-09-24 09:05:30 -0600139COBJS := $(COBJS-y)
Marian Balakowiczd62379d2006-09-01 19:49:50 +0200140SRCS := $(AOBJS:.o=.S) $(COBJS:.o=.c)
141OBJS := $(addprefix $(obj),$(AOBJS) $(COBJS))
wdenke831ad52002-10-17 21:52:26 +0000142
143CPPFLAGS += -I..
144
145all: $(LIB) $(AOBJS)
146
Marian Balakowiczd62379d2006-09-01 19:49:50 +0200147$(LIB): $(obj).depend $(OBJS)
Wolfgang Denk6a65e422006-10-09 01:02:05 +0200148 $(AR) $(ARFLAGS) $@ $(OBJS)
wdenke831ad52002-10-17 21:52:26 +0000149
Marian Balakowiczd62379d2006-09-01 19:49:50 +0200150$(obj)environment.o: $(src)environment.c $(obj)../tools/envcrc
wdenke831ad52002-10-17 21:52:26 +0000151 $(CC) $(AFLAGS) -Wa,--no-warn \
Marian Balakowiczd62379d2006-09-01 19:49:50 +0200152 -DENV_CRC=$(shell $(obj)../tools/envcrc) \
153 -c -o $@ $(src)environment.c
wdenke831ad52002-10-17 21:52:26 +0000154
Marian Balakowiczd62379d2006-09-01 19:49:50 +0200155$(obj)../tools/envcrc:
wdenkc0aa5c52003-12-06 19:49:23 +0000156 $(MAKE) -C ../tools
157
wdenke831ad52002-10-17 21:52:26 +0000158#########################################################################
159
Marian Balakowiczd62379d2006-09-01 19:49:50 +0200160# defines $(obj).depend target
161include $(SRCTREE)/rules.mk
wdenke831ad52002-10-17 21:52:26 +0000162
Marian Balakowiczd62379d2006-09-01 19:49:50 +0200163sinclude $(obj).depend
wdenke831ad52002-10-17 21:52:26 +0000164
165#########################################################################