xref: /openbmc/u-boot/common/Makefile (revision 1ac559d4)
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-y += cmd_autoscript.o
36COBJS-$(CONFIG_CMD_BDI) += cmd_bdinfo.o
37COBJS-$(CONFIG_CMD_BEDBUG) += cmd_bedbug.o
38COBJS-$(CONFIG_CMD_BMP) += cmd_bmp.o
39COBJS-y += cmd_boot.o
40COBJS-y += cmd_bootm.o
41COBJS-$(CONFIG_CMD_CACHE) += cmd_cache.o
42COBJS-$(CONFIG_CMD_CONSOLE) += cmd_console.o
43COBJS-$(CONFIG_CMD_DATE) += cmd_date.o
44ifdef CONFIG_4xx
45COBJS-$(CONFIG_CMD_SETGETDCR) += cmd_dcr.o
46endif
47ifdef CONFIG_POST
48COBJS-$(CONFIG_CMD_DIAG) += cmd_diag.o
49endif
50COBJS-$(CONFIG_CMD_DISPLAY) += cmd_display.o
51COBJS-$(CONFIG_CMD_DOC) += cmd_doc.o
52COBJS-$(CONFIG_CMD_DTT) += cmd_dtt.o
53COBJS-y += cmd_eeprom.o
54COBJS-$(CONFIG_CMD_ELF) += cmd_elf.o
55COBJS-$(CONFIG_CMD_EXT2) += cmd_ext2.o
56COBJS-$(CONFIG_CMD_FAT) += cmd_fat.o
57COBJS-y += cmd_fdc.o
58COBJS-$(CONFIG_OF_LIBFDT) += cmd_fdt.o fdt_support.o
59COBJS-$(CONFIG_CMD_FDOS) += cmd_fdos.o
60COBJS-$(CONFIG_CMD_FLASH) += cmd_flash.o
61ifdef CONFIG_FPGA
62COBJS-$(CONFIG_CMD_FPGA) += cmd_fpga.o
63endif
64COBJS-$(CONFIG_CMD_I2C) += cmd_i2c.o
65COBJS-$(CONFIG_CMD_IDE) += cmd_ide.o
66COBJS-$(CONFIG_CMD_IMMAP) += cmd_immap.o
67COBJS-$(CONFIG_CMD_ITEST) += cmd_itest.o
68COBJS-$(CONFIG_CMD_JFFS2) += cmd_jffs2.o
69COBJS-y += cmd_load.o
70COBJS-$(CONFIG_LOGBUFFER) += cmd_log.o
71COBJS-y += cmd_mem.o
72COBJS-$(CONFIG_CMD_MII) += cmd_mii.o
73COBJS-$(CONFIG_CMD_MISC) += cmd_misc.o
74COBJS-$(CONFIG_CMD_MMC) += cmd_mmc.o
75COBJS-y += cmd_nand.o
76COBJS-$(CONFIG_CMD_NET) += cmd_net.o
77COBJS-y += cmd_nvedit.o
78COBJS-y += cmd_onenand.o
79ifdef CONFIG_PCI
80COBJS-$(CONFIG_CMD_PCI) += cmd_pci.o
81endif
82COBJS-y += cmd_pcmcia.o
83COBJS-$(CONFIG_CMD_PORTIO) += cmd_portio.o
84COBJS-$(CONFIG_CMD_REGINFO) += cmd_reginfo.o
85COBJS-$(CONFIG_CMD_REISER) += cmd_reiser.o
86COBJS-y += cmd_sata.o
87COBJS-$(CONFIG_CMD_SCSI) += cmd_scsi.o
88COBJS-$(CONFIG_CMD_SPI) += cmd_spi.o
89COBJS-$(CONFIG_CMD_TERMINAL) += cmd_terminal.o
90COBJS-$(CONFIG_CMD_UNIVERSE) += cmd_universe.o
91COBJS-$(CONFIG_CMD_USB) += cmd_usb.o
92COBJS-y += cmd_vfd.o
93COBJS-y += command.o
94COBJS-y += console.o
95COBJS-y += cyclon2.o
96COBJS-y += devices.o
97COBJS-y += dlmalloc.o
98COBJS-y += docecc.o
99COBJS-y += environment.o
100COBJS-y += env_common.o
101COBJS-y += env_nand.o
102COBJS-y += env_dataflash.o
103COBJS-y += env_flash.o
104COBJS-y += env_eeprom.o
105COBJS-y += env_onenand.o
106COBJS-y += env_nvram.o
107COBJS-y += env_nowhere.o
108COBJS-y += exports.o
109COBJS-y += flash.o
110COBJS-y += fpga.o
111COBJS-y += ft_build.o
112COBJS-y += hush.o
113COBJS-y += kgdb.o
114COBJS-y += lcd.o
115COBJS-y += lists.o
116COBJS-y += lynxkdi.o
117COBJS-y += memsize.o
118COBJS-y += miiphybb.o
119COBJS-y += miiphyutil.o
120COBJS-y += s_record.o
121COBJS-y += serial.o
122COBJS-y += soft_i2c.o
123COBJS-y += soft_spi.o
124COBJS-y += spartan2.o
125COBJS-y += spartan3.o
126COBJS-y += usb.o
127COBJS-y += usb_kbd.o
128COBJS-y += usb_storage.o
129COBJS-y += virtex2.o
130COBJS-y += xilinx.o
131COBJS-y += crc16.o
132COBJS-y += xyzModem.o
133COBJS-y += cmd_mac.o
134COBJS-$(CONFIG_CMD_MFSL) += cmd_mfsl.o
135
136COBJS	:= $(COBJS-y)
137SRCS	:= $(AOBJS:.o=.S) $(COBJS:.o=.c)
138OBJS	:= $(addprefix $(obj),$(AOBJS) $(COBJS))
139
140CPPFLAGS += -I..
141
142all:	$(LIB) $(AOBJS)
143
144$(LIB): $(obj).depend $(OBJS)
145	$(AR) $(ARFLAGS) $@ $(OBJS)
146
147$(obj)environment.o: $(src)environment.c $(obj)../tools/envcrc
148	$(CC) $(AFLAGS) -Wa,--no-warn \
149		-DENV_CRC=$(shell $(obj)../tools/envcrc) \
150		-c -o $@ $(src)environment.c
151
152$(obj)../tools/envcrc:
153	$(MAKE) -C ../tools
154
155#########################################################################
156
157# defines $(obj).depend target
158include $(SRCTREE)/rules.mk
159
160sinclude $(obj).depend
161
162#########################################################################
163