xref: /rk3399_rockchip-uboot/common/Makefile (revision 1740618202f5757ed2df3eb98060b9f3a21da7f8)
1e831ad54Swdenk#
2232c150aSwdenk# (C) Copyright 2004
3e831ad54Swdenk# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
4e831ad54Swdenk#
5e831ad54Swdenk# See file CREDITS for list of people who contributed to this
6e831ad54Swdenk# project.
7e831ad54Swdenk#
8e831ad54Swdenk# This program is free software; you can redistribute it and/or
9e831ad54Swdenk# modify it under the terms of the GNU General Public License as
10e831ad54Swdenk# published by the Free Software Foundation; either version 2 of
11e831ad54Swdenk# the License, or (at your option) any later version.
12e831ad54Swdenk#
13e831ad54Swdenk# This program is distributed in the hope that it will be useful,
14e831ad54Swdenk# but WITHOUT ANY WARRANTY; without even the implied warranty of
15e831ad54Swdenk# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	See the
16e831ad54Swdenk# GNU General Public License for more details.
17e831ad54Swdenk#
18e831ad54Swdenk# You should have received a copy of the GNU General Public License
19e831ad54Swdenk# along with this program; if not, write to the Free Software
20e831ad54Swdenk# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
21e831ad54Swdenk# MA 02111-1307 USA
22e831ad54Swdenk#
23e831ad54Swdenk
24e831ad54Swdenkinclude $(TOPDIR)/config.mk
25e831ad54Swdenk
26e831ad54SwdenkLIB	= libcommon.a
27e831ad54Swdenk
28e831ad54SwdenkAOBJS	=
29e831ad54Swdenk
308655b6f8SwdenkCOBJS	= main.o ACEX1K.o altera.o bedbug.o circbuf.o \
313f85ce27Swdenk	  cmd_ace.o cmd_autoscript.o \
328bde7f77Swdenk	  cmd_bdinfo.o cmd_bedbug.o cmd_bmp.o cmd_boot.o cmd_bootm.o \
338bde7f77Swdenk	  cmd_cache.o cmd_console.o \
348bde7f77Swdenk	  cmd_date.o cmd_dcr.o cmd_diag.o cmd_doc.o cmd_dtt.o \
35*17406182Sstroese	  cmd_eeprom.o cmd_elf.o cmd_ext2.o \
368bde7f77Swdenk	  cmd_fat.o cmd_fdc.o cmd_fdos.o cmd_flash.o cmd_fpga.o \
372d1a537dSwdenk	  cmd_i2c.o cmd_ide.o cmd_immap.o cmd_itest.o cmd_jffs2.o \
388bde7f77Swdenk	  cmd_load.o cmd_log.o \
398bde7f77Swdenk	  cmd_mem.o cmd_mii.o cmd_misc.o cmd_mmc.o \
408bde7f77Swdenk	  cmd_nand.o cmd_net.o cmd_nvedit.o \
417a8e9bedSwdenk	  cmd_pci.o cmd_pcmcia.o cmd_portio.o \
42*17406182Sstroese	  cmd_reginfo.o cmd_reiser.o cmd_scsi.o cmd_spi.o cmd_universe.o cmd_usb.o cmd_vfd.o \
438bde7f77Swdenk	  command.o console.o devices.o dlmalloc.o docecc.o \
448bde7f77Swdenk	  environment.o env_common.o \
4513a5695bSwdenk	  env_nand.o env_dataflash.o env_flash.o env_eeprom.o env_nvram.o env_nowhere.o exports.o \
468bde7f77Swdenk	  flash.o fpga.o \
478655b6f8Swdenk	  hush.o kgdb.o lcd.o lists.o lynxkdi.o \
488655b6f8Swdenk	  memsize.o miiphybb.o miiphyutil.o \
49281e00a3Swdenk	  s_record.o serial.o soft_i2c.o soft_spi.o spartan2.o \
50e831ad54Swdenk	  usb.o usb_kbd.o usb_storage.o \
518655b6f8Swdenk	  virtex2.o xilinx.o
52e831ad54Swdenk
53e831ad54SwdenkOBJS	= $(AOBJS) $(COBJS)
54e831ad54Swdenk
55e831ad54SwdenkCPPFLAGS += -I..
56e831ad54Swdenk
57e831ad54Swdenkall:	$(LIB) $(AOBJS)
58e831ad54Swdenk
59e831ad54Swdenk$(LIB): .depend $(OBJS)
60e831ad54Swdenk	$(AR) crv $@ $(OBJS)
61e831ad54Swdenk
62e831ad54Swdenkenvironment.o: environment.c ../tools/envcrc
63e831ad54Swdenk	$(CC) $(AFLAGS) -Wa,--no-warn \
64e831ad54Swdenk		-DENV_CRC=$(shell ../tools/envcrc) \
65e831ad54Swdenk		-c -o $@ environment.c
66e831ad54Swdenk
67a8c7c708Swdenk../tools/envcrc:
68a8c7c708Swdenk	$(MAKE) -C ../tools
69a8c7c708Swdenk
70e831ad54Swdenk#########################################################################
71e831ad54Swdenk
72e831ad54Swdenk.depend:	Makefile $(AOBJS:.o=.S) $(COBJS:.o=.c)
73e831ad54Swdenk		$(CC) -M $(CFLAGS) $(AOBJS:.o=.S) $(COBJS:.o=.c) > $@
74e831ad54Swdenk
75e831ad54Swdenksinclude .depend
76e831ad54Swdenk
77e831ad54Swdenk#########################################################################
78