1# 2# (C) Copyright 2004-2006 3# 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 15# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16# 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 26LIB = $(obj)libcommon.a 27 28AOBJS = 29 30COBJS-y += main.o 31COBJS-y += ACEX1K.o 32COBJS-y += altera.o 33COBJS-y += bedbug.o 34COBJS-y += circbuf.o 35COBJS-$(CONFIG_CMD_AMBAPP) += cmd_ambapp.o 36COBJS-y += cmd_autoscript.o 37COBJS-$(CONFIG_CMD_BDI) += cmd_bdinfo.o 38COBJS-$(CONFIG_CMD_BEDBUG) += cmd_bedbug.o 39COBJS-$(CONFIG_CMD_BMP) += cmd_bmp.o 40COBJS-y += image.o 41COBJS-y += gunzip.o 42COBJS-y += cmd_boot.o 43COBJS-$(CONFIG_CMD_BOOTLDR) += cmd_bootldr.o 44COBJS-y += cmd_bootm.o 45COBJS-$(CONFIG_CMD_CACHE) += cmd_cache.o 46COBJS-$(CONFIG_CMD_CONSOLE) += cmd_console.o 47COBJS-$(CONFIG_CMD_CPLBINFO) += cmd_cplbinfo.o 48COBJS-$(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 58COBJS-y += cmd_eeprom.o 59COBJS-$(CONFIG_CMD_ELF) += cmd_elf.o 60COBJS-$(CONFIG_CMD_EXT2) += cmd_ext2.o 61COBJS-$(CONFIG_CMD_FAT) += cmd_fat.o 62COBJS-y += cmd_fdc.o 63COBJS-$(CONFIG_OF_LIBFDT) += cmd_fdt.o fdt_support.o 64COBJS-$(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 74COBJS-y += cmd_load.o 75COBJS-$(CONFIG_LOGBUFFER) += cmd_log.o 76COBJS-y += cmd_mem.o 77COBJS-$(CONFIG_CMD_MII) += cmd_mii.o 78COBJS-$(CONFIG_CMD_MISC) += cmd_misc.o 79COBJS-$(CONFIG_CMD_MMC) += cmd_mmc.o 80COBJS-y += cmd_nand.o 81COBJS-$(CONFIG_CMD_NET) += cmd_net.o 82COBJS-y += cmd_nvedit.o 83COBJS-y += cmd_onenand.o 84COBJS-$(CONFIG_CMD_OTP) += cmd_otp.o 85ifdef CONFIG_PCI 86COBJS-$(CONFIG_CMD_PCI) += cmd_pci.o 87endif 88COBJS-y += cmd_pcmcia.o 89COBJS-$(CONFIG_CMD_PORTIO) += cmd_portio.o 90COBJS-$(CONFIG_CMD_REGINFO) += cmd_reginfo.o 91COBJS-$(CONFIG_CMD_REISER) += cmd_reiser.o 92COBJS-$(CONFIG_CMD_SATA) += cmd_sata.o 93COBJS-$(CONFIG_CMD_SCSI) += cmd_scsi.o 94COBJS-$(CONFIG_CMD_SETEXPR) += cmd_setexpr.o 95COBJS-$(CONFIG_CMD_SPI) += cmd_spi.o 96COBJS-$(CONFIG_CMD_STRINGS) += cmd_strings.o 97COBJS-$(CONFIG_CMD_TERMINAL) += cmd_terminal.o 98COBJS-$(CONFIG_CMD_UNIVERSE) += cmd_universe.o 99COBJS-$(CONFIG_CMD_USB) += cmd_usb.o 100COBJS-$(CONFIG_CMD_XIMG) += cmd_ximg.o 101COBJS-y += cmd_vfd.o 102COBJS-y += command.o 103COBJS-y += console.o 104COBJS-y += cyclon2.o 105COBJS-y += stratixII.o 106COBJS-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_sf.o 117COBJS-y += env_nvram.o 118COBJS-y += env_nowhere.o 119COBJS-y += exports.o 120COBJS-y += flash.o 121COBJS-y += fpga.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 144COBJS-$(CONFIG_CMD_MFSL) += cmd_mfsl.o 145COBJS-$(CONFIG_MP) += cmd_mp.o 146COBJS-$(CONFIG_CMD_SF) += cmd_sf.o 147 148COBJS := $(COBJS-y) 149SRCS := $(AOBJS:.o=.S) $(COBJS:.o=.c) 150OBJS := $(addprefix $(obj),$(AOBJS) $(COBJS)) 151 152CPPFLAGS += -I.. 153 154all: $(LIB) $(AOBJS) 155 156$(LIB): $(obj).depend $(OBJS) 157 $(AR) $(ARFLAGS) $@ $(OBJS) 158 159$(obj)environment.o: $(src)environment.c $(obj)../tools/envcrc 160 $(CC) $(AFLAGS) -Wa,--no-warn \ 161 -DENV_CRC=$(shell $(obj)../tools/envcrc) \ 162 -c -o $@ $(src)environment.c 163 164$(obj)../tools/envcrc: 165 $(MAKE) -C ../tools 166 167######################################################################### 168 169# defines $(obj).depend target 170include $(SRCTREE)/rules.mk 171 172sinclude $(obj).depend 173 174######################################################################### 175