blob: 56d05819f95c79005d6df776ad7cc5553a3bc074 [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
35COBJS-y += cmd_autoscript.o
Grant Likely4a437192007-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
Grant Likelyf0037c52007-09-24 09:05:30 -060039COBJS-y += cmd_boot.o
Mike Frysinger86a20fb2008-02-16 07:40:36 -050040COBJS-$(CONFIG_CMD_BOOTLDR) += cmd_bootldr.o
Grant Likelyf0037c52007-09-24 09:05:30 -060041COBJS-y += cmd_bootm.o
Grant Likely4a437192007-09-24 09:05:31 -060042COBJS-$(CONFIG_CMD_CACHE) += cmd_cache.o
43COBJS-$(CONFIG_CMD_CONSOLE) += cmd_console.o
Mike Frysingercf675d32008-02-19 00:35:17 -050044COBJS-$(CONFIG_CMD_CPLBINFO) += cmd_cplbinfo.o
Grant Likely4a437192007-09-24 09:05:31 -060045COBJS-$(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 Likelyf0037c52007-09-24 09:05:30 -060055COBJS-y += cmd_eeprom.o
Grant Likely4a437192007-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 Likelyf0037c52007-09-24 09:05:30 -060059COBJS-y += cmd_fdc.o
Kumar Gala9c9109e2007-11-26 11:19:12 -060060COBJS-$(CONFIG_OF_LIBFDT) += cmd_fdt.o fdt_support.o
Grant Likely4a437192007-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 Likelyf0037c52007-09-24 09:05:30 -060071COBJS-y += cmd_load.o
Grant Likely4a437192007-09-24 09:05:31 -060072COBJS-$(CONFIG_LOGBUFFER) += cmd_log.o
Grant Likelyf0037c52007-09-24 09:05:30 -060073COBJS-y += cmd_mem.o
Grant Likely4a437192007-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 Likelyf0037c52007-09-24 09:05:30 -060077COBJS-y += cmd_nand.o
Grant Likely4a437192007-09-24 09:05:31 -060078COBJS-$(CONFIG_CMD_NET) += cmd_net.o
Grant Likelyf0037c52007-09-24 09:05:30 -060079COBJS-y += cmd_nvedit.o
80COBJS-y += cmd_onenand.o
Mike Frysingerd0b01a22008-02-04 19:26:57 -050081COBJS-$(CONFIG_CMD_OTP) += cmd_otp.o
Grant Likely4a437192007-09-24 09:05:31 -060082ifdef CONFIG_PCI
83COBJS-$(CONFIG_CMD_PCI) += cmd_pci.o
84endif
Grant Likelyf0037c52007-09-24 09:05:30 -060085COBJS-y += cmd_pcmcia.o
Grant Likely4a437192007-09-24 09:05:31 -060086COBJS-$(CONFIG_CMD_PORTIO) += cmd_portio.o
87COBJS-$(CONFIG_CMD_REGINFO) += cmd_reginfo.o
88COBJS-$(CONFIG_CMD_REISER) += cmd_reiser.o
Grant Likelyf0037c52007-09-24 09:05:30 -060089COBJS-y += cmd_sata.o
Grant Likely4a437192007-09-24 09:05:31 -060090COBJS-$(CONFIG_CMD_SCSI) += cmd_scsi.o
91COBJS-$(CONFIG_CMD_SPI) += cmd_spi.o
Mike Frysinger30942b12008-02-04 19:26:57 -050092COBJS-$(CONFIG_CMD_STRINGS) += cmd_strings.o
Harald Welted16471e2007-12-19 14:14:47 +010093COBJS-$(CONFIG_CMD_TERMINAL) += cmd_terminal.o
Grant Likely4a437192007-09-24 09:05:31 -060094COBJS-$(CONFIG_CMD_UNIVERSE) += cmd_universe.o
95COBJS-$(CONFIG_CMD_USB) += cmd_usb.o
Grant Likelyf0037c52007-09-24 09:05:30 -060096COBJS-y += cmd_vfd.o
97COBJS-y += command.o
98COBJS-y += console.o
99COBJS-y += cyclon2.o
100COBJS-y += devices.o
101COBJS-y += dlmalloc.o
102COBJS-y += docecc.o
103COBJS-y += environment.o
104COBJS-y += env_common.o
105COBJS-y += env_nand.o
106COBJS-y += env_dataflash.o
107COBJS-y += env_flash.o
108COBJS-y += env_eeprom.o
109COBJS-y += env_onenand.o
110COBJS-y += env_nvram.o
111COBJS-y += env_nowhere.o
112COBJS-y += exports.o
Grant Likelyf0037c52007-09-24 09:05:30 -0600113COBJS-y += flash.o
114COBJS-y += fpga.o
115COBJS-y += ft_build.o
116COBJS-y += hush.o
117COBJS-y += kgdb.o
118COBJS-y += lcd.o
119COBJS-y += lists.o
120COBJS-y += lynxkdi.o
121COBJS-y += memsize.o
122COBJS-y += miiphybb.o
123COBJS-y += miiphyutil.o
124COBJS-y += s_record.o
125COBJS-y += serial.o
126COBJS-y += soft_i2c.o
127COBJS-y += soft_spi.o
128COBJS-y += spartan2.o
129COBJS-y += spartan3.o
130COBJS-y += usb.o
131COBJS-y += usb_kbd.o
132COBJS-y += usb_storage.o
133COBJS-y += virtex2.o
134COBJS-y += xilinx.o
135COBJS-y += crc16.o
136COBJS-y += xyzModem.o
137COBJS-y += cmd_mac.o
Grant Likely4a437192007-09-24 09:05:31 -0600138COBJS-$(CONFIG_CMD_MFSL) += cmd_mfsl.o
wdenke831ad52002-10-17 21:52:26 +0000139
Grant Likelyf0037c52007-09-24 09:05:30 -0600140COBJS := $(COBJS-y)
Marian Balakowiczf9328632006-09-01 19:49:50 +0200141SRCS := $(AOBJS:.o=.S) $(COBJS:.o=.c)
142OBJS := $(addprefix $(obj),$(AOBJS) $(COBJS))
wdenke831ad52002-10-17 21:52:26 +0000143
144CPPFLAGS += -I..
145
146all: $(LIB) $(AOBJS)
147
Marian Balakowiczf9328632006-09-01 19:49:50 +0200148$(LIB): $(obj).depend $(OBJS)
Wolfgang Denk2b208f52006-10-09 01:02:05 +0200149 $(AR) $(ARFLAGS) $@ $(OBJS)
wdenke831ad52002-10-17 21:52:26 +0000150
Marian Balakowiczf9328632006-09-01 19:49:50 +0200151$(obj)environment.o: $(src)environment.c $(obj)../tools/envcrc
wdenke831ad52002-10-17 21:52:26 +0000152 $(CC) $(AFLAGS) -Wa,--no-warn \
Marian Balakowiczf9328632006-09-01 19:49:50 +0200153 -DENV_CRC=$(shell $(obj)../tools/envcrc) \
154 -c -o $@ $(src)environment.c
wdenke831ad52002-10-17 21:52:26 +0000155
Marian Balakowiczf9328632006-09-01 19:49:50 +0200156$(obj)../tools/envcrc:
wdenka8c7c702003-12-06 19:49:23 +0000157 $(MAKE) -C ../tools
158
wdenke831ad52002-10-17 21:52:26 +0000159#########################################################################
160
Marian Balakowiczf9328632006-09-01 19:49:50 +0200161# defines $(obj).depend target
162include $(SRCTREE)/rules.mk
wdenke831ad52002-10-17 21:52:26 +0000163
Marian Balakowiczf9328632006-09-01 19:49:50 +0200164sinclude $(obj).depend
wdenke831ad52002-10-17 21:52:26 +0000165
166#########################################################################