2 # (C) Copyright 2004-2006
3 # Wolfgang Denk, DENX Software Engineering, wd@denx.de.
5 # See file CREDITS for list of people who contributed to this
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.
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.
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,
24 include $(TOPDIR)/config.mk
26 LIB = $(obj)libcommon.a
31 COBJS-$(CONFIG_CMD_BEDBUG) += bedbug.o
33 COBJS-$(CONFIG_CMD_AMBAPP) += cmd_ambapp.o
34 COBJS-y += cmd_autoscript.o
35 COBJS-$(CONFIG_CMD_BDI) += cmd_bdinfo.o
36 COBJS-$(CONFIG_CMD_BEDBUG) += cmd_bedbug.o
37 COBJS-$(CONFIG_CMD_BMP) += cmd_bmp.o
41 COBJS-$(CONFIG_CMD_BOOTLDR) += cmd_bootldr.o
42 COBJS-y += cmd_bootm.o
43 COBJS-$(CONFIG_CMD_CACHE) += cmd_cache.o
44 COBJS-$(CONFIG_CMD_CONSOLE) += cmd_console.o
45 COBJS-$(CONFIG_CMD_CPLBINFO) += cmd_cplbinfo.o
46 COBJS-$(CONFIG_CMD_DATE) += cmd_date.o
48 COBJS-$(CONFIG_CMD_SETGETDCR) += cmd_dcr.o
51 COBJS-$(CONFIG_CMD_DIAG) += cmd_diag.o
53 COBJS-$(CONFIG_CMD_DISPLAY) += cmd_display.o
54 COBJS-$(CONFIG_CMD_DOC) += cmd_doc.o
55 COBJS-$(CONFIG_CMD_DTT) += cmd_dtt.o
56 COBJS-y += cmd_eeprom.o
57 COBJS-$(CONFIG_CMD_ELF) += cmd_elf.o
58 COBJS-$(CONFIG_CMD_EXT2) += cmd_ext2.o
59 COBJS-$(CONFIG_CMD_FAT) += cmd_fat.o
61 COBJS-$(CONFIG_OF_LIBFDT) += cmd_fdt.o fdt_support.o
62 COBJS-$(CONFIG_CMD_FDOS) += cmd_fdos.o
63 COBJS-$(CONFIG_CMD_FLASH) += cmd_flash.o
66 COBJS-$(CONFIG_CMD_FPGA) += cmd_fpga.o
67 COBJS-$(CONFIG_FPGA_SPARTAN2) += spartan2.o
68 COBJS-$(CONFIG_FPGA_SPARTAN3) += spartan3.o
69 COBJS-$(CONFIG_FPGA_VIRTEX2) += virtex2.o
70 COBJS-$(CONFIG_FPGA_XILINX) += xilinx.o
71 ifdef CONFIG_FPGA_ALTERA
73 COBJS-$(CONFIG_FPGA_ACEX1K) += ACEX1K.o
74 COBJS-$(CONFIG_FPGA_CYCLON2) += cyclon2.o
75 COBJS-$(CONFIG_FPGA_STRATIX_II) += stratixII.o
78 COBJS-$(CONFIG_CMD_I2C) += cmd_i2c.o
79 COBJS-$(CONFIG_CMD_IDE) += cmd_ide.o
80 COBJS-$(CONFIG_CMD_IMMAP) += cmd_immap.o
81 COBJS-$(CONFIG_CMD_ITEST) += cmd_itest.o
82 COBJS-$(CONFIG_CMD_JFFS2) += cmd_jffs2.o
83 COBJS-$(CONFIG_CMD_LICENSE) += cmd_license.o
85 COBJS-$(CONFIG_LOGBUFFER) += cmd_log.o
87 COBJS-$(CONFIG_CMD_MII) += cmd_mii.o
88 COBJS-$(CONFIG_CMD_MISC) += cmd_misc.o
89 COBJS-$(CONFIG_CMD_MMC) += cmd_mmc.o
91 COBJS-$(CONFIG_CMD_NET) += cmd_net.o
92 COBJS-y += cmd_nvedit.o
93 COBJS-$(CONFIG_CMD_ONENAND) += cmd_onenand.o
94 COBJS-$(CONFIG_CMD_OTP) += cmd_otp.o
96 COBJS-$(CONFIG_CMD_PCI) += cmd_pci.o
98 COBJS-y += cmd_pcmcia.o
99 COBJS-$(CONFIG_CMD_PORTIO) += cmd_portio.o
100 COBJS-$(CONFIG_CMD_REGINFO) += cmd_reginfo.o
101 COBJS-$(CONFIG_CMD_REISER) += cmd_reiser.o
102 COBJS-$(CONFIG_CMD_SATA) += cmd_sata.o
103 COBJS-$(CONFIG_CMD_SCSI) += cmd_scsi.o
104 COBJS-$(CONFIG_CMD_SETEXPR) += cmd_setexpr.o
105 COBJS-$(CONFIG_CMD_SPI) += cmd_spi.o
106 COBJS-$(CONFIG_CMD_STRINGS) += cmd_strings.o
107 COBJS-$(CONFIG_CMD_TERMINAL) += cmd_terminal.o
108 COBJS-$(CONFIG_CMD_UNIVERSE) += cmd_universe.o
109 COBJS-$(CONFIG_CMD_USB) += cmd_usb.o
110 COBJS-$(CONFIG_CMD_XIMG) += cmd_ximg.o
111 COBJS-$(CONFIG_YAFFS2) += cmd_yaffs2.o
116 COBJS-y += dlmalloc.o
117 COBJS-$(CONFIG_CMD_DOC) += docecc.o
118 COBJS-y += environment.o
119 COBJS-y += env_common.o
120 COBJS-y += env_nand.o
121 COBJS-y += env_dataflash.o
122 COBJS-y += env_flash.o
123 COBJS-y += env_eeprom.o
124 COBJS-y += env_onenand.o
126 COBJS-y += env_nvram.o
127 COBJS-y += env_nowhere.o
132 COBJS-$(CONFIG_LCD) += lcd.o
134 COBJS-$(CONFIG_LYNXKDI) += lynxkdi.o
136 COBJS-$(CONFIG_BITBANGMII) += miiphybb.o
137 COBJS-y += miiphyutil.o
138 COBJS-y += s_record.o
140 COBJS-$(CONFIG_SOFT_I2C) += soft_i2c.o
141 COBJS-$(CONFIG_SOFT_SPI) += soft_spi.o
144 COBJS-$(CONFIG_USB_STORAGE) += usb_storage.o
146 COBJS-$(CONFIG_USB_KEYBOARD) += usb_kbd.o
148 COBJS-y += xyzModem.o
150 COBJS-$(CONFIG_CMD_MFSL) += cmd_mfsl.o
151 COBJS-$(CONFIG_MP) += cmd_mp.o
152 COBJS-$(CONFIG_CMD_SF) += cmd_sf.o
155 SRCS := $(AOBJS:.o=.S) $(COBJS:.o=.c)
156 OBJS := $(addprefix $(obj),$(AOBJS) $(COBJS))
162 $(LIB): $(obj).depend $(OBJS)
163 $(AR) $(ARFLAGS) $@ $(OBJS)
165 $(obj)environment.o: $(src)environment.c $(obj)../tools/envcrc
166 $(CC) $(AFLAGS) -Wa,--no-warn \
167 -DENV_CRC=$(shell $(obj)../tools/envcrc) \
168 -c -o $@ $(src)environment.c
170 $(obj)../tools/envcrc:
173 #########################################################################
175 # defines $(obj).depend target
176 include $(SRCTREE)/rules.mk
178 sinclude $(obj).depend
180 #########################################################################