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-$(CONFIG_YAFFS2) += cmd_yaffs2.o 102COBJS-y += cmd_vfd.o 103COBJS-y += command.o 104COBJS-y += console.o 105COBJS-y += cyclon2.o 106COBJS-y += stratixII.o 107COBJS-y += devices.o 108COBJS-y += dlmalloc.o 109COBJS-y += docecc.o 110COBJS-y += environment.o 111COBJS-y += env_common.o 112COBJS-y += env_nand.o 113COBJS-y += env_dataflash.o 114COBJS-y += env_flash.o 115COBJS-y += env_eeprom.o 116COBJS-y += env_onenand.o 117COBJS-y += env_sf.o 118COBJS-y += env_nvram.o 119COBJS-y += env_nowhere.o 120COBJS-y += exports.o 121COBJS-y += flash.o 122COBJS-y += fpga.o 123COBJS-y += hush.o 124COBJS-y += kgdb.o 125COBJS-y += lcd.o 126COBJS-y += lists.o 127COBJS-y += lynxkdi.o 128COBJS-y += memsize.o 129COBJS-y += miiphybb.o 130COBJS-y += miiphyutil.o 131COBJS-y += s_record.o 132COBJS-y += serial.o 133COBJS-y += soft_i2c.o 134COBJS-y += soft_spi.o 135COBJS-y += spartan2.o 136COBJS-y += spartan3.o 137COBJS-y += usb.o 138COBJS-y += usb_kbd.o 139COBJS-y += usb_storage.o 140COBJS-y += virtex2.o 141COBJS-y += xilinx.o 142COBJS-y += crc16.o 143COBJS-y += xyzModem.o 144COBJS-y += cmd_mac.o 145COBJS-$(CONFIG_CMD_MFSL) += cmd_mfsl.o 146COBJS-$(CONFIG_MP) += cmd_mp.o 147COBJS-$(CONFIG_CMD_SF) += cmd_sf.o 148 149COBJS := $(COBJS-y) 150SRCS := $(AOBJS:.o=.S) $(COBJS:.o=.c) 151OBJS := $(addprefix $(obj),$(AOBJS) $(COBJS)) 152 153CPPFLAGS += -I.. 154 155all: $(LIB) $(AOBJS) 156 157$(LIB): $(obj).depend $(OBJS) 158 $(AR) $(ARFLAGS) $@ $(OBJS) 159 160$(obj)environment.o: $(src)environment.c $(obj)../tools/envcrc 161 $(CC) $(AFLAGS) -Wa,--no-warn \ 162 -DENV_CRC=$(shell $(obj)../tools/envcrc) \ 163 -c -o $@ $(src)environment.c 164 165$(obj)../tools/envcrc: 166 $(MAKE) -C ../tools 167 168######################################################################### 169 170# defines $(obj).depend target 171include $(SRCTREE)/rules.mk 172 173sinclude $(obj).depend 174 175######################################################################### 176