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 | # |
Peter Tyser | e50abf6 | 2009-03-13 18:54:50 -0500 | [diff] [blame] | 38 | |
Mike Frysinger | 9aef738 | 2009-07-19 15:17:03 -0400 | [diff] [blame] | 39 | HOSTCFLAGS = -Wall |
Peter Tyser | e50abf6 | 2009-03-13 18:54:50 -0500 | [diff] [blame] | 40 | HOST_LDFLAGS = |
| 41 | |
wdenk | efee170 | 2002-07-20 20:14:13 +0000 | [diff] [blame] | 42 | ifeq ($(HOSTOS)-$(HOSTARCH),darwin-ppc) |
Mike Frysinger | 9aef738 | 2009-07-19 15:17:03 -0400 | [diff] [blame] | 43 | HOSTCFLAGS += -traditional-cpp |
Peter Tyser | e50abf6 | 2009-03-13 18:54:50 -0500 | [diff] [blame] | 44 | HOST_LDFLAGS += -multiply_defined suppress |
wdenk | efee170 | 2002-07-20 20:14:13 +0000 | [diff] [blame] | 45 | else |
Mike Frysinger | 9aef738 | 2009-07-19 15:17:03 -0400 | [diff] [blame] | 46 | HOSTCFLAGS += -pedantic |
wdenk | efee170 | 2002-07-20 20:14:13 +0000 | [diff] [blame] | 47 | endif |
| 48 | |
wdenk | efee170 | 2002-07-20 20:14:13 +0000 | [diff] [blame] | 49 | ifeq ($(HOSTOS),cygwin) |
Mike Frysinger | 9aef738 | 2009-07-19 15:17:03 -0400 | [diff] [blame] | 50 | HOSTCFLAGS += -ansi |
Peter Tyser | 2f8d396 | 2009-03-13 18:54:51 -0500 | [diff] [blame] | 51 | endif |
| 52 | |
| 53 | # |
| 54 | # toolchains targeting win32 generate .exe files |
| 55 | # |
| 56 | ifneq (,$(findstring WIN32 ,$(shell $(HOSTCC) -E -dM -xc /dev/null))) |
| 57 | SFX = .exe |
wdenk | efee170 | 2002-07-20 20:14:13 +0000 | [diff] [blame] | 58 | else |
| 59 | SFX = |
| 60 | endif |
| 61 | |
wdenk | efee170 | 2002-07-20 20:14:13 +0000 | [diff] [blame] | 62 | # |
| 63 | # Include this after HOSTOS HOSTARCH check |
| 64 | # so that we can act intelligently. |
| 65 | # |
| 66 | include $(TOPDIR)/config.mk |
| 67 | |
Peter Tyser | ee3584a | 2009-03-13 18:54:34 -0500 | [diff] [blame] | 68 | # Generated executable files |
Prafulla Wadaskar | 14821d7 | 2009-08-10 20:44:06 +0530 | [diff] [blame] | 69 | BIN_FILES-$(CONFIG_LCD_LOGO) += bmp_logo$(SFX) |
| 70 | BIN_FILES-$(CONFIG_VIDEO_LOGO) += bmp_logo$(SFX) |
Peter Tyser | 4d93a0a | 2009-03-13 18:54:39 -0500 | [diff] [blame] | 71 | BIN_FILES-$(CONFIG_ENV_IS_EMBEDDED) += envcrc$(SFX) |
Mike Frysinger | 2d8d2ad | 2009-06-14 21:35:16 -0400 | [diff] [blame] | 72 | BIN_FILES-$(CONFIG_ENV_IS_IN_DATAFLASH) += envcrc$(SFX) |
Wolfgang Denk | f63728c | 2009-04-05 00:18:44 +0200 | [diff] [blame] | 73 | BIN_FILES-$(CONFIG_ENV_IS_IN_EEPROM) += envcrc$(SFX) |
Wolfgang Denk | afcbce0 | 2009-04-04 16:10:40 +0200 | [diff] [blame] | 74 | BIN_FILES-$(CONFIG_ENV_IS_IN_FLASH) += envcrc$(SFX) |
Mike Frysinger | 2d8d2ad | 2009-06-14 21:35:16 -0400 | [diff] [blame] | 75 | BIN_FILES-$(CONFIG_ENV_IS_IN_ONENAND) += envcrc$(SFX) |
| 76 | BIN_FILES-$(CONFIG_ENV_IS_IN_NAND) += envcrc$(SFX) |
Wolfgang Denk | f63728c | 2009-04-05 00:18:44 +0200 | [diff] [blame] | 77 | BIN_FILES-$(CONFIG_ENV_IS_IN_NVRAM) += envcrc$(SFX) |
Mike Frysinger | 2d8d2ad | 2009-06-14 21:35:16 -0400 | [diff] [blame] | 78 | BIN_FILES-$(CONFIG_ENV_IS_IN_SPI_FLASH) += envcrc$(SFX) |
Peter Tyser | 123c48a | 2009-03-13 18:54:40 -0500 | [diff] [blame] | 79 | BIN_FILES-$(CONFIG_CMD_NET) += gen_eth_addr$(SFX) |
Prafulla Wadaskar | 14821d7 | 2009-08-10 20:44:06 +0530 | [diff] [blame] | 80 | BIN_FILES-$(CONFIG_CMD_LOADS) += img2srec$(SFX) |
Peter Tyser | cd26a31 | 2009-03-13 18:54:38 -0500 | [diff] [blame] | 81 | BIN_FILES-$(CONFIG_INCA_IP) += inca-swap-bytes$(SFX) |
Prafulla Wadaskar | 14821d7 | 2009-08-10 20:44:06 +0530 | [diff] [blame] | 82 | BIN_FILES-y += mkimage$(SFX) |
Peter Tyser | 1cd300d | 2009-03-13 18:54:41 -0500 | [diff] [blame] | 83 | BIN_FILES-$(CONFIG_NETCONSOLE) += ncb$(SFX) |
Prafulla Wadaskar | 14821d7 | 2009-08-10 20:44:06 +0530 | [diff] [blame] | 84 | BIN_FILES-$(CONFIG_SHA1_CHECK_UB_IMG) += ubsha1$(SFX) |
Peter Tyser | ee3584a | 2009-03-13 18:54:34 -0500 | [diff] [blame] | 85 | |
Peter Tyser | fb8b33c | 2009-03-13 18:54:47 -0500 | [diff] [blame] | 86 | # Source files which exist outside the tools directory |
| 87 | EXT_OBJ_FILES-y += common/env_embedded.o |
Prafulla Wadaskar | 14821d7 | 2009-08-10 20:44:06 +0530 | [diff] [blame] | 88 | EXT_OBJ_FILES-y += common/image.o |
Peter Tyser | fb8b33c | 2009-03-13 18:54:47 -0500 | [diff] [blame] | 89 | EXT_OBJ_FILES-y += lib_generic/crc32.o |
| 90 | EXT_OBJ_FILES-y += lib_generic/md5.o |
| 91 | EXT_OBJ_FILES-y += lib_generic/sha1.o |
Peter Tyser | ee3584a | 2009-03-13 18:54:34 -0500 | [diff] [blame] | 92 | |
| 93 | # Source files located in the tools directory |
Peter Tyser | 335ffe7 | 2009-03-13 18:54:35 -0500 | [diff] [blame] | 94 | OBJ_FILES-$(CONFIG_LCD_LOGO) += bmp_logo.o |
| 95 | OBJ_FILES-$(CONFIG_VIDEO_LOGO) += bmp_logo.o |
Prafulla Wadaskar | 37b8018 | 2009-09-07 14:59:06 +0530 | [diff] [blame] | 96 | OBJ_FILES-y += default_image.o |
Prafulla Wadaskar | 14821d7 | 2009-08-10 20:44:06 +0530 | [diff] [blame] | 97 | OBJ_FILES-$(CONFIG_ENV_IS_EMBEDDED) += envcrc.o |
Prafulla Wadaskar | 37b8018 | 2009-09-07 14:59:06 +0530 | [diff] [blame] | 98 | OBJ_FILES-y += fit_image.o |
Prafulla Wadaskar | 14821d7 | 2009-08-10 20:44:06 +0530 | [diff] [blame] | 99 | OBJ_FILES-$(CONFIG_CMD_NET) += gen_eth_addr.o |
| 100 | OBJ_FILES-$(CONFIG_CMD_LOADS) += img2srec.o |
Peter Tyser | cd26a31 | 2009-03-13 18:54:38 -0500 | [diff] [blame] | 101 | OBJ_FILES-$(CONFIG_INCA_IP) += inca-swap-bytes.o |
Prafulla Wadaskar | aa0c7a8 | 2009-09-07 15:05:02 +0530 | [diff] [blame] | 102 | OBJ_FILES-y += kwbimage.o |
Prafulla Wadaskar | 14821d7 | 2009-08-10 20:44:06 +0530 | [diff] [blame] | 103 | OBJ_FILES-y += mkimage.o |
Peter Tyser | 1cd300d | 2009-03-13 18:54:41 -0500 | [diff] [blame] | 104 | OBJ_FILES-$(CONFIG_NETCONSOLE) += ncb.o |
Peter Tyser | 2f8d396 | 2009-03-13 18:54:51 -0500 | [diff] [blame] | 105 | OBJ_FILES-y += os_support.o |
Prafulla Wadaskar | 14821d7 | 2009-08-10 20:44:06 +0530 | [diff] [blame] | 106 | OBJ_FILES-$(CONFIG_SHA1_CHECK_UB_IMG) += ubsha1.o |
Peter Tyser | ee3584a | 2009-03-13 18:54:34 -0500 | [diff] [blame] | 107 | |
| 108 | # Don't build by default |
| 109 | #ifeq ($(ARCH),ppc) |
| 110 | #BIN_FILES-y += mpc86x_clk$(SFX) |
| 111 | #OBJ_FILES-y += mpc86x_clk.o |
| 112 | #endif |
| 113 | |
| 114 | # Flattened device tree objects |
| 115 | LIBFDT_OBJ_FILES-y += fdt.o |
| 116 | LIBFDT_OBJ_FILES-y += fdt_ro.o |
| 117 | LIBFDT_OBJ_FILES-y += fdt_rw.o |
| 118 | LIBFDT_OBJ_FILES-y += fdt_strerror.o |
| 119 | LIBFDT_OBJ_FILES-y += fdt_wip.o |
| 120 | |
Peter Tyser | 335ffe7 | 2009-03-13 18:54:35 -0500 | [diff] [blame] | 121 | # Generated LCD/video logo |
Peter Tyser | ee3584a | 2009-03-13 18:54:34 -0500 | [diff] [blame] | 122 | LOGO_H = $(OBJTREE)/include/bmp_logo.h |
Peter Tyser | 335ffe7 | 2009-03-13 18:54:35 -0500 | [diff] [blame] | 123 | LOGO-$(CONFIG_LCD_LOGO) += $(LOGO_H) |
| 124 | LOGO-$(CONFIG_VIDEO_LOGO) += $(LOGO_H) |
Peter Tyser | ee3584a | 2009-03-13 18:54:34 -0500 | [diff] [blame] | 125 | |
| 126 | ifeq ($(LOGO_BMP),) |
| 127 | LOGO_BMP= logos/denx.bmp |
| 128 | endif |
| 129 | ifeq ($(VENDOR),atmel) |
| 130 | LOGO_BMP= logos/atmel.bmp |
| 131 | endif |
Ilko Iliev | f0a2c7b | 2009-04-16 21:30:48 +0200 | [diff] [blame] | 132 | ifeq ($(VENDOR),ronetix) |
| 133 | LOGO_BMP= logos/ronetix.bmp |
| 134 | endif |
Peter Tyser | ee3584a | 2009-03-13 18:54:34 -0500 | [diff] [blame] | 135 | |
Marian Balakowicz | f932863 | 2006-09-01 19:49:50 +0200 | [diff] [blame] | 136 | # now $(obj) is defined |
Peter Tyser | fb8b33c | 2009-03-13 18:54:47 -0500 | [diff] [blame] | 137 | SRCS += $(addprefix $(SRCTREE)/,$(EXT_OBJ_FILES-y:.o=.c)) |
Peter Tyser | b0d4d72 | 2009-03-13 18:54:49 -0500 | [diff] [blame] | 138 | SRCS += $(addprefix $(SRCTREE)/tools/,$(OBJ_FILES-y:.o=.c)) |
Peter Tyser | eed0733 | 2009-03-13 18:54:46 -0500 | [diff] [blame] | 139 | SRCS += $(addprefix $(SRCTREE)/libfdt/,$(LIBFDT_OBJ_FILES-y:.o=.c)) |
Wolfgang Denk | afcbce0 | 2009-04-04 16:10:40 +0200 | [diff] [blame] | 140 | BINS := $(addprefix $(obj),$(sort $(BIN_FILES-y))) |
Peter Tyser | ee3584a | 2009-03-13 18:54:34 -0500 | [diff] [blame] | 141 | LIBFDT_OBJS := $(addprefix $(obj),$(LIBFDT_OBJ_FILES-y)) |
Marian Balakowicz | f932863 | 2006-09-01 19:49:50 +0200 | [diff] [blame] | 142 | |
wdenk | efee170 | 2002-07-20 20:14:13 +0000 | [diff] [blame] | 143 | # |
| 144 | # Use native tools and options |
Peter Tyser | 2f8d396 | 2009-03-13 18:54:51 -0500 | [diff] [blame] | 145 | # Define __KERNEL_STRICT_NAMES to prevent typedef overlaps |
wdenk | efee170 | 2002-07-20 20:14:13 +0000 | [diff] [blame] | 146 | # |
Marian Balakowicz | f932863 | 2006-09-01 19:49:50 +0200 | [diff] [blame] | 147 | CPPFLAGS = -idirafter $(SRCTREE)/include \ |
| 148 | -idirafter $(OBJTREE)/include2 \ |
| 149 | -idirafter $(OBJTREE)/include \ |
Peter Tyser | 45d6bdf | 2009-03-13 18:54:44 -0500 | [diff] [blame] | 150 | -I $(SRCTREE)/libfdt \ |
Peter Tyser | 40b8d90 | 2009-03-13 18:54:42 -0500 | [diff] [blame] | 151 | -I $(SRCTREE)/tools \ |
Peter Tyser | 2f8d396 | 2009-03-13 18:54:51 -0500 | [diff] [blame] | 152 | -DTEXT_BASE=$(TEXT_BASE) -DUSE_HOSTCC \ |
| 153 | -D__KERNEL_STRICT_NAMES |
Mike Frysinger | 9aef738 | 2009-07-19 15:17:03 -0400 | [diff] [blame] | 154 | CFLAGS = $(HOSTCFLAGS) $(CPPFLAGS) -O |
Bartlomiej Sieka | 8cf3080 | 2008-02-29 16:00:24 +0100 | [diff] [blame] | 155 | |
| 156 | # No -pedantic switch to avoid libfdt compilation warnings |
| 157 | FIT_CFLAGS = -Wall $(CPPFLAGS) -O |
| 158 | |
wdenk | efee170 | 2002-07-20 20:14:13 +0000 | [diff] [blame] | 159 | AFLAGS = -D__ASSEMBLY__ $(CPPFLAGS) |
| 160 | CC = $(HOSTCC) |
| 161 | STRIP = $(HOSTSTRIP) |
| 162 | MAKEDEPEND = makedepend |
| 163 | |
Peter Tyser | 335ffe7 | 2009-03-13 18:54:35 -0500 | [diff] [blame] | 164 | all: $(obj).depend $(BINS) $(LOGO-y) subdirs |
wdenk | efee170 | 2002-07-20 20:14:13 +0000 | [diff] [blame] | 165 | |
Prafulla Wadaskar | 14821d7 | 2009-08-10 20:44:06 +0530 | [diff] [blame] | 166 | $(obj)bin2header$(SFX): $(obj)bin2header.o |
Peter Tyser | 21d28e9 | 2009-03-13 18:54:33 -0500 | [diff] [blame] | 167 | $(CC) $(CFLAGS) $(HOST_LDFLAGS) -o $@ $^ |
| 168 | $(STRIP) $@ |
wdenk | efee170 | 2002-07-20 20:14:13 +0000 | [diff] [blame] | 169 | |
Marian Balakowicz | f932863 | 2006-09-01 19:49:50 +0200 | [diff] [blame] | 170 | $(obj)bmp_logo$(SFX): $(obj)bmp_logo.o |
Peter Tyser | 21d28e9 | 2009-03-13 18:54:33 -0500 | [diff] [blame] | 171 | $(CC) $(CFLAGS) $(HOST_LDFLAGS) -o $@ $^ |
| 172 | $(STRIP) $@ |
wdenk | efee170 | 2002-07-20 20:14:13 +0000 | [diff] [blame] | 173 | |
Prafulla Wadaskar | 14821d7 | 2009-08-10 20:44:06 +0530 | [diff] [blame] | 174 | $(obj)envcrc$(SFX): $(obj)crc32.o $(obj)env_embedded.o $(obj)envcrc.o $(obj)sha1.o |
| 175 | $(CC) $(CFLAGS) -o $@ $^ |
| 176 | |
| 177 | $(obj)gen_eth_addr$(SFX): $(obj)gen_eth_addr.o |
| 178 | $(CC) $(CFLAGS) $(HOST_LDFLAGS) -o $@ $^ |
| 179 | $(STRIP) $@ |
| 180 | |
| 181 | $(obj)img2srec$(SFX): $(obj)img2srec.o |
| 182 | $(CC) $(CFLAGS) $(HOST_LDFLAGS) -o $@ $^ |
| 183 | $(STRIP) $@ |
| 184 | |
Marian Balakowicz | f932863 | 2006-09-01 19:49:50 +0200 | [diff] [blame] | 185 | $(obj)inca-swap-bytes$(SFX): $(obj)inca-swap-bytes.o |
Peter Tyser | 21d28e9 | 2009-03-13 18:54:33 -0500 | [diff] [blame] | 186 | $(CC) $(CFLAGS) $(HOST_LDFLAGS) -o $@ $^ |
| 187 | $(STRIP) $@ |
wdenk | 3e38691 | 2003-04-05 00:53:31 +0000 | [diff] [blame] | 188 | |
Prafulla Wadaskar | 89a4d6b | 2009-08-19 17:36:46 +0530 | [diff] [blame] | 189 | $(obj)mkimage$(SFX): $(obj)crc32.o \ |
| 190 | $(obj)default_image.o \ |
| 191 | $(obj)fit_image.o \ |
| 192 | $(obj)image.o \ |
Prafulla Wadaskar | aa0c7a8 | 2009-09-07 15:05:02 +0530 | [diff] [blame] | 193 | $(obj)kwbimage.o \ |
Prafulla Wadaskar | 89a4d6b | 2009-08-19 17:36:46 +0530 | [diff] [blame] | 194 | $(obj)md5.o \ |
| 195 | $(obj)mkimage.o \ |
| 196 | $(obj)os_support.o \ |
| 197 | $(obj)sha1.o \ |
| 198 | $(LIBFDT_OBJS) |
Prafulla Wadaskar | 14821d7 | 2009-08-10 20:44:06 +0530 | [diff] [blame] | 199 | $(CC) $(CFLAGS) $(HOST_LDFLAGS) -o $@ $^ |
| 200 | $(STRIP) $@ |
| 201 | |
Marian Balakowicz | f932863 | 2006-09-01 19:49:50 +0200 | [diff] [blame] | 202 | $(obj)mpc86x_clk$(SFX): $(obj)mpc86x_clk.o |
Peter Tyser | 21d28e9 | 2009-03-13 18:54:33 -0500 | [diff] [blame] | 203 | $(CC) $(CFLAGS) $(HOST_LDFLAGS) -o $@ $^ |
| 204 | $(STRIP) $@ |
wdenk | ef1464c | 2003-10-08 22:14:02 +0000 | [diff] [blame] | 205 | |
Prafulla Wadaskar | 14821d7 | 2009-08-10 20:44:06 +0530 | [diff] [blame] | 206 | $(obj)ncb$(SFX): $(obj)ncb.o |
Peter Tyser | 21d28e9 | 2009-03-13 18:54:33 -0500 | [diff] [blame] | 207 | $(CC) $(CFLAGS) $(HOST_LDFLAGS) -o $@ $^ |
| 208 | $(STRIP) $@ |
Harald Welte | 0a823aa | 2008-07-09 22:30:30 +0800 | [diff] [blame] | 209 | |
Prafulla Wadaskar | 14821d7 | 2009-08-10 20:44:06 +0530 | [diff] [blame] | 210 | $(obj)ubsha1$(SFX): $(obj)os_support.o $(obj)sha1.o $(obj)ubsha1.o |
| 211 | $(CC) $(CFLAGS) -o $@ $^ |
| 212 | |
Peter Tyser | 2f8d396 | 2009-03-13 18:54:51 -0500 | [diff] [blame] | 213 | # Some files complain if compiled with -pedantic, use FIT_CFLAGS |
Prafulla Wadaskar | 89a4d6b | 2009-08-19 17:36:46 +0530 | [diff] [blame] | 214 | $(obj)default_image.o: $(SRCTREE)/tools/default_image.c |
| 215 | $(CC) -g $(FIT_CFLAGS) -c -o $@ $< |
| 216 | |
| 217 | $(obj)fit_image.o: $(SRCTREE)/tools/fit_image.c |
| 218 | $(CC) -g $(FIT_CFLAGS) -c -o $@ $< |
| 219 | |
Jean-Christophe PLAGNIOL-VILLARD | ae644c1 | 2009-04-04 12:46:31 +0200 | [diff] [blame] | 220 | $(obj)image.o: $(SRCTREE)/common/image.c |
Peter Tyser | 21d28e9 | 2009-03-13 18:54:33 -0500 | [diff] [blame] | 221 | $(CC) -g $(FIT_CFLAGS) -c -o $@ $< |
Marian Balakowicz | b97a2a0 | 2008-01-08 18:14:09 +0100 | [diff] [blame] | 222 | |
Prafulla Wadaskar | aa0c7a8 | 2009-09-07 15:05:02 +0530 | [diff] [blame] | 223 | $(obj)kwbimage.o: $(SRCTREE)/tools/kwbimage.c |
| 224 | $(CC) -g $(FIT_CFLAGS) -c -o $@ $< |
| 225 | |
Peter Tyser | b0d4d72 | 2009-03-13 18:54:49 -0500 | [diff] [blame] | 226 | $(obj)mkimage.o: $(SRCTREE)/tools/mkimage.c |
Peter Tyser | 21d28e9 | 2009-03-13 18:54:33 -0500 | [diff] [blame] | 227 | $(CC) -g $(FIT_CFLAGS) -c -o $@ $< |
wdenk | efee170 | 2002-07-20 20:14:13 +0000 | [diff] [blame] | 228 | |
Peter Tyser | 2f8d396 | 2009-03-13 18:54:51 -0500 | [diff] [blame] | 229 | $(obj)os_support.o: $(SRCTREE)/tools/os_support.c |
| 230 | $(CC) -g $(FIT_CFLAGS) -c -o $@ $< |
| 231 | |
Peter Tyser | b0d4d72 | 2009-03-13 18:54:49 -0500 | [diff] [blame] | 232 | # Some of the tool objects need to be accessed from outside the tools directory |
| 233 | $(obj)%.o: $(SRCTREE)/common/%.c |
| 234 | $(CC) -g $(FIT_CFLAGS) -c -o $@ $< |
| 235 | |
| 236 | $(obj)%.o: $(SRCTREE)/lib_generic/%.c |
Peter Tyser | 21d28e9 | 2009-03-13 18:54:33 -0500 | [diff] [blame] | 237 | $(CC) -g $(CFLAGS) -c -o $@ $< |
wdenk | eedcd07 | 2004-09-08 22:03:11 +0000 | [diff] [blame] | 238 | |
Peter Tyser | b0d4d72 | 2009-03-13 18:54:49 -0500 | [diff] [blame] | 239 | $(LIBFDT_OBJS): |
Peter Tyser | 21d28e9 | 2009-03-13 18:54:33 -0500 | [diff] [blame] | 240 | $(CC) -g $(FIT_CFLAGS) -c -o $@ $< |
Bartlomiej Sieka | 8cf3080 | 2008-02-29 16:00:24 +0100 | [diff] [blame] | 241 | |
wdenk | efee170 | 2002-07-20 20:14:13 +0000 | [diff] [blame] | 242 | subdirs: |
wdenk | e0ac62d | 2003-08-17 18:55:18 +0000 | [diff] [blame] | 243 | ifeq ($(TOOLSUBDIRS),) |
Peter Tyser | 21d28e9 | 2009-03-13 18:54:33 -0500 | [diff] [blame] | 244 | @: |
wdenk | e0ac62d | 2003-08-17 18:55:18 +0000 | [diff] [blame] | 245 | else |
Peter Tyser | 21d28e9 | 2009-03-13 18:54:33 -0500 | [diff] [blame] | 246 | @for dir in $(TOOLSUBDIRS) ; do \ |
| 247 | $(MAKE) \ |
| 248 | HOSTOS=$(HOSTOS) \ |
| 249 | HOSTARCH=$(HOSTARCH) \ |
Mike Frysinger | 9aef738 | 2009-07-19 15:17:03 -0400 | [diff] [blame] | 250 | HOSTCFLAGS="$(HOSTCFLAGS)" \ |
Peter Tyser | 21d28e9 | 2009-03-13 18:54:33 -0500 | [diff] [blame] | 251 | HOST_LDFLAGS="$(HOST_LDFLAGS)" \ |
| 252 | -C $$dir || exit 1 ; \ |
| 253 | done |
wdenk | e0ac62d | 2003-08-17 18:55:18 +0000 | [diff] [blame] | 254 | endif |
| 255 | |
Marian Balakowicz | f932863 | 2006-09-01 19:49:50 +0200 | [diff] [blame] | 256 | $(LOGO_H): $(obj)bmp_logo $(LOGO_BMP) |
Peter Tyser | 21d28e9 | 2009-03-13 18:54:33 -0500 | [diff] [blame] | 257 | $(obj)./bmp_logo $(LOGO_BMP) >$@ |
wdenk | efee170 | 2002-07-20 20:14:13 +0000 | [diff] [blame] | 258 | |
| 259 | ######################################################################### |
| 260 | |
Marian Balakowicz | f932863 | 2006-09-01 19:49:50 +0200 | [diff] [blame] | 261 | # defines $(obj).depend target |
| 262 | include $(SRCTREE)/rules.mk |
wdenk | efee170 | 2002-07-20 20:14:13 +0000 | [diff] [blame] | 263 | |
Marian Balakowicz | f932863 | 2006-09-01 19:49:50 +0200 | [diff] [blame] | 264 | sinclude $(obj).depend |
wdenk | efee170 | 2002-07-20 20:14:13 +0000 | [diff] [blame] | 265 | |
| 266 | ######################################################################### |