blob: 967879922722397337c7d0256bc6cfdd19056474 [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 Likelyf0037c52007-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
Daniel Hellstrom2a2fa792008-03-26 23:00:38 +010035COBJS-$(CONFIG_CMD_AMBAPP) += cmd_ambapp.o
Grant Likelyf0037c52007-09-24 09:05:30 -060036COBJS-y += cmd_autoscript.o
Grant Likely4a437192007-09-24 09:05:31 -060037COBJS-$(CONFIG_CMD_BDI) += cmd_bdinfo.o
38COBJS-$(CONFIG_CMD_BEDBUG) += cmd_bedbug.o
39COBJS-$(CONFIG_CMD_BMP) += cmd_bmp.o
Marian Balakowiczb97a2a02008-01-08 18:14:09 +010040COBJS-y += image.o
Marian Balakowicz321359f2008-01-08 18:11:43 +010041COBJS-y += gunzip.o
Grant Likelyf0037c52007-09-24 09:05:30 -060042COBJS-y += cmd_boot.o
Mike Frysinger86a20fb2008-02-16 07:40:36 -050043COBJS-$(CONFIG_CMD_BOOTLDR) += cmd_bootldr.o
Grant Likelyf0037c52007-09-24 09:05:30 -060044COBJS-y += cmd_bootm.o
Grant Likely4a437192007-09-24 09:05:31 -060045COBJS-$(CONFIG_CMD_CACHE) += cmd_cache.o
46COBJS-$(CONFIG_CMD_CONSOLE) += cmd_console.o
Mike Frysingercf675d32008-02-19 00:35:17 -050047COBJS-$(CONFIG_CMD_CPLBINFO) += cmd_cplbinfo.o
Grant Likely4a437192007-09-24 09:05:31 -060048COBJS-$(CONFIG_CMD_DATE) += cmd_date.o
49ifdef CONFIG_4xx
50COBJS-$(CONFIG_CMD_SETGETDCR) += cmd_dcr.o
51endif
52ifdef CONFIG_POST
53COBJS-$(CONFIG_CMD_DIAG) += cmd_diag.o
54endif
55COBJS-$(CONFIG_CMD_DISPLAY) += cmd_display.o
56COBJS-$(CONFIG_CMD_DOC) += cmd_doc.o
57COBJS-$(CONFIG_CMD_DTT) += cmd_dtt.o
Grant Likelyf0037c52007-09-24 09:05:30 -060058COBJS-y += cmd_eeprom.o
Grant Likely4a437192007-09-24 09:05:31 -060059COBJS-$(CONFIG_CMD_ELF) += cmd_elf.o
60COBJS-$(CONFIG_CMD_EXT2) += cmd_ext2.o
61COBJS-$(CONFIG_CMD_FAT) += cmd_fat.o
Grant Likelyf0037c52007-09-24 09:05:30 -060062COBJS-y += cmd_fdc.o
Kumar Gala9c9109e2007-11-26 11:19:12 -060063COBJS-$(CONFIG_OF_LIBFDT) += cmd_fdt.o fdt_support.o
Grant Likely4a437192007-09-24 09:05:31 -060064COBJS-$(CONFIG_CMD_FDOS) += cmd_fdos.o
65COBJS-$(CONFIG_CMD_FLASH) += cmd_flash.o
66ifdef CONFIG_FPGA
67COBJS-$(CONFIG_CMD_FPGA) += cmd_fpga.o
68endif
69COBJS-$(CONFIG_CMD_I2C) += cmd_i2c.o
70COBJS-$(CONFIG_CMD_IDE) += cmd_ide.o
71COBJS-$(CONFIG_CMD_IMMAP) += cmd_immap.o
72COBJS-$(CONFIG_CMD_ITEST) += cmd_itest.o
73COBJS-$(CONFIG_CMD_JFFS2) += cmd_jffs2.o
Grant Likelyf0037c52007-09-24 09:05:30 -060074COBJS-y += cmd_load.o
Grant Likely4a437192007-09-24 09:05:31 -060075COBJS-$(CONFIG_LOGBUFFER) += cmd_log.o
Grant Likelyf0037c52007-09-24 09:05:30 -060076COBJS-y += cmd_mem.o
Grant Likely4a437192007-09-24 09:05:31 -060077COBJS-$(CONFIG_CMD_MII) += cmd_mii.o
78COBJS-$(CONFIG_CMD_MISC) += cmd_misc.o
79COBJS-$(CONFIG_CMD_MMC) += cmd_mmc.o
Grant Likelyf0037c52007-09-24 09:05:30 -060080COBJS-y += cmd_nand.o
Grant Likely4a437192007-09-24 09:05:31 -060081COBJS-$(CONFIG_CMD_NET) += cmd_net.o
Grant Likelyf0037c52007-09-24 09:05:30 -060082COBJS-y += cmd_nvedit.o
83COBJS-y += cmd_onenand.o
Mike Frysingerd0b01a22008-02-04 19:26:57 -050084COBJS-$(CONFIG_CMD_OTP) += cmd_otp.o
Grant Likely4a437192007-09-24 09:05:31 -060085ifdef CONFIG_PCI
86COBJS-$(CONFIG_CMD_PCI) += cmd_pci.o
87endif
Grant Likelyf0037c52007-09-24 09:05:30 -060088COBJS-y += cmd_pcmcia.o
Grant Likely4a437192007-09-24 09:05:31 -060089COBJS-$(CONFIG_CMD_PORTIO) += cmd_portio.o
90COBJS-$(CONFIG_CMD_REGINFO) += cmd_reginfo.o
91COBJS-$(CONFIG_CMD_REISER) += cmd_reiser.o
Dave Liuc7057b52008-03-26 22:49:44 +080092COBJS-$(CONFIG_CMD_SATA) += cmd_sata.o
Grant Likely4a437192007-09-24 09:05:31 -060093COBJS-$(CONFIG_CMD_SCSI) += cmd_scsi.o
Kumar Galad0586982008-02-14 20:44:42 -060094COBJS-$(CONFIG_CMD_SETEXPR) += cmd_setexpr.o
Grant Likely4a437192007-09-24 09:05:31 -060095COBJS-$(CONFIG_CMD_SPI) += cmd_spi.o
Mike Frysinger30942b12008-02-04 19:26:57 -050096COBJS-$(CONFIG_CMD_STRINGS) += cmd_strings.o
Harald Welted16471e2007-12-19 14:14:47 +010097COBJS-$(CONFIG_CMD_TERMINAL) += cmd_terminal.o
Grant Likely4a437192007-09-24 09:05:31 -060098COBJS-$(CONFIG_CMD_UNIVERSE) += cmd_universe.o
99COBJS-$(CONFIG_CMD_USB) += cmd_usb.o
Marian Balakowiczed29bc42008-01-31 13:19:58 +0100100COBJS-$(CONFIG_CMD_XIMG) += cmd_ximg.o
Grant Likelyf0037c52007-09-24 09:05:30 -0600101COBJS-y += cmd_vfd.o
102COBJS-y += command.o
103COBJS-y += console.o
104COBJS-y += cyclon2.o
eran liberty3c735e72008-03-27 00:50:49 +0100105COBJS-y += stratixII.o
Grant Likelyf0037c52007-09-24 09:05:30 -0600106COBJS-y += devices.o
107COBJS-y += dlmalloc.o
108COBJS-y += docecc.o
109COBJS-y += environment.o
110COBJS-y += env_common.o
111COBJS-y += env_nand.o
112COBJS-y += env_dataflash.o
113COBJS-y += env_flash.o
114COBJS-y += env_eeprom.o
115COBJS-y += env_onenand.o
116COBJS-y += env_nvram.o
117COBJS-y += env_nowhere.o
118COBJS-y += exports.o
Grant Likelyf0037c52007-09-24 09:05:30 -0600119COBJS-y += flash.o
120COBJS-y += fpga.o
121COBJS-y += ft_build.o
122COBJS-y += hush.o
123COBJS-y += kgdb.o
124COBJS-y += lcd.o
125COBJS-y += lists.o
126COBJS-y += lynxkdi.o
127COBJS-y += memsize.o
128COBJS-y += miiphybb.o
129COBJS-y += miiphyutil.o
130COBJS-y += s_record.o
131COBJS-y += serial.o
132COBJS-y += soft_i2c.o
133COBJS-y += soft_spi.o
134COBJS-y += spartan2.o
135COBJS-y += spartan3.o
136COBJS-y += usb.o
137COBJS-y += usb_kbd.o
138COBJS-y += usb_storage.o
139COBJS-y += virtex2.o
140COBJS-y += xilinx.o
141COBJS-y += crc16.o
142COBJS-y += xyzModem.o
143COBJS-y += cmd_mac.o
Grant Likely4a437192007-09-24 09:05:31 -0600144COBJS-$(CONFIG_CMD_MFSL) += cmd_mfsl.o
Kumar Galaec2b74f2008-01-17 16:48:33 -0600145COBJS-$(CONFIG_MP) += cmd_mp.o
wdenke831ad52002-10-17 21:52:26 +0000146
Grant Likelyf0037c52007-09-24 09:05:30 -0600147COBJS := $(COBJS-y)
Marian Balakowiczf9328632006-09-01 19:49:50 +0200148SRCS := $(AOBJS:.o=.S) $(COBJS:.o=.c)
149OBJS := $(addprefix $(obj),$(AOBJS) $(COBJS))
wdenke831ad52002-10-17 21:52:26 +0000150
151CPPFLAGS += -I..
152
153all: $(LIB) $(AOBJS)
154
Marian Balakowiczf9328632006-09-01 19:49:50 +0200155$(LIB): $(obj).depend $(OBJS)
Wolfgang Denk2b208f52006-10-09 01:02:05 +0200156 $(AR) $(ARFLAGS) $@ $(OBJS)
wdenke831ad52002-10-17 21:52:26 +0000157
Marian Balakowiczf9328632006-09-01 19:49:50 +0200158$(obj)environment.o: $(src)environment.c $(obj)../tools/envcrc
wdenke831ad52002-10-17 21:52:26 +0000159 $(CC) $(AFLAGS) -Wa,--no-warn \
Marian Balakowiczf9328632006-09-01 19:49:50 +0200160 -DENV_CRC=$(shell $(obj)../tools/envcrc) \
161 -c -o $@ $(src)environment.c
wdenke831ad52002-10-17 21:52:26 +0000162
Marian Balakowiczf9328632006-09-01 19:49:50 +0200163$(obj)../tools/envcrc:
wdenka8c7c702003-12-06 19:49:23 +0000164 $(MAKE) -C ../tools
165
wdenke831ad52002-10-17 21:52:26 +0000166#########################################################################
167
Marian Balakowiczf9328632006-09-01 19:49:50 +0200168# defines $(obj).depend target
169include $(SRCTREE)/rules.mk
wdenke831ad52002-10-17 21:52:26 +0000170
Marian Balakowiczf9328632006-09-01 19:49:50 +0200171sinclude $(obj).depend
wdenke831ad52002-10-17 21:52:26 +0000172
173#########################################################################