2002-10-18 05:52:26 +08:00
|
|
|
#
|
2006-09-02 01:49:50 +08:00
|
|
|
# (C) Copyright 2004-2006
|
2002-10-18 05:52:26 +08:00
|
|
|
# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
|
|
|
|
#
|
|
|
|
# See file CREDITS for list of people who contributed to this
|
|
|
|
# project.
|
|
|
|
#
|
|
|
|
# This program is free software; you can redistribute it and/or
|
|
|
|
# modify it under the terms of the GNU General Public License as
|
|
|
|
# published by the Free Software Foundation; either version 2 of
|
|
|
|
# the License, or (at your option) any later version.
|
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
2004-03-12 08:14:09 +08:00
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
2002-10-18 05:52:26 +08:00
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with this program; if not, write to the Free Software
|
|
|
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
|
|
|
# MA 02111-1307 USA
|
|
|
|
#
|
|
|
|
|
|
|
|
include $(TOPDIR)/config.mk
|
|
|
|
|
2006-09-02 01:49:50 +08:00
|
|
|
LIB = $(obj)libcommon.a
|
2002-10-18 05:52:26 +08:00
|
|
|
|
|
|
|
AOBJS =
|
|
|
|
|
2007-09-24 23:05:30 +08:00
|
|
|
COBJS-y += main.o
|
2008-08-13 07:40:38 +08:00
|
|
|
COBJS-$(CONFIG_CMD_BEDBUG) += bedbug.o
|
2007-09-24 23:05:30 +08:00
|
|
|
COBJS-y += circbuf.o
|
2008-03-27 06:00:38 +08:00
|
|
|
COBJS-$(CONFIG_CMD_AMBAPP) += cmd_ambapp.o
|
2007-09-24 23:05:30 +08:00
|
|
|
COBJS-y += cmd_autoscript.o
|
2007-09-24 23:05:31 +08:00
|
|
|
COBJS-$(CONFIG_CMD_BDI) += cmd_bdinfo.o
|
|
|
|
COBJS-$(CONFIG_CMD_BEDBUG) += cmd_bedbug.o
|
|
|
|
COBJS-$(CONFIG_CMD_BMP) += cmd_bmp.o
|
2008-01-09 01:14:09 +08:00
|
|
|
COBJS-y += image.o
|
2008-01-09 01:11:43 +08:00
|
|
|
COBJS-y += gunzip.o
|
2007-09-24 23:05:30 +08:00
|
|
|
COBJS-y += cmd_boot.o
|
2008-02-16 20:40:36 +08:00
|
|
|
COBJS-$(CONFIG_CMD_BOOTLDR) += cmd_bootldr.o
|
2007-09-24 23:05:30 +08:00
|
|
|
COBJS-y += cmd_bootm.o
|
2007-09-24 23:05:31 +08:00
|
|
|
COBJS-$(CONFIG_CMD_CACHE) += cmd_cache.o
|
|
|
|
COBJS-$(CONFIG_CMD_CONSOLE) += cmd_console.o
|
2008-02-19 13:35:17 +08:00
|
|
|
COBJS-$(CONFIG_CMD_CPLBINFO) += cmd_cplbinfo.o
|
2007-09-24 23:05:31 +08:00
|
|
|
COBJS-$(CONFIG_CMD_DATE) += cmd_date.o
|
|
|
|
ifdef CONFIG_4xx
|
|
|
|
COBJS-$(CONFIG_CMD_SETGETDCR) += cmd_dcr.o
|
|
|
|
endif
|
|
|
|
ifdef CONFIG_POST
|
|
|
|
COBJS-$(CONFIG_CMD_DIAG) += cmd_diag.o
|
|
|
|
endif
|
|
|
|
COBJS-$(CONFIG_CMD_DISPLAY) += cmd_display.o
|
|
|
|
COBJS-$(CONFIG_CMD_DOC) += cmd_doc.o
|
|
|
|
COBJS-$(CONFIG_CMD_DTT) += cmd_dtt.o
|
2007-09-24 23:05:30 +08:00
|
|
|
COBJS-y += cmd_eeprom.o
|
2007-09-24 23:05:31 +08:00
|
|
|
COBJS-$(CONFIG_CMD_ELF) += cmd_elf.o
|
|
|
|
COBJS-$(CONFIG_CMD_EXT2) += cmd_ext2.o
|
|
|
|
COBJS-$(CONFIG_CMD_FAT) += cmd_fat.o
|
2007-09-24 23:05:30 +08:00
|
|
|
COBJS-y += cmd_fdc.o
|
2007-11-27 01:19:12 +08:00
|
|
|
COBJS-$(CONFIG_OF_LIBFDT) += cmd_fdt.o fdt_support.o
|
2007-09-24 23:05:31 +08:00
|
|
|
COBJS-$(CONFIG_CMD_FDOS) += cmd_fdos.o
|
|
|
|
COBJS-$(CONFIG_CMD_FLASH) += cmd_flash.o
|
|
|
|
ifdef CONFIG_FPGA
|
2008-08-13 07:40:38 +08:00
|
|
|
COBJS-y += fpga.o
|
2007-09-24 23:05:31 +08:00
|
|
|
COBJS-$(CONFIG_CMD_FPGA) += cmd_fpga.o
|
2008-08-13 07:40:38 +08:00
|
|
|
COBJS-$(CONFIG_FPGA_SPARTAN2) += spartan2.o
|
|
|
|
COBJS-$(CONFIG_FPGA_SPARTAN3) += spartan3.o
|
|
|
|
COBJS-$(CONFIG_FPGA_VIRTEX2) += virtex2.o
|
|
|
|
COBJS-$(CONFIG_FPGA_XILINX) += xilinx.o
|
|
|
|
ifdef CONFIG_FPGA_ALTERA
|
|
|
|
COBJS-y += altera.o
|
|
|
|
COBJS-$(CONFIG_FPGA_ACEX1K) += ACEX1K.o
|
|
|
|
COBJS-$(CONFIG_FPGA_CYCLON2) += cyclon2.o
|
|
|
|
COBJS-$(CONFIG_FPGA_STRATIX_II) += stratixII.o
|
|
|
|
endif
|
2007-09-24 23:05:31 +08:00
|
|
|
endif
|
|
|
|
COBJS-$(CONFIG_CMD_I2C) += cmd_i2c.o
|
|
|
|
COBJS-$(CONFIG_CMD_IDE) += cmd_ide.o
|
|
|
|
COBJS-$(CONFIG_CMD_IMMAP) += cmd_immap.o
|
|
|
|
COBJS-$(CONFIG_CMD_ITEST) += cmd_itest.o
|
|
|
|
COBJS-$(CONFIG_CMD_JFFS2) += cmd_jffs2.o
|
2007-09-24 23:05:30 +08:00
|
|
|
COBJS-y += cmd_load.o
|
2007-09-24 23:05:31 +08:00
|
|
|
COBJS-$(CONFIG_LOGBUFFER) += cmd_log.o
|
2007-09-24 23:05:30 +08:00
|
|
|
COBJS-y += cmd_mem.o
|
2007-09-24 23:05:31 +08:00
|
|
|
COBJS-$(CONFIG_CMD_MII) += cmd_mii.o
|
|
|
|
COBJS-$(CONFIG_CMD_MISC) += cmd_misc.o
|
|
|
|
COBJS-$(CONFIG_CMD_MMC) += cmd_mmc.o
|
2007-09-24 23:05:30 +08:00
|
|
|
COBJS-y += cmd_nand.o
|
2007-09-24 23:05:31 +08:00
|
|
|
COBJS-$(CONFIG_CMD_NET) += cmd_net.o
|
2007-09-24 23:05:30 +08:00
|
|
|
COBJS-y += cmd_nvedit.o
|
2008-08-13 07:40:38 +08:00
|
|
|
COBJS-$(CONFIG_CMD_ONENAND) += cmd_onenand.o
|
2008-02-05 08:26:57 +08:00
|
|
|
COBJS-$(CONFIG_CMD_OTP) += cmd_otp.o
|
2007-09-24 23:05:31 +08:00
|
|
|
ifdef CONFIG_PCI
|
|
|
|
COBJS-$(CONFIG_CMD_PCI) += cmd_pci.o
|
|
|
|
endif
|
2007-09-24 23:05:30 +08:00
|
|
|
COBJS-y += cmd_pcmcia.o
|
2007-09-24 23:05:31 +08:00
|
|
|
COBJS-$(CONFIG_CMD_PORTIO) += cmd_portio.o
|
|
|
|
COBJS-$(CONFIG_CMD_REGINFO) += cmd_reginfo.o
|
|
|
|
COBJS-$(CONFIG_CMD_REISER) += cmd_reiser.o
|
2008-03-26 22:49:44 +08:00
|
|
|
COBJS-$(CONFIG_CMD_SATA) += cmd_sata.o
|
2007-09-24 23:05:31 +08:00
|
|
|
COBJS-$(CONFIG_CMD_SCSI) += cmd_scsi.o
|
2008-02-15 10:44:42 +08:00
|
|
|
COBJS-$(CONFIG_CMD_SETEXPR) += cmd_setexpr.o
|
2007-09-24 23:05:31 +08:00
|
|
|
COBJS-$(CONFIG_CMD_SPI) += cmd_spi.o
|
2008-02-05 08:26:57 +08:00
|
|
|
COBJS-$(CONFIG_CMD_STRINGS) += cmd_strings.o
|
2007-12-19 21:14:47 +08:00
|
|
|
COBJS-$(CONFIG_CMD_TERMINAL) += cmd_terminal.o
|
2007-09-24 23:05:31 +08:00
|
|
|
COBJS-$(CONFIG_CMD_UNIVERSE) += cmd_universe.o
|
|
|
|
COBJS-$(CONFIG_CMD_USB) += cmd_usb.o
|
2008-01-31 20:19:58 +08:00
|
|
|
COBJS-$(CONFIG_CMD_XIMG) += cmd_ximg.o
|
2007-11-15 19:23:57 +08:00
|
|
|
COBJS-$(CONFIG_YAFFS2) += cmd_yaffs2.o
|
2007-09-24 23:05:30 +08:00
|
|
|
COBJS-y += cmd_vfd.o
|
|
|
|
COBJS-y += command.o
|
|
|
|
COBJS-y += console.o
|
|
|
|
COBJS-y += devices.o
|
|
|
|
COBJS-y += dlmalloc.o
|
2008-08-13 07:40:38 +08:00
|
|
|
COBJS-$(CONFIG_CMD_DOC) += docecc.o
|
2007-09-24 23:05:30 +08:00
|
|
|
COBJS-y += environment.o
|
|
|
|
COBJS-y += env_common.o
|
|
|
|
COBJS-y += env_nand.o
|
|
|
|
COBJS-y += env_dataflash.o
|
|
|
|
COBJS-y += env_flash.o
|
|
|
|
COBJS-y += env_eeprom.o
|
|
|
|
COBJS-y += env_onenand.o
|
2008-05-16 17:10:35 +08:00
|
|
|
COBJS-y += env_sf.o
|
2007-09-24 23:05:30 +08:00
|
|
|
COBJS-y += env_nvram.o
|
|
|
|
COBJS-y += env_nowhere.o
|
|
|
|
COBJS-y += exports.o
|
|
|
|
COBJS-y += flash.o
|
|
|
|
COBJS-y += hush.o
|
|
|
|
COBJS-y += kgdb.o
|
2008-08-13 07:40:38 +08:00
|
|
|
COBJS-$(CONFIG_LCD) += lcd.o
|
2007-09-24 23:05:30 +08:00
|
|
|
COBJS-y += lists.o
|
2008-08-13 07:40:38 +08:00
|
|
|
COBJS-$(CONFIG_LYNXKDI) += lynxkdi.o
|
2007-09-24 23:05:30 +08:00
|
|
|
COBJS-y += memsize.o
|
2008-08-13 07:40:38 +08:00
|
|
|
COBJS-$(CONFIG_BITBANGMII) += miiphybb.o
|
2007-09-24 23:05:30 +08:00
|
|
|
COBJS-y += miiphyutil.o
|
|
|
|
COBJS-y += s_record.o
|
|
|
|
COBJS-y += serial.o
|
2008-08-13 07:40:38 +08:00
|
|
|
COBJS-$(CONFIG_SOFT_I2C) += soft_i2c.o
|
|
|
|
COBJS-$(CONFIG_SOFT_SPI) += soft_spi.o
|
|
|
|
ifdef CONFIG_CMD_USB
|
2007-09-24 23:05:30 +08:00
|
|
|
COBJS-y += usb.o
|
2008-08-13 07:40:38 +08:00
|
|
|
COBJS-$(CONFIG_USB_STORAGE) += usb_storage.o
|
|
|
|
endif
|
|
|
|
COBJS-$(CONFIG_USB_KEYBOARD) += usb_kbd.o
|
2007-09-24 23:05:30 +08:00
|
|
|
COBJS-y += crc16.o
|
|
|
|
COBJS-y += xyzModem.o
|
|
|
|
COBJS-y += cmd_mac.o
|
2007-09-24 23:05:31 +08:00
|
|
|
COBJS-$(CONFIG_CMD_MFSL) += cmd_mfsl.o
|
2008-01-18 06:48:33 +08:00
|
|
|
COBJS-$(CONFIG_MP) += cmd_mp.o
|
2008-05-16 17:10:34 +08:00
|
|
|
COBJS-$(CONFIG_CMD_SF) += cmd_sf.o
|
2002-10-18 05:52:26 +08:00
|
|
|
|
2007-09-24 23:05:30 +08:00
|
|
|
COBJS := $(COBJS-y)
|
2006-09-02 01:49:50 +08:00
|
|
|
SRCS := $(AOBJS:.o=.S) $(COBJS:.o=.c)
|
|
|
|
OBJS := $(addprefix $(obj),$(AOBJS) $(COBJS))
|
2002-10-18 05:52:26 +08:00
|
|
|
|
|
|
|
CPPFLAGS += -I..
|
|
|
|
|
|
|
|
all: $(LIB) $(AOBJS)
|
|
|
|
|
2006-09-02 01:49:50 +08:00
|
|
|
$(LIB): $(obj).depend $(OBJS)
|
2006-10-09 07:02:05 +08:00
|
|
|
$(AR) $(ARFLAGS) $@ $(OBJS)
|
2002-10-18 05:52:26 +08:00
|
|
|
|
2006-09-02 01:49:50 +08:00
|
|
|
$(obj)environment.o: $(src)environment.c $(obj)../tools/envcrc
|
2002-10-18 05:52:26 +08:00
|
|
|
$(CC) $(AFLAGS) -Wa,--no-warn \
|
2006-09-02 01:49:50 +08:00
|
|
|
-DENV_CRC=$(shell $(obj)../tools/envcrc) \
|
|
|
|
-c -o $@ $(src)environment.c
|
2002-10-18 05:52:26 +08:00
|
|
|
|
2006-09-02 01:49:50 +08:00
|
|
|
$(obj)../tools/envcrc:
|
2003-12-07 03:49:23 +08:00
|
|
|
$(MAKE) -C ../tools
|
|
|
|
|
2002-10-18 05:52:26 +08:00
|
|
|
#########################################################################
|
|
|
|
|
2006-09-02 01:49:50 +08:00
|
|
|
# defines $(obj).depend target
|
|
|
|
include $(SRCTREE)/rules.mk
|
2002-10-18 05:52:26 +08:00
|
|
|
|
2006-09-02 01:49:50 +08:00
|
|
|
sinclude $(obj).depend
|
2002-10-18 05:52:26 +08:00
|
|
|
|
|
|
|
#########################################################################
|