wdenk | e831ad5 | 2002-10-17 21:52:26 +0000 | [diff] [blame] | 1 | # |
Marian Balakowicz | d62379d | 2006-09-01 19:49:50 +0200 | [diff] [blame] | 2 | # (C) Copyright 2004-2006 |
wdenk | e831ad5 | 2002-10-17 21:52:26 +0000 | [diff] [blame] | 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 |
wdenk | 29e7f5a | 2004-03-12 00:14:09 +0000 | [diff] [blame] | 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
wdenk | e831ad5 | 2002-10-17 21:52:26 +0000 | [diff] [blame] | 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 | |
| 24 | include $(TOPDIR)/config.mk |
| 25 | |
Marian Balakowicz | d62379d | 2006-09-01 19:49:50 +0200 | [diff] [blame] | 26 | LIB = $(obj)libcommon.a |
wdenk | e831ad5 | 2002-10-17 21:52:26 +0000 | [diff] [blame] | 27 | |
| 28 | AOBJS = |
| 29 | |
Grant Likely | 89cf4cc | 2007-02-20 09:05:23 +0100 | [diff] [blame] | 30 | COBJS = main.o ACEX1K.o altera.o bedbug.o circbuf.o cmd_autoscript.o \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame] | 31 | cmd_bdinfo.o cmd_bedbug.o cmd_bmp.o cmd_boot.o cmd_bootm.o \ |
| 32 | cmd_cache.o cmd_console.o \ |
Wolfgang Denk | f8f7707 | 2005-08-30 13:04:12 +0200 | [diff] [blame] | 33 | cmd_date.o cmd_dcr.o cmd_diag.o cmd_display.o cmd_doc.o cmd_dtt.o \ |
stroese | d259302 | 2004-12-16 17:35:57 +0000 | [diff] [blame] | 34 | cmd_eeprom.o cmd_elf.o cmd_ext2.o \ |
Gerald Van Baren | d6abef4 | 2007-03-31 12:23:51 -0400 | [diff] [blame] | 35 | cmd_fat.o cmd_fdc.o cmd_fdt.o cmd_fdos.o cmd_flash.o cmd_fpga.o \ |
wdenk | 2ebee31 | 2004-02-23 19:30:57 +0000 | [diff] [blame] | 36 | cmd_i2c.o cmd_ide.o cmd_immap.o cmd_itest.o cmd_jffs2.o \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame] | 37 | cmd_load.o cmd_log.o \ |
| 38 | cmd_mem.o cmd_mii.o cmd_misc.o cmd_mmc.o \ |
| 39 | cmd_nand.o cmd_net.o cmd_nvedit.o \ |
wdenk | abda5ca | 2003-05-31 18:35:21 +0000 | [diff] [blame] | 40 | cmd_pci.o cmd_pcmcia.o cmd_portio.o \ |
mushtaq khan | 5651b34 | 2007-04-20 14:23:02 +0530 | [diff] [blame] | 41 | cmd_reginfo.o cmd_reiser.o cmd_sata.o cmd_scsi.o cmd_spi.o \ |
| 42 | cmd_universe.o cmd_usb.o cmd_vfd.o \ |
Stefan Roese | 5f1cf2d | 2006-08-15 14:15:51 +0200 | [diff] [blame] | 43 | command.o console.o cyclon2.o devices.o dlmalloc.o docecc.o \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame] | 44 | environment.o env_common.o \ |
Wolfgang Denk | f8f7707 | 2005-08-30 13:04:12 +0200 | [diff] [blame] | 45 | env_nand.o env_dataflash.o env_flash.o env_eeprom.o \ |
| 46 | env_nvram.o env_nowhere.o \ |
| 47 | exports.o \ |
Gerald Van Baren | c4a57ea | 2007-04-06 14:19:43 -0400 | [diff] [blame] | 48 | fdt_support.o flash.o fpga.o ft_build.o \ |
wdenk | 9ca7bbc | 2004-10-09 23:25:58 +0000 | [diff] [blame] | 49 | hush.o kgdb.o lcd.o lists.o lynxkdi.o \ |
| 50 | memsize.o miiphybb.o miiphyutil.o \ |
Wolfgang Denk | c38e70c | 2005-09-25 16:44:21 +0200 | [diff] [blame] | 51 | s_record.o serial.o soft_i2c.o soft_spi.o spartan2.o spartan3.o \ |
wdenk | e831ad5 | 2002-10-17 21:52:26 +0000 | [diff] [blame] | 52 | usb.o usb_kbd.o usb_storage.o \ |
Michal Simek | 9594583 | 2007-05-05 18:54:42 +0200 | [diff] [blame] | 53 | virtex2.o xilinx.o crc16.o xyzModem.o cmd_mac.o cmd_mfsl.o |
wdenk | e831ad5 | 2002-10-17 21:52:26 +0000 | [diff] [blame] | 54 | |
Marian Balakowicz | d62379d | 2006-09-01 19:49:50 +0200 | [diff] [blame] | 55 | SRCS := $(AOBJS:.o=.S) $(COBJS:.o=.c) |
| 56 | OBJS := $(addprefix $(obj),$(AOBJS) $(COBJS)) |
wdenk | e831ad5 | 2002-10-17 21:52:26 +0000 | [diff] [blame] | 57 | |
| 58 | CPPFLAGS += -I.. |
| 59 | |
| 60 | all: $(LIB) $(AOBJS) |
| 61 | |
Marian Balakowicz | d62379d | 2006-09-01 19:49:50 +0200 | [diff] [blame] | 62 | $(LIB): $(obj).depend $(OBJS) |
Wolfgang Denk | 6a65e42 | 2006-10-09 01:02:05 +0200 | [diff] [blame] | 63 | $(AR) $(ARFLAGS) $@ $(OBJS) |
wdenk | e831ad5 | 2002-10-17 21:52:26 +0000 | [diff] [blame] | 64 | |
Marian Balakowicz | d62379d | 2006-09-01 19:49:50 +0200 | [diff] [blame] | 65 | $(obj)environment.o: $(src)environment.c $(obj)../tools/envcrc |
wdenk | e831ad5 | 2002-10-17 21:52:26 +0000 | [diff] [blame] | 66 | $(CC) $(AFLAGS) -Wa,--no-warn \ |
Marian Balakowicz | d62379d | 2006-09-01 19:49:50 +0200 | [diff] [blame] | 67 | -DENV_CRC=$(shell $(obj)../tools/envcrc) \ |
| 68 | -c -o $@ $(src)environment.c |
wdenk | e831ad5 | 2002-10-17 21:52:26 +0000 | [diff] [blame] | 69 | |
Marian Balakowicz | d62379d | 2006-09-01 19:49:50 +0200 | [diff] [blame] | 70 | $(obj)../tools/envcrc: |
wdenk | c0aa5c5 | 2003-12-06 19:49:23 +0000 | [diff] [blame] | 71 | $(MAKE) -C ../tools |
| 72 | |
wdenk | e831ad5 | 2002-10-17 21:52:26 +0000 | [diff] [blame] | 73 | ######################################################################### |
| 74 | |
Marian Balakowicz | d62379d | 2006-09-01 19:49:50 +0200 | [diff] [blame] | 75 | # defines $(obj).depend target |
| 76 | include $(SRCTREE)/rules.mk |
wdenk | e831ad5 | 2002-10-17 21:52:26 +0000 | [diff] [blame] | 77 | |
Marian Balakowicz | d62379d | 2006-09-01 19:49:50 +0200 | [diff] [blame] | 78 | sinclude $(obj).depend |
wdenk | e831ad5 | 2002-10-17 21:52:26 +0000 | [diff] [blame] | 79 | |
| 80 | ######################################################################### |