Add more stock U-Boot images
[oweals/u-boot_mod.git] / u-boot / common / Makefile
1 #
2 # (C) Copyright 2004
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
24 include $(TOPDIR)/config.mk
25
26 LIB     = libcommon.a
27
28 AOBJS   =
29
30 COBJS   = main.o \
31                   cmd_bootm.o \
32                   cmd_boot.o \
33                   cmd_flash.o \
34                   cmd_mem.o \
35                   cmd_custom.o \
36                   cmd_net.o \
37                   cmd_nvedit.o \
38                   cmd_itest.o \
39                   cmd_load.o \
40                   cmd_qcaclk.o \
41                   cmd_qcagpio.o \
42                   command.o \
43                   console.o \
44                   devices.o \
45                   dlmalloc.o \
46                   environment.o \
47                   env_common.o \
48                   env_nowhere.o \
49                   exports.o \
50                   flash.o \
51                   lists.o \
52                   env_flash.o \
53                   hush.o \
54                   xyzModem.o \
55                   crc16.o \
56                   s_record.o
57
58 OBJS    = $(AOBJS) $(COBJS)
59
60 CPPFLAGS += -I..
61
62 ifeq ($(DUAL_FIRMWAREIMAGE_SUPPORT),1)
63 CFLAGS += -DCONFIG_DUALIMAGE_SUPPORT
64 OBJS += cmd_bdr.o
65 endif
66
67 all:    $(LIB) $(AOBJS)
68
69 $(LIB): .depend $(OBJS)
70         $(AR) crv $@ $(OBJS)
71
72 environment.o: environment.c ../tools/envcrc
73         $(CC) $(AFLAGS) -Wa,--no-warn \
74                 -DENV_CRC=$(shell ../tools/envcrc) \
75                 -c -o $@ environment.c
76
77 ../tools/envcrc:
78         $(MAKE) -C ../tools
79
80 #########################################################################
81
82 .depend:        Makefile $(AOBJS:.o=.S) $(COBJS:.o=.c)
83                 $(CC) -M $(CFLAGS) $(AOBJS:.o=.S) $(COBJS:.o=.c) > $@
84
85 sinclude .depend
86
87 #########################################################################