wdenk | efee170 | 2002-07-20 20:14:13 +0000 | [diff] [blame] | 1 | # |
Marian Balakowicz | f932863 | 2006-09-01 19:49:50 +0200 | [diff] [blame] | 2 | # (C) Copyright 2000-2006 |
wdenk | efee170 | 2002-07-20 20:14:13 +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 |
| 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 | |
wdenk | efee170 | 2002-07-20 20:14:13 +0000 | [diff] [blame] | 24 | TOOLSUBDIRS = |
| 25 | |
| 26 | # |
| 27 | # Mac OS X / Darwin's C preprocessor is Apple specific. It |
| 28 | # generates numerous errors and warnings. We want to bypass it |
| 29 | # and use GNU C's cpp. To do this we pass the -traditional-cpp |
| 30 | # option to the compiler. Note that the -traditional-cpp flag |
| 31 | # DOES NOT have the same semantics as GNU C's flag, all it does |
| 32 | # is invoke the GNU preprocessor in stock ANSI/ISO C fashion. |
| 33 | # |
| 34 | # Apple's linker is similar, thanks to the new 2 stage linking |
| 35 | # multiple symbol definitions are treated as errors, hence the |
| 36 | # -multiply_defined suppress option to turn off this error. |
| 37 | # |
| 38 | ifeq ($(HOSTOS)-$(HOSTARCH),darwin-ppc) |
wdenk | efee170 | 2002-07-20 20:14:13 +0000 | [diff] [blame] | 39 | HOST_CFLAGS = -traditional-cpp -Wall |
| 40 | HOST_LDFLAGS =-multiply_defined suppress |
Aubrey.Li | 5dfaa50 | 2007-05-14 11:47:35 +0800 | [diff] [blame] | 41 | HOST_ENVIRO_CFLAGS = |
wdenk | efee170 | 2002-07-20 20:14:13 +0000 | [diff] [blame] | 42 | |
| 43 | else |
wdenk | efee170 | 2002-07-20 20:14:13 +0000 | [diff] [blame] | 44 | ifeq ($(HOSTOS)-$(HOSTARCH),netbsd-ppc) |
| 45 | HOST_CFLAGS = -Wall -pedantic |
| 46 | HOST_LDFLAGS = |
| 47 | HOST_ENVIRO_CFLAGS = |
| 48 | |
| 49 | # |
| 50 | # Everyone else |
| 51 | # |
| 52 | else |
wdenk | efee170 | 2002-07-20 20:14:13 +0000 | [diff] [blame] | 53 | HOST_CFLAGS = -Wall -pedantic |
| 54 | HOST_LDFLAGS = |
| 55 | HOST_ENVIRO_CFLAGS = |
| 56 | endif |
| 57 | endif |
| 58 | |
| 59 | # |
| 60 | # Cygwin needs .exe files :-( |
| 61 | # |
| 62 | ifeq ($(HOSTOS),cygwin) |
| 63 | SFX = .exe |
raptorbrino@aim.com | 883e392 | 2007-12-13 21:23:28 -0500 | [diff] [blame] | 64 | HOST_CFLAGS += -ansi |
wdenk | efee170 | 2002-07-20 20:14:13 +0000 | [diff] [blame] | 65 | else |
| 66 | SFX = |
| 67 | endif |
| 68 | |
wdenk | efee170 | 2002-07-20 20:14:13 +0000 | [diff] [blame] | 69 | # |
| 70 | # Include this after HOSTOS HOSTARCH check |
| 71 | # so that we can act intelligently. |
| 72 | # |
| 73 | include $(TOPDIR)/config.mk |
| 74 | |
Peter Tyser | ee3584a | 2009-03-13 18:54:34 -0500 | [diff] [blame] | 75 | # Generated executable files |
Peter Tyser | eeba861 | 2009-03-13 18:54:36 -0500 | [diff] [blame] | 76 | BIN_FILES-$(CONFIG_CMD_LOADS) += img2srec$(SFX) |
Peter Tyser | ee3584a | 2009-03-13 18:54:34 -0500 | [diff] [blame] | 77 | BIN_FILES-y += mkimage$(SFX) |
| 78 | BIN_FILES-y += envcrc$(SFX) |
Peter Tyser | 7cd5cbc | 2009-03-13 18:54:37 -0500 | [diff] [blame^] | 79 | BIN_FILES-$(CONFIG_SHA1_CHECK_UB_IMG) += ubsha1$(SFX) |
Peter Tyser | ee3584a | 2009-03-13 18:54:34 -0500 | [diff] [blame] | 80 | BIN_FILES-y += gen_eth_addr$(SFX) |
Peter Tyser | 335ffe7 | 2009-03-13 18:54:35 -0500 | [diff] [blame] | 81 | BIN_FILES-$(CONFIG_LCD_LOGO) += bmp_logo$(SFX) |
| 82 | BIN_FILES-$(CONFIG_VIDEO_LOGO) += bmp_logo$(SFX) |
Peter Tyser | ee3584a | 2009-03-13 18:54:34 -0500 | [diff] [blame] | 83 | |
| 84 | # Source files which are symlinked from elsewhere in U-Boot |
| 85 | OBJ_LINKS-y += env_embedded.o |
| 86 | OBJ_LINKS-y += crc32.o md5.o |
| 87 | OBJ_LINKS-y += sha1.o |
| 88 | OBJ_LINKS-y += image.o |
| 89 | |
| 90 | # Source files located in the tools directory |
Peter Tyser | eeba861 | 2009-03-13 18:54:36 -0500 | [diff] [blame] | 91 | OBJ_FILES-$(CONFIG_CMD_LOADS) += img2srec.o |
Peter Tyser | ee3584a | 2009-03-13 18:54:34 -0500 | [diff] [blame] | 92 | OBJ_FILES-y += mkimage.o |
| 93 | OBJ_FILES-y += envcrc.o |
Peter Tyser | 7cd5cbc | 2009-03-13 18:54:37 -0500 | [diff] [blame^] | 94 | OBJ_FILES-$(CONFIG_SHA1_CHECK_UB_IMG) += ubsha1.o |
Peter Tyser | ee3584a | 2009-03-13 18:54:34 -0500 | [diff] [blame] | 95 | OBJ_FILES-y += gen_eth_addr.o |
Peter Tyser | 335ffe7 | 2009-03-13 18:54:35 -0500 | [diff] [blame] | 96 | OBJ_FILES-$(CONFIG_LCD_LOGO) += bmp_logo.o |
| 97 | OBJ_FILES-$(CONFIG_VIDEO_LOGO) += bmp_logo.o |
Peter Tyser | ee3584a | 2009-03-13 18:54:34 -0500 | [diff] [blame] | 98 | |
| 99 | ifeq ($(ARCH),mips) |
| 100 | BIN_FILES-y += inca-swap-bytes$(SFX) |
| 101 | OBJ_FILES-y += inca-swap-bytes.o |
| 102 | endif |
| 103 | |
| 104 | # Don't build by default |
| 105 | #ifeq ($(ARCH),ppc) |
| 106 | #BIN_FILES-y += mpc86x_clk$(SFX) |
| 107 | #OBJ_FILES-y += mpc86x_clk.o |
| 108 | #endif |
| 109 | |
| 110 | # Flattened device tree objects |
| 111 | LIBFDT_OBJ_FILES-y += fdt.o |
| 112 | LIBFDT_OBJ_FILES-y += fdt_ro.o |
| 113 | LIBFDT_OBJ_FILES-y += fdt_rw.o |
| 114 | LIBFDT_OBJ_FILES-y += fdt_strerror.o |
| 115 | LIBFDT_OBJ_FILES-y += fdt_wip.o |
| 116 | |
Peter Tyser | 335ffe7 | 2009-03-13 18:54:35 -0500 | [diff] [blame] | 117 | # Generated LCD/video logo |
Peter Tyser | ee3584a | 2009-03-13 18:54:34 -0500 | [diff] [blame] | 118 | LOGO_H = $(OBJTREE)/include/bmp_logo.h |
Peter Tyser | 335ffe7 | 2009-03-13 18:54:35 -0500 | [diff] [blame] | 119 | LOGO-$(CONFIG_LCD_LOGO) += $(LOGO_H) |
| 120 | LOGO-$(CONFIG_VIDEO_LOGO) += $(LOGO_H) |
Peter Tyser | ee3584a | 2009-03-13 18:54:34 -0500 | [diff] [blame] | 121 | |
| 122 | ifeq ($(LOGO_BMP),) |
| 123 | LOGO_BMP= logos/denx.bmp |
| 124 | endif |
| 125 | ifeq ($(VENDOR),atmel) |
| 126 | LOGO_BMP= logos/atmel.bmp |
| 127 | endif |
| 128 | |
Marian Balakowicz | f932863 | 2006-09-01 19:49:50 +0200 | [diff] [blame] | 129 | # now $(obj) is defined |
Peter Tyser | ee3584a | 2009-03-13 18:54:34 -0500 | [diff] [blame] | 130 | SRCS := $(addprefix $(obj),$(OBJ_LINKS-y:.o=.c)) $(OBJ_FILES-y:.o=.c) |
| 131 | BINS := $(addprefix $(obj),$(BIN_FILES-y)) |
| 132 | LIBFDT_OBJS := $(addprefix $(obj),$(LIBFDT_OBJ_FILES-y)) |
Marian Balakowicz | f932863 | 2006-09-01 19:49:50 +0200 | [diff] [blame] | 133 | |
wdenk | efee170 | 2002-07-20 20:14:13 +0000 | [diff] [blame] | 134 | # |
| 135 | # Use native tools and options |
| 136 | # |
Marian Balakowicz | f932863 | 2006-09-01 19:49:50 +0200 | [diff] [blame] | 137 | CPPFLAGS = -idirafter $(SRCTREE)/include \ |
| 138 | -idirafter $(OBJTREE)/include2 \ |
| 139 | -idirafter $(OBJTREE)/include \ |
| 140 | -DTEXT_BASE=$(TEXT_BASE) -DUSE_HOSTCC |
wdenk | efee170 | 2002-07-20 20:14:13 +0000 | [diff] [blame] | 141 | CFLAGS = $(HOST_CFLAGS) $(CPPFLAGS) -O |
Bartlomiej Sieka | 8cf3080 | 2008-02-29 16:00:24 +0100 | [diff] [blame] | 142 | |
| 143 | # No -pedantic switch to avoid libfdt compilation warnings |
| 144 | FIT_CFLAGS = -Wall $(CPPFLAGS) -O |
| 145 | |
wdenk | efee170 | 2002-07-20 20:14:13 +0000 | [diff] [blame] | 146 | AFLAGS = -D__ASSEMBLY__ $(CPPFLAGS) |
| 147 | CC = $(HOSTCC) |
| 148 | STRIP = $(HOSTSTRIP) |
| 149 | MAKEDEPEND = makedepend |
| 150 | |
Peter Tyser | 335ffe7 | 2009-03-13 18:54:35 -0500 | [diff] [blame] | 151 | all: $(obj).depend $(BINS) $(LOGO-y) subdirs |
wdenk | efee170 | 2002-07-20 20:14:13 +0000 | [diff] [blame] | 152 | |
Jean-Christophe PLAGNIOL-VILLARD | 0cf4fd3 | 2008-09-10 22:48:01 +0200 | [diff] [blame] | 153 | $(obj)envcrc$(SFX): $(obj)envcrc.o $(obj)crc32.o $(obj)env_embedded.o $(obj)sha1.o |
Peter Tyser | 21d28e9 | 2009-03-13 18:54:33 -0500 | [diff] [blame] | 154 | $(CC) $(CFLAGS) -o $@ $^ |
Heiko Schocher | 566a494 | 2007-06-22 19:11:54 +0200 | [diff] [blame] | 155 | |
| 156 | $(obj)ubsha1$(SFX): $(obj)ubsha1.o $(obj)sha1.o |
Peter Tyser | 21d28e9 | 2009-03-13 18:54:33 -0500 | [diff] [blame] | 157 | $(CC) $(CFLAGS) -o $@ $^ |
wdenk | efee170 | 2002-07-20 20:14:13 +0000 | [diff] [blame] | 158 | |
Marian Balakowicz | f932863 | 2006-09-01 19:49:50 +0200 | [diff] [blame] | 159 | $(obj)img2srec$(SFX): $(obj)img2srec.o |
Peter Tyser | 21d28e9 | 2009-03-13 18:54:33 -0500 | [diff] [blame] | 160 | $(CC) $(CFLAGS) $(HOST_LDFLAGS) -o $@ $^ |
| 161 | $(STRIP) $@ |
wdenk | efee170 | 2002-07-20 20:14:13 +0000 | [diff] [blame] | 162 | |
Peter Tyser | 21d28e9 | 2009-03-13 18:54:33 -0500 | [diff] [blame] | 163 | $(obj)mkimage$(SFX): $(obj)mkimage.o $(obj)crc32.o $(obj)image.o $(obj)md5.o \ |
Peter Tyser | ee3584a | 2009-03-13 18:54:34 -0500 | [diff] [blame] | 164 | $(obj)sha1.o $(LIBFDT_OBJS) |
Peter Tyser | 21d28e9 | 2009-03-13 18:54:33 -0500 | [diff] [blame] | 165 | $(CC) $(CFLAGS) $(HOST_LDFLAGS) -o $@ $^ |
| 166 | $(STRIP) $@ |
wdenk | efee170 | 2002-07-20 20:14:13 +0000 | [diff] [blame] | 167 | |
Marian Balakowicz | f932863 | 2006-09-01 19:49:50 +0200 | [diff] [blame] | 168 | $(obj)ncb$(SFX): $(obj)ncb.o |
Peter Tyser | 21d28e9 | 2009-03-13 18:54:33 -0500 | [diff] [blame] | 169 | $(CC) $(CFLAGS) $(HOST_LDFLAGS) -o $@ $^ |
| 170 | $(STRIP) $@ |
wdenk | eedcd07 | 2004-09-08 22:03:11 +0000 | [diff] [blame] | 171 | |
Marian Balakowicz | f932863 | 2006-09-01 19:49:50 +0200 | [diff] [blame] | 172 | $(obj)gen_eth_addr$(SFX): $(obj)gen_eth_addr.o |
Peter Tyser | 21d28e9 | 2009-03-13 18:54:33 -0500 | [diff] [blame] | 173 | $(CC) $(CFLAGS) $(HOST_LDFLAGS) -o $@ $^ |
| 174 | $(STRIP) $@ |
wdenk | efee170 | 2002-07-20 20:14:13 +0000 | [diff] [blame] | 175 | |
Marian Balakowicz | f932863 | 2006-09-01 19:49:50 +0200 | [diff] [blame] | 176 | $(obj)bmp_logo$(SFX): $(obj)bmp_logo.o |
Peter Tyser | 21d28e9 | 2009-03-13 18:54:33 -0500 | [diff] [blame] | 177 | $(CC) $(CFLAGS) $(HOST_LDFLAGS) -o $@ $^ |
| 178 | $(STRIP) $@ |
wdenk | efee170 | 2002-07-20 20:14:13 +0000 | [diff] [blame] | 179 | |
Marian Balakowicz | f932863 | 2006-09-01 19:49:50 +0200 | [diff] [blame] | 180 | $(obj)inca-swap-bytes$(SFX): $(obj)inca-swap-bytes.o |
Peter Tyser | 21d28e9 | 2009-03-13 18:54:33 -0500 | [diff] [blame] | 181 | $(CC) $(CFLAGS) $(HOST_LDFLAGS) -o $@ $^ |
| 182 | $(STRIP) $@ |
wdenk | 3e38691 | 2003-04-05 00:53:31 +0000 | [diff] [blame] | 183 | |
Marian Balakowicz | f932863 | 2006-09-01 19:49:50 +0200 | [diff] [blame] | 184 | $(obj)mpc86x_clk$(SFX): $(obj)mpc86x_clk.o |
Peter Tyser | 21d28e9 | 2009-03-13 18:54:33 -0500 | [diff] [blame] | 185 | $(CC) $(CFLAGS) $(HOST_LDFLAGS) -o $@ $^ |
| 186 | $(STRIP) $@ |
wdenk | ef1464c | 2003-10-08 22:14:02 +0000 | [diff] [blame] | 187 | |
Harald Welte | 0a823aa | 2008-07-09 22:30:30 +0800 | [diff] [blame] | 188 | $(obj)bin2header$(SFX): $(obj)bin2header.o |
Peter Tyser | 21d28e9 | 2009-03-13 18:54:33 -0500 | [diff] [blame] | 189 | $(CC) $(CFLAGS) $(HOST_LDFLAGS) -o $@ $^ |
| 190 | $(STRIP) $@ |
Harald Welte | 0a823aa | 2008-07-09 22:30:30 +0800 | [diff] [blame] | 191 | |
Marian Balakowicz | f932863 | 2006-09-01 19:49:50 +0200 | [diff] [blame] | 192 | $(obj)envcrc.o: $(src)envcrc.c |
Peter Tyser | 21d28e9 | 2009-03-13 18:54:33 -0500 | [diff] [blame] | 193 | $(CC) -g $(CFLAGS) -c -o $@ $< |
wdenk | efee170 | 2002-07-20 20:14:13 +0000 | [diff] [blame] | 194 | |
Heiko Schocher | 566a494 | 2007-06-22 19:11:54 +0200 | [diff] [blame] | 195 | $(obj)ubsha1.o: $(src)ubsha1.c |
Peter Tyser | 21d28e9 | 2009-03-13 18:54:33 -0500 | [diff] [blame] | 196 | $(CC) -g $(CFLAGS) -c -o $@ $< |
Heiko Schocher | 566a494 | 2007-06-22 19:11:54 +0200 | [diff] [blame] | 197 | |
Marian Balakowicz | f932863 | 2006-09-01 19:49:50 +0200 | [diff] [blame] | 198 | $(obj)crc32.o: $(obj)crc32.c |
Peter Tyser | 21d28e9 | 2009-03-13 18:54:33 -0500 | [diff] [blame] | 199 | $(CC) -g $(CFLAGS) -c -o $@ $< |
wdenk | efee170 | 2002-07-20 20:14:13 +0000 | [diff] [blame] | 200 | |
Bartlomiej Sieka | 766529f | 2008-03-14 16:22:34 +0100 | [diff] [blame] | 201 | $(obj)md5.o: $(obj)md5.c |
Peter Tyser | 21d28e9 | 2009-03-13 18:54:33 -0500 | [diff] [blame] | 202 | $(CC) -g $(CFLAGS) -c -o $@ $< |
Bartlomiej Sieka | 766529f | 2008-03-14 16:22:34 +0100 | [diff] [blame] | 203 | |
Heiko Schocher | 566a494 | 2007-06-22 19:11:54 +0200 | [diff] [blame] | 204 | $(obj)sha1.o: $(obj)sha1.c |
Peter Tyser | 21d28e9 | 2009-03-13 18:54:33 -0500 | [diff] [blame] | 205 | $(CC) -g $(CFLAGS) -c -o $@ $< |
Heiko Schocher | 566a494 | 2007-06-22 19:11:54 +0200 | [diff] [blame] | 206 | |
Marian Balakowicz | b97a2a0 | 2008-01-08 18:14:09 +0100 | [diff] [blame] | 207 | $(obj)image.o: $(obj)image.c |
Peter Tyser | 21d28e9 | 2009-03-13 18:54:33 -0500 | [diff] [blame] | 208 | $(CC) -g $(FIT_CFLAGS) -c -o $@ $< |
Marian Balakowicz | b97a2a0 | 2008-01-08 18:14:09 +0100 | [diff] [blame] | 209 | |
Marian Balakowicz | f932863 | 2006-09-01 19:49:50 +0200 | [diff] [blame] | 210 | $(obj)mkimage.o: $(src)mkimage.c |
Peter Tyser | 21d28e9 | 2009-03-13 18:54:33 -0500 | [diff] [blame] | 211 | $(CC) -g $(FIT_CFLAGS) -c -o $@ $< |
wdenk | efee170 | 2002-07-20 20:14:13 +0000 | [diff] [blame] | 212 | |
Marian Balakowicz | f932863 | 2006-09-01 19:49:50 +0200 | [diff] [blame] | 213 | $(obj)ncb.o: $(src)ncb.c |
Peter Tyser | 21d28e9 | 2009-03-13 18:54:33 -0500 | [diff] [blame] | 214 | $(CC) -g $(CFLAGS) -c -o $@ $< |
wdenk | eedcd07 | 2004-09-08 22:03:11 +0000 | [diff] [blame] | 215 | |
Marian Balakowicz | f932863 | 2006-09-01 19:49:50 +0200 | [diff] [blame] | 216 | $(obj)gen_eth_addr.o: $(src)gen_eth_addr.c |
Peter Tyser | 21d28e9 | 2009-03-13 18:54:33 -0500 | [diff] [blame] | 217 | $(CC) -g $(CFLAGS) -c -o $@ $< |
wdenk | efee170 | 2002-07-20 20:14:13 +0000 | [diff] [blame] | 218 | |
Marian Balakowicz | f932863 | 2006-09-01 19:49:50 +0200 | [diff] [blame] | 219 | $(obj)inca-swap-bytes.o: $(src)inca-swap-bytes.c |
Peter Tyser | 21d28e9 | 2009-03-13 18:54:33 -0500 | [diff] [blame] | 220 | $(CC) -g $(CFLAGS) -c -o $@ $< |
wdenk | 3e38691 | 2003-04-05 00:53:31 +0000 | [diff] [blame] | 221 | |
Marian Balakowicz | f932863 | 2006-09-01 19:49:50 +0200 | [diff] [blame] | 222 | $(obj)mpc86x_clk.o: $(src)mpc86x_clk.c |
Peter Tyser | 21d28e9 | 2009-03-13 18:54:33 -0500 | [diff] [blame] | 223 | $(CC) -g $(CFLAGS) -c -o $@ $< |
wdenk | ef1464c | 2003-10-08 22:14:02 +0000 | [diff] [blame] | 224 | |
Bartlomiej Sieka | 8cf3080 | 2008-02-29 16:00:24 +0100 | [diff] [blame] | 225 | $(obj)fdt.o: $(obj)fdt.c |
Peter Tyser | 21d28e9 | 2009-03-13 18:54:33 -0500 | [diff] [blame] | 226 | $(CC) -g $(FIT_CFLAGS) -c -o $@ $< |
Bartlomiej Sieka | 8cf3080 | 2008-02-29 16:00:24 +0100 | [diff] [blame] | 227 | |
| 228 | $(obj)fdt_ro.o: $(obj)fdt_ro.c |
Peter Tyser | 21d28e9 | 2009-03-13 18:54:33 -0500 | [diff] [blame] | 229 | $(CC) -g $(FIT_CFLAGS) -c -o $@ $< |
Bartlomiej Sieka | 8cf3080 | 2008-02-29 16:00:24 +0100 | [diff] [blame] | 230 | |
| 231 | $(obj)fdt_rw.o: $(obj)fdt_rw.c |
Peter Tyser | 21d28e9 | 2009-03-13 18:54:33 -0500 | [diff] [blame] | 232 | $(CC) -g $(FIT_CFLAGS) -c -o $@ $< |
Bartlomiej Sieka | 8cf3080 | 2008-02-29 16:00:24 +0100 | [diff] [blame] | 233 | |
| 234 | $(obj)fdt_strerror.o: $(obj)fdt_strerror.c |
Peter Tyser | 21d28e9 | 2009-03-13 18:54:33 -0500 | [diff] [blame] | 235 | $(CC) -g $(FIT_CFLAGS) -c -o $@ $< |
Bartlomiej Sieka | 8cf3080 | 2008-02-29 16:00:24 +0100 | [diff] [blame] | 236 | |
| 237 | $(obj)fdt_wip.o: $(obj)fdt_wip.c |
Peter Tyser | 21d28e9 | 2009-03-13 18:54:33 -0500 | [diff] [blame] | 238 | $(CC) -g $(FIT_CFLAGS) -c -o $@ $< |
Bartlomiej Sieka | 8cf3080 | 2008-02-29 16:00:24 +0100 | [diff] [blame] | 239 | |
wdenk | efee170 | 2002-07-20 20:14:13 +0000 | [diff] [blame] | 240 | subdirs: |
wdenk | e0ac62d | 2003-08-17 18:55:18 +0000 | [diff] [blame] | 241 | ifeq ($(TOOLSUBDIRS),) |
Peter Tyser | 21d28e9 | 2009-03-13 18:54:33 -0500 | [diff] [blame] | 242 | @: |
wdenk | e0ac62d | 2003-08-17 18:55:18 +0000 | [diff] [blame] | 243 | else |
Peter Tyser | 21d28e9 | 2009-03-13 18:54:33 -0500 | [diff] [blame] | 244 | @for dir in $(TOOLSUBDIRS) ; do \ |
| 245 | $(MAKE) \ |
| 246 | HOSTOS=$(HOSTOS) \ |
| 247 | HOSTARCH=$(HOSTARCH) \ |
| 248 | HOST_CFLAGS="$(HOST_CFLAGS)" \ |
| 249 | HOST_LDFLAGS="$(HOST_LDFLAGS)" \ |
| 250 | -C $$dir || exit 1 ; \ |
| 251 | done |
wdenk | e0ac62d | 2003-08-17 18:55:18 +0000 | [diff] [blame] | 252 | endif |
| 253 | |
Jean-Christophe PLAGNIOL-VILLARD | 0cf4fd3 | 2008-09-10 22:48:01 +0200 | [diff] [blame] | 254 | $(obj)env_embedded.c: |
Peter Tyser | 21d28e9 | 2009-03-13 18:54:33 -0500 | [diff] [blame] | 255 | @rm -f $(obj)env_embedded.c |
| 256 | ln -s $(src)../common/env_embedded.c $(obj)env_embedded.c |
wdenk | efee170 | 2002-07-20 20:14:13 +0000 | [diff] [blame] | 257 | |
Jean-Christophe PLAGNIOL-VILLARD | 0cf4fd3 | 2008-09-10 22:48:01 +0200 | [diff] [blame] | 258 | $(obj)env_embedded.o: $(obj)env_embedded.c |
Peter Tyser | 21d28e9 | 2009-03-13 18:54:33 -0500 | [diff] [blame] | 259 | $(CC) -g $(HOST_ENVIRO_CFLAGS) $(CPPFLAGS) -c -o $@ $< |
wdenk | efee170 | 2002-07-20 20:14:13 +0000 | [diff] [blame] | 260 | |
Mike Frysinger | 89cdab7 | 2008-03-31 11:02:01 -0400 | [diff] [blame] | 261 | $(obj)zlib.h: |
Peter Tyser | 21d28e9 | 2009-03-13 18:54:33 -0500 | [diff] [blame] | 262 | @rm -f $@ |
| 263 | ln -s $(src)../include/zlib.h $@ |
Mike Frysinger | 89cdab7 | 2008-03-31 11:02:01 -0400 | [diff] [blame] | 264 | |
| 265 | $(obj)crc32.c: $(obj)zlib.h |
Peter Tyser | 21d28e9 | 2009-03-13 18:54:33 -0500 | [diff] [blame] | 266 | @rm -f $(obj)crc32.c |
| 267 | ln -s $(src)../lib_generic/crc32.c $(obj)crc32.c |
wdenk | efee170 | 2002-07-20 20:14:13 +0000 | [diff] [blame] | 268 | |
Bartlomiej Sieka | 766529f | 2008-03-14 16:22:34 +0100 | [diff] [blame] | 269 | $(obj)md5.c: |
Peter Tyser | 21d28e9 | 2009-03-13 18:54:33 -0500 | [diff] [blame] | 270 | @rm -f $(obj)md5.c |
| 271 | ln -s $(src)../lib_generic/md5.c $(obj)md5.c |
Bartlomiej Sieka | 766529f | 2008-03-14 16:22:34 +0100 | [diff] [blame] | 272 | |
Heiko Schocher | 566a494 | 2007-06-22 19:11:54 +0200 | [diff] [blame] | 273 | $(obj)sha1.c: |
Peter Tyser | 21d28e9 | 2009-03-13 18:54:33 -0500 | [diff] [blame] | 274 | @rm -f $(obj)sha1.c |
| 275 | ln -s $(src)../lib_generic/sha1.c $(obj)sha1.c |
Heiko Schocher | 566a494 | 2007-06-22 19:11:54 +0200 | [diff] [blame] | 276 | |
Marian Balakowicz | b97a2a0 | 2008-01-08 18:14:09 +0100 | [diff] [blame] | 277 | $(obj)image.c: |
Peter Tyser | 21d28e9 | 2009-03-13 18:54:33 -0500 | [diff] [blame] | 278 | @rm -f $(obj)image.c |
| 279 | ln -s $(src)../common/image.c $(obj)image.c |
| 280 | if [ ! -f $(obj)mkimage.h ] ; then \ |
| 281 | ln -s $(src)../tools/mkimage.h $(obj)mkimage.h; \ |
| 282 | fi |
| 283 | if [ ! -f $(obj)fdt_host.h ] ; then \ |
| 284 | ln -s $(src)../tools/fdt_host.h $(obj)fdt_host.h; \ |
| 285 | fi |
Marian Balakowicz | b97a2a0 | 2008-01-08 18:14:09 +0100 | [diff] [blame] | 286 | |
Anatolij Gustschin | b9670dd | 2008-03-26 21:05:43 +0100 | [diff] [blame] | 287 | $(obj)fdt.c: $(obj)libfdt_internal.h |
Peter Tyser | 21d28e9 | 2009-03-13 18:54:33 -0500 | [diff] [blame] | 288 | @rm -f $(obj)fdt.c |
| 289 | ln -s $(src)../libfdt/fdt.c $(obj)fdt.c |
Bartlomiej Sieka | 8cf3080 | 2008-02-29 16:00:24 +0100 | [diff] [blame] | 290 | |
Anatolij Gustschin | b9670dd | 2008-03-26 21:05:43 +0100 | [diff] [blame] | 291 | $(obj)fdt_ro.c: $(obj)libfdt_internal.h |
Peter Tyser | 21d28e9 | 2009-03-13 18:54:33 -0500 | [diff] [blame] | 292 | @rm -f $(obj)fdt_ro.c |
| 293 | ln -s $(src)../libfdt/fdt_ro.c $(obj)fdt_ro.c |
Bartlomiej Sieka | 8cf3080 | 2008-02-29 16:00:24 +0100 | [diff] [blame] | 294 | |
Anatolij Gustschin | b9670dd | 2008-03-26 21:05:43 +0100 | [diff] [blame] | 295 | $(obj)fdt_rw.c: $(obj)libfdt_internal.h |
Peter Tyser | 21d28e9 | 2009-03-13 18:54:33 -0500 | [diff] [blame] | 296 | @rm -f $(obj)fdt_rw.c |
| 297 | ln -s $(src)../libfdt/fdt_rw.c $(obj)fdt_rw.c |
Bartlomiej Sieka | 8cf3080 | 2008-02-29 16:00:24 +0100 | [diff] [blame] | 298 | |
Anatolij Gustschin | b9670dd | 2008-03-26 21:05:43 +0100 | [diff] [blame] | 299 | $(obj)fdt_strerror.c: $(obj)libfdt_internal.h |
Peter Tyser | 21d28e9 | 2009-03-13 18:54:33 -0500 | [diff] [blame] | 300 | @rm -f $(obj)fdt_strerror.c |
| 301 | ln -s $(src)../libfdt/fdt_strerror.c $(obj)fdt_strerror.c |
Bartlomiej Sieka | 8cf3080 | 2008-02-29 16:00:24 +0100 | [diff] [blame] | 302 | |
Anatolij Gustschin | b9670dd | 2008-03-26 21:05:43 +0100 | [diff] [blame] | 303 | $(obj)fdt_wip.c: $(obj)libfdt_internal.h |
Peter Tyser | 21d28e9 | 2009-03-13 18:54:33 -0500 | [diff] [blame] | 304 | @rm -f $(obj)fdt_wip.c |
| 305 | ln -s $(src)../libfdt/fdt_wip.c $(obj)fdt_wip.c |
Bartlomiej Sieka | 8cf3080 | 2008-02-29 16:00:24 +0100 | [diff] [blame] | 306 | |
| 307 | $(obj)libfdt_internal.h: |
Peter Tyser | 21d28e9 | 2009-03-13 18:54:33 -0500 | [diff] [blame] | 308 | @rm -f $(obj)libfdt_internal.h |
| 309 | ln -s $(src)../libfdt/libfdt_internal.h $(obj)libfdt_internal.h |
Bartlomiej Sieka | 8cf3080 | 2008-02-29 16:00:24 +0100 | [diff] [blame] | 310 | |
Marian Balakowicz | f932863 | 2006-09-01 19:49:50 +0200 | [diff] [blame] | 311 | $(LOGO_H): $(obj)bmp_logo $(LOGO_BMP) |
Peter Tyser | 21d28e9 | 2009-03-13 18:54:33 -0500 | [diff] [blame] | 312 | $(obj)./bmp_logo $(LOGO_BMP) >$@ |
wdenk | efee170 | 2002-07-20 20:14:13 +0000 | [diff] [blame] | 313 | |
| 314 | ######################################################################### |
| 315 | |
Marian Balakowicz | f932863 | 2006-09-01 19:49:50 +0200 | [diff] [blame] | 316 | # defines $(obj).depend target |
| 317 | include $(SRCTREE)/rules.mk |
wdenk | efee170 | 2002-07-20 20:14:13 +0000 | [diff] [blame] | 318 | |
Marian Balakowicz | f932863 | 2006-09-01 19:49:50 +0200 | [diff] [blame] | 319 | sinclude $(obj).depend |
wdenk | efee170 | 2002-07-20 20:14:13 +0000 | [diff] [blame] | 320 | |
| 321 | ######################################################################### |