Makefile 122 KB
Newer Older
wdenk's avatar
wdenk committed
1
#
2
# (C) Copyright 2000-2010
wdenk's avatar
wdenk committed
3 4 5 6 7 8 9
# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
#
# See file CREDITS for list of people who contributed to this
# project.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
10
# published by the Free Software Foundatio; either version 2 of
wdenk's avatar
wdenk committed
11 12 13 14
# the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
15
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	See the
wdenk's avatar
wdenk committed
16 17 18 19 20 21 22 23
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
# MA 02111-1307 USA
#

Wolfgang Denk's avatar
Wolfgang Denk committed
24 25
VERSION = 2010
PATCHLEVEL = 03
26
SUBLEVEL =
Wolfgang Denk's avatar
Wolfgang Denk committed
27
EXTRAVERSION =
28
ifneq "$(SUBLEVEL)" ""
29
U_BOOT_VERSION = $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
30 31 32
else
U_BOOT_VERSION = $(VERSION).$(PATCHLEVEL)$(EXTRAVERSION)
endif
33
TIMESTAMP_FILE = $(obj)include/timestamp_autogenerated.h
34
VERSION_FILE = $(obj)include/version_autogenerated.h
35

wdenk's avatar
wdenk committed
36 37 38 39 40 41
HOSTARCH := $(shell uname -m | \
	sed -e s/i.86/i386/ \
	    -e s/sun4u/sparc64/ \
	    -e s/arm.*/arm/ \
	    -e s/sa110/arm/ \
	    -e s/powerpc/ppc/ \
Kumar Gala's avatar
Kumar Gala committed
42
	    -e s/ppc64/ppc/ \
wdenk's avatar
wdenk committed
43 44
	    -e s/macppc/ppc/)

45
HOSTOS := $(shell uname -s | tr '[:upper:]' '[:lower:]' | \
wdenk's avatar
wdenk committed
46 47
	    sed -e 's/\(cygwin\).*/cygwin/')

48 49 50 51 52 53
# Set shell to bash if possible, otherwise fall back to sh
SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
	else if [ -x /bin/bash ]; then echo /bin/bash; \
	else echo sh; fi; fi)

export	HOSTARCH HOSTOS SHELL
wdenk's avatar
wdenk committed
54 55 56 57

# Deal with colliding definitions from tcsh etc.
VENDOR=

58 59 60 61 62 63 64 65
#########################################################################
# Allow for silent builds
ifeq (,$(findstring s,$(MAKEFLAGS)))
XECHO = echo
else
XECHO = :
endif

wdenk's avatar
wdenk committed
66
#########################################################################
67 68 69
#
# U-boot build supports producing a object files to the separate external
# directory. Two use cases are supported:
70
#
71 72 73 74 75 76 77 78 79 80
# 1) Add O= to the make command line
# 'make O=/tmp/build all'
#
# 2) Set environement variable BUILD_DIR to point to the desired location
# 'export BUILD_DIR=/tmp/build'
# 'make'
#
# The second approach can also be used with a MAKEALL script
# 'export BUILD_DIR=/tmp/build'
# './MAKEALL'
81
#
82
# Command line 'O=' setting overrides BUILD_DIR environent variable.
83
#
84 85
# When none of the above methods is used the local build is performed and
# the object files are placed in the source directory.
86
#
87 88 89 90 91 92 93 94 95

ifdef O
ifeq ("$(origin O)", "command line")
BUILD_DIR := $(O)
endif
endif

ifneq ($(BUILD_DIR),)
saved-output := $(BUILD_DIR)
96 97 98 99

# Attempt to create a output directory.
$(shell [ -d ${BUILD_DIR} ] || mkdir -p ${BUILD_DIR})

100
# Verify if it was successful.
101 102 103 104 105 106 107 108 109 110 111 112
BUILD_DIR := $(shell cd $(BUILD_DIR) && /bin/pwd)
$(if $(BUILD_DIR),,$(error output directory "$(saved-output)" does not exist))
endif # ifneq ($(BUILD_DIR),)

OBJTREE		:= $(if $(BUILD_DIR),$(BUILD_DIR),$(CURDIR))
SRCTREE		:= $(CURDIR)
TOPDIR		:= $(SRCTREE)
LNDIR		:= $(OBJTREE)
export	TOPDIR SRCTREE OBJTREE

MKCONFIG	:= $(SRCTREE)/mkconfig
export MKCONFIG
wdenk's avatar
wdenk committed
113

114
ifneq ($(OBJTREE),$(SRCTREE))
Wolfgang Denk's avatar
Wolfgang Denk committed
115
REMOTE_BUILD	:= 1
116 117 118 119 120 121 122 123 124 125 126 127
export REMOTE_BUILD
endif

# $(obj) and (src) are defined in config.mk but here in main Makefile
# we also need them before config.mk is included which is the case for
# some targets like unconfig, clean, clobber, distclean, etc.
ifneq ($(OBJTREE),$(SRCTREE))
obj := $(OBJTREE)/
src := $(SRCTREE)/
else
obj :=
src :=
128
endif
129 130
export obj src

131 132 133
# Make sure CDPATH settings don't interfere
unexport CDPATH

wdenk's avatar
wdenk committed
134 135
#########################################################################

136 137 138 139
ifeq ($(ARCH),powerpc)
ARCH = ppc
endif

140 141 142
# The "tools" are needed early, so put this first
# Don't include stuff already done in $(LIBS)
SUBDIRS	= tools \
143
	  examples/standalone \
144
	  examples/api
145 146 147

.PHONY : $(SUBDIRS)

148
ifeq ($(obj)include/config.mk,$(wildcard $(obj)include/config.mk))
wdenk's avatar
wdenk committed
149

150 151 152 153 154 155 156
# Include autoconf.mk before config.mk so that the config options are available
# to all top level build files.  We need the dummy all: target to prevent the
# dependency target in autoconf.mk.dep from being the default.
all:
sinclude $(obj)include/autoconf.mk.dep
sinclude $(obj)include/autoconf.mk

wdenk's avatar
wdenk committed
157
# load ARCH, BOARD, and CPU configuration
158
include $(obj)include/config.mk
159
export	ARCH CPU BOARD VENDOR SOC
160

161
# set default to nothing for native builds
Wolfgang Denk's avatar
Wolfgang Denk committed
162
ifeq ($(HOSTARCH),$(ARCH))
163
CROSS_COMPILE ?=
164
endif
wdenk's avatar
wdenk committed
165

166 167 168
# load other configuration
include $(TOPDIR)/config.mk

wdenk's avatar
wdenk committed
169 170 171
#########################################################################
# U-Boot objects....order is important (i.e. start must be first)

Peter Tyser's avatar
Peter Tyser committed
172
OBJS  = $(CPUDIR)/start.o
173
ifeq ($(CPU),i386)
Peter Tyser's avatar
Peter Tyser committed
174 175
OBJS += $(CPUDIR)/start16.o
OBJS += $(CPUDIR)/resetvec.o
176
endif
wdenk's avatar
wdenk committed
177
ifeq ($(CPU),ppc4xx)
Peter Tyser's avatar
Peter Tyser committed
178
OBJS += $(CPUDIR)/resetvec.o
wdenk's avatar
wdenk committed
179
endif
180
ifeq ($(CPU),mpc85xx)
Peter Tyser's avatar
Peter Tyser committed
181
OBJS += $(CPUDIR)/resetvec.o
182
endif
wdenk's avatar
wdenk committed
183

184 185
OBJS := $(addprefix $(obj),$(OBJS))

186 187 188
LIBS  = lib/libgeneric.a
LIBS += lib/lzma/liblzma.a
LIBS += lib/lzo/liblzo.a
189 190
LIBS += $(shell if [ -f board/$(VENDOR)/common/Makefile ]; then echo \
	"board/$(VENDOR)/common/lib$(VENDOR).a"; fi)
Peter Tyser's avatar
Peter Tyser committed
191
LIBS += $(CPUDIR)/lib$(CPU).a
192
ifdef SOC
Peter Tyser's avatar
Peter Tyser committed
193
LIBS += $(CPUDIR)/$(SOC)/lib$(SOC).a
194
endif
195 196 197
ifeq ($(CPU),ixp)
LIBS += cpu/ixp/npe/libnpe.a
endif
198
LIBS += arch/$(ARCH)/lib/lib$(ARCH).a
199
LIBS += fs/cramfs/libcramfs.a fs/fat/libfat.a fs/fdos/libfdos.a fs/jffs2/libjffs2.a \
200 201
	fs/reiserfs/libreiserfs.a fs/ext2/libext2fs.a fs/yaffs2/libyaffs2.a \
	fs/ubifs/libubifs.a
wdenk's avatar
wdenk committed
202 203
LIBS += net/libnet.a
LIBS += disk/libdisk.a
204
LIBS += drivers/bios_emulator/libatibiosemu.a
205
LIBS += drivers/block/libblock.a
206
LIBS += drivers/dma/libdma.a
207
LIBS += drivers/fpga/libfpga.a
208
LIBS += drivers/gpio/libgpio.a
209
LIBS += drivers/hwmon/libhwmon.a
210
LIBS += drivers/i2c/libi2c.a
211
LIBS += drivers/input/libinput.a
212
LIBS += drivers/misc/libmisc.a
213
LIBS += drivers/mmc/libmmc.a
214 215 216
LIBS += drivers/mtd/libmtd.a
LIBS += drivers/mtd/nand/libnand.a
LIBS += drivers/mtd/onenand/libonenand.a
217
LIBS += drivers/mtd/ubi/libubi.a
Haavard Skinnemoen's avatar
Haavard Skinnemoen committed
218
LIBS += drivers/mtd/spi/libspi_flash.a
219
LIBS += drivers/net/libnet.a
220
LIBS += drivers/net/phy/libphy.a
221 222
LIBS += drivers/pci/libpci.a
LIBS += drivers/pcmcia/libpcmcia.a
Tom Rix's avatar
Tom Rix committed
223
LIBS += drivers/power/libpower.a
224
LIBS += drivers/spi/libspi.a
225 226 227
ifeq ($(CPU),mpc83xx)
LIBS += drivers/qe/qe.a
endif
228 229
ifeq ($(CPU),mpc85xx)
LIBS += drivers/qe/qe.a
230
LIBS += cpu/mpc8xxx/ddr/libddr.a
231
LIBS += cpu/mpc8xxx/lib8xxx.a
232 233 234
endif
ifeq ($(CPU),mpc86xx)
LIBS += cpu/mpc8xxx/ddr/libddr.a
235
LIBS += cpu/mpc8xxx/lib8xxx.a
236
endif
237
LIBS += drivers/rtc/librtc.a
238
LIBS += drivers/serial/libserial.a
239
LIBS += drivers/twserial/libtws.a
240 241 242
LIBS += drivers/usb/gadget/libusb_gadget.a
LIBS += drivers/usb/host/libusb_host.a
LIBS += drivers/usb/musb/libusb_musb.a
Tom Rix's avatar
Tom Rix committed
243
LIBS += drivers/usb/phy/libusb_phy.a
244
LIBS += drivers/video/libvideo.a
245
LIBS += drivers/watchdog/libwatchdog.a
wdenk's avatar
wdenk committed
246
LIBS += common/libcommon.a
247
LIBS += libfdt/libfdt.a
248
LIBS += api/libapi.a
249
LIBS += post/libpost.a
250 251

LIBS := $(addprefix $(obj),$(LIBS))
252
.PHONY : $(LIBS) $(TIMESTAMP_FILE) $(VERSION_FILE)
253

254 255 256
LIBBOARD = board/$(BOARDDIR)/lib$(BOARD).a
LIBBOARD := $(addprefix $(obj),$(LIBBOARD))

257
# Add GCC lib
258 259
ifdef USE_PRIVATE_LIBGCC
ifeq ("$(USE_PRIVATE_LIBGCC)", "yes")
260
PLATFORM_LIBGCC = -L $(OBJTREE)/arch/$(ARCH)/lib -lgcc
261 262 263 264 265 266 267 268
else
PLATFORM_LIBGCC = -L $(USE_PRIVATE_LIBGCC) -lgcc
endif
else
PLATFORM_LIBGCC = -L $(shell dirname `$(CC) $(CFLAGS) -print-libgcc-file-name`) -lgcc
endif
PLATFORM_LIBS += $(PLATFORM_LIBGCC)
export PLATFORM_LIBS
269

270 271 272 273 274 275 276 277
# Special flags for CPP when processing the linker script.
# Pass the version down so we can handle backwards compatibility
# on the fly.
LDPPFLAGS += \
	-include $(TOPDIR)/include/u-boot/u-boot.lds.h \
	$(shell $(LD) --version | \
	  sed -ne 's/GNU ld version \([0-9][0-9]*\)\.\([0-9][0-9]*\).*/-DLD_MAJOR=\1 -DLD_MINOR=\2/p')

278 279 280 281 282
ifeq ($(CONFIG_NAND_U_BOOT),y)
NAND_SPL = nand_spl
U_BOOT_NAND = $(obj)u-boot-nand.bin
endif

283 284 285
ifeq ($(CONFIG_ONENAND_U_BOOT),y)
ONENAND_IPL = onenand_ipl
U_BOOT_ONENAND = $(obj)u-boot-onenand.bin
286
ONENAND_BIN ?= $(obj)onenand_ipl/onenand-ipl-2k.bin
287 288
endif

289
__OBJS := $(subst $(obj),,$(OBJS))
290
__LIBS := $(subst $(obj),,$(LIBS)) $(subst $(obj),,$(LIBBOARD))
291

292
#########################################################################
wdenk's avatar
wdenk committed
293 294
#########################################################################

295
# Always append ALL so that arch config.mk's can add custom ones
296
ALL += $(obj)u-boot.srec $(obj)u-boot.bin $(obj)System.map $(U_BOOT_NAND) $(U_BOOT_ONENAND)
wdenk's avatar
wdenk committed
297

298
all:		$(ALL)
wdenk's avatar
wdenk committed
299

300
$(obj)u-boot.hex:	$(obj)u-boot
301 302
		$(OBJCOPY) ${OBJCFLAGS} -O ihex $< $@

303
$(obj)u-boot.srec:	$(obj)u-boot
304
		$(OBJCOPY) -O srec $< $@
wdenk's avatar
wdenk committed
305

306
$(obj)u-boot.bin:	$(obj)u-boot
wdenk's avatar
wdenk committed
307 308
		$(OBJCOPY) ${OBJCFLAGS} -O binary $< $@

309
$(obj)u-boot.ldr:	$(obj)u-boot
310
		$(CREATE_LDR_ENV)
311
		$(LDR) -T $(CONFIG_BFIN_CPU) -c $@ $< $(LDR_FLAGS)
312 313 314 315 316 317 318

$(obj)u-boot.ldr.hex:	$(obj)u-boot.ldr
		$(OBJCOPY) ${OBJCFLAGS} -O ihex $< $@ -I binary

$(obj)u-boot.ldr.srec:	$(obj)u-boot.ldr
		$(OBJCOPY) ${OBJCFLAGS} -O srec $< $@ -I binary

319
$(obj)u-boot.img:	$(obj)u-boot.bin
320 321
		./tools/mkimage -A $(ARCH) -T firmware -C none \
		-a $(TEXT_BASE) -e 0 \
322
		-n $(shell sed -n -e 's/.*U_BOOT_VERSION//p' $(VERSION_FILE) | \
323 324 325
			sed -e 's/"[	 ]*$$/ for $(BOARD) board"/') \
		-d $< $@

326 327 328 329
$(obj)u-boot.imx:       $(obj)u-boot.bin
		$(obj)tools/mkimage -n $(IMX_CONFIG) -T imximage \
		-e $(TEXT_BASE) -d $< $@

330 331 332 333
$(obj)u-boot.kwb:       $(obj)u-boot.bin
		$(obj)tools/mkimage -n $(KWD_CONFIG) -T kwbimage \
		-a $(TEXT_BASE) -e $(TEXT_BASE) -d $< $@

334
$(obj)u-boot.sha1:	$(obj)u-boot.bin
335
		$(obj)tools/ubsha1 $(obj)u-boot.bin
336

337
$(obj)u-boot.dis:	$(obj)u-boot
wdenk's avatar
wdenk committed
338 339
		$(OBJDUMP) -d $< > $@

340
GEN_UBOOT = \
341 342
		UNDEF_SYM=`$(OBJDUMP) -x $(LIBBOARD) $(LIBS) | \
		sed  -n -e 's/.*\($(SYM_PREFIX)__u_boot_cmd_.*\)/-u\1/p'|sort|uniq`;\
343 344
		cd $(LNDIR) && $(LD) $(LDFLAGS) $$UNDEF_SYM $(__OBJS) \
			--start-group $(__LIBS) --end-group $(PLATFORM_LIBS) \
345
			-Map u-boot.map -o u-boot
346
$(obj)u-boot:	depend $(SUBDIRS) $(OBJS) $(LIBBOARD) $(LIBS) $(LDSCRIPT) $(obj)u-boot.lds
347 348
		$(GEN_UBOOT)
ifeq ($(CONFIG_KALLSYMS),y)
349 350 351 352
		smap=`$(call SYSTEM_MAP,u-boot) | \
			awk '$$2 ~ /[tTwW]/ {printf $$1 $$3 "\\\\000"}'` ; \
		$(CC) $(CFLAGS) -DSYSTEM_MAP="\"$${smap}\"" \
			-c common/system_map.c -o $(obj)common/system_map.o
353 354
		$(GEN_UBOOT) $(obj)common/system_map.o
endif
wdenk's avatar
wdenk committed
355

356
$(OBJS):	depend
Peter Tyser's avatar
Peter Tyser committed
357
		$(MAKE) -C $(CPUDIR) $(if $(REMOTE_BUILD),$@,$(notdir $@))
358

359
$(LIBS):	depend $(SUBDIRS)
360
		$(MAKE) -C $(dir $(subst $(obj),,$@))
361

362
$(LIBBOARD):	depend $(LIBS)
363 364
		$(MAKE) -C $(dir $(subst $(obj),,$@))

365
$(SUBDIRS):	depend
366
		$(MAKE) -C $@ all
wdenk's avatar
wdenk committed
367

368
$(LDSCRIPT):	depend
369 370
		$(MAKE) -C $(dir $@) $(notdir $@)

371 372 373
$(obj)u-boot.lds: $(LDSCRIPT)
		$(CPP) $(CPPFLAGS) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ -P - <$^ >$@

374
$(NAND_SPL):	$(TIMESTAMP_FILE) $(VERSION_FILE) $(obj)include/autoconf.mk
375
		$(MAKE) -C nand_spl/board/$(BOARDDIR) all
376

377
$(U_BOOT_NAND):	$(NAND_SPL) $(obj)u-boot.bin
378
		cat $(obj)nand_spl/u-boot-spl-16k.bin $(obj)u-boot.bin > $(obj)u-boot-nand.bin
379

380
$(ONENAND_IPL):	$(TIMESTAMP_FILE) $(VERSION_FILE) $(obj)include/autoconf.mk
Stefan Roese's avatar
Stefan Roese committed
381
		$(MAKE) -C onenand_ipl/board/$(BOARDDIR) all
382

383
$(U_BOOT_ONENAND):	$(ONENAND_IPL) $(obj)u-boot.bin
384
		cat $(ONENAND_BIN) $(obj)u-boot.bin > $(obj)u-boot-onenand.bin
385

386
$(VERSION_FILE):
387
		@( printf '#define U_BOOT_VERSION "U-Boot %s%s"\n' "$(U_BOOT_VERSION)" \
388
		 '$(shell $(TOPDIR)/tools/setlocalversion $(TOPDIR))' ) > $@.tmp
389
		@cmp -s $@ $@.tmp && rm -f $@.tmp || mv -f $@.tmp $@
390

391 392 393 394
$(TIMESTAMP_FILE):
		@date +'#define U_BOOT_DATE "%b %d %C%y"' > $@
		@date +'#define U_BOOT_TIME "%T"' >> $@

395
gdbtools:
396 397 398 399 400 401
		$(MAKE) -C tools/gdb all || exit 1

updater:
		$(MAKE) -C tools/updater all || exit 1

env:
402
		$(MAKE) -C tools/env all MTD_VERSION=${MTD_VERSION} || exit 1
403

404 405
# Explicitly make _depend in subdirs containing multiple targets to prevent
# parallel sub-makes creating .depend files simultaneously.
406
depend dep:	$(TIMESTAMP_FILE) $(VERSION_FILE) $(obj)include/autoconf.mk
Peter Tyser's avatar
Peter Tyser committed
407
		for dir in $(SUBDIRS) $(CPUDIR) $(dir $(LDSCRIPT)) ; do \
408
			$(MAKE) -C $$dir _depend ; done
wdenk's avatar
wdenk committed
409

410 411
TAG_SUBDIRS = $(SUBDIRS)
TAG_SUBDIRS += $(dir $(__LIBS))
412 413
TAG_SUBDIRS += include

414
tags ctags:
415 416
		ctags -w -o $(obj)ctags `find $(TAG_SUBDIRS) \
						-name '*.[chS]' -print`
wdenk's avatar
wdenk committed
417 418

etags:
419 420
		etags -a -o $(obj)etags `find $(TAG_SUBDIRS) \
						-name '*.[chS]' -print`
Li Yang's avatar
Li Yang committed
421
cscope:
422
		find $(TAG_SUBDIRS) -name '*.[chS]' -print > cscope.files
Li Yang's avatar
Li Yang committed
423
		cscope -b -q -k
wdenk's avatar
wdenk committed
424

425 426
SYSTEM_MAP = \
		$(NM) $1 | \
wdenk's avatar
wdenk committed
427
		grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | \
428 429 430
		LC_ALL=C sort
$(obj)System.map:	$(obj)u-boot
		@$(call SYSTEM_MAP,$<) > $(obj)System.map
wdenk's avatar
wdenk committed
431

432 433 434 435 436 437
#
# Auto-generate the autoconf.mk file (which is included by all makefiles)
#
# This target actually generates 2 files; autoconf.mk and autoconf.mk.dep.
# the dep file is only include in this top level makefile to determine when
# to regenerate the autoconf.mk file.
438 439
$(obj)include/autoconf.mk.dep: $(obj)include/config.h include/common.h
	@$(XECHO) Generating $@ ; \
440
	set -e ; \
441
	: Generate the dependancies ; \
442
	$(CC) -x c -DDO_DEPS_ONLY -M $(HOSTCFLAGS) $(CPPFLAGS) \
443 444 445 446 447
		-MQ $(obj)include/autoconf.mk include/common.h > $@

$(obj)include/autoconf.mk: $(obj)include/config.h
	@$(XECHO) Generating $@ ; \
	set -e ; \
448
	: Extract the config macros ; \
449
	$(CPP) $(CFLAGS) -DDO_DEPS_ONLY -dM include/common.h | \
450 451
		sed -n -f tools/scripts/define2mk.sed > $@.tmp && \
	mv $@.tmp $@
452

wdenk's avatar
wdenk committed
453
#########################################################################
454
else	# !config.mk
455 456
all $(obj)u-boot.hex $(obj)u-boot.srec $(obj)u-boot.bin \
$(obj)u-boot.img $(obj)u-boot.dis $(obj)u-boot \
457 458
$(filter-out tools,$(SUBDIRS)) $(TIMESTAMP_FILE) $(VERSION_FILE) gdbtools \
updater env depend dep tags ctags etags cscope $(obj)System.map:
wdenk's avatar
wdenk committed
459 460
	@echo "System not configured - see README" >&2
	@ exit 1
461 462 463 464 465

tools:
	$(MAKE) -C tools
tools-all:
	$(MAKE) -C tools HOST_TOOLS_ALL=y
466
endif	# config.mk
wdenk's avatar
wdenk committed
467

468 469
.PHONY : CHANGELOG
CHANGELOG:
470 471
	git log --no-merges U-Boot-1_1_5.. | \
	unexpand -a | sed -e 's/\s\s*$$//' > $@
472

473 474
include/license.h: tools/bin2header COPYING
	 cat COPYING | gzip -9 -c | ./tools/bin2header license_gzip > include/license.h
wdenk's avatar
wdenk committed
475 476 477
#########################################################################

unconfig:
478
	@rm -f $(obj)include/config.h $(obj)include/config.mk \
479 480
		$(obj)board/*/config.tmp $(obj)board/*/*/config.tmp \
		$(obj)include/autoconf.mk $(obj)include/autoconf.mk.dep
wdenk's avatar
wdenk committed
481

482 483 484
%: %_config
	$(MAKE)

wdenk's avatar
wdenk committed
485 486 487
#========================================================================
# PowerPC
#========================================================================
488 489 490 491 492

#########################################################################
## MPC5xx Systems
#########################################################################

wdenk's avatar
wdenk committed
493
canmb_config:	unconfig
494
	@$(MKCONFIG) -a canmb ppc mpc5xxx canmb
wdenk's avatar
wdenk committed
495

496
cmi_mpc5xx_config:	unconfig
497
	@$(MKCONFIG) $(@:_config=) ppc mpc5xx cmi
498

499
PATI_config:		unconfig
500
	@$(MKCONFIG) $(@:_config=) ppc mpc5xx pati mpl
501

502 503 504
#########################################################################
## MPC5xxx Systems
#########################################################################
wdenk's avatar
wdenk committed
505

506
aev_config: unconfig
507
	@$(MKCONFIG) -a aev ppc mpc5xxx tqm5200 tqc
508

509
BC3450_config:	unconfig
510
	@$(MKCONFIG) -a BC3450 ppc mpc5xxx bc3450
511

512 513 514
cm5200_config:	unconfig
	@$(MKCONFIG) -a cm5200 ppc mpc5xxx cm5200

515
cpci5200_config:  unconfig
516
	@$(MKCONFIG) -a cpci5200  ppc mpc5xxx cpci5200 esd
517

518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533
digsy_mtc_config \
digsy_mtc_LOWBOOT_config	\
digsy_mtc_RAMBOOT_config:	unconfig
	@mkdir -p $(obj)include
	@mkdir -p $(obj)board/digsy_mtc
	@ >$(obj)include/config.h
	@[ -z "$(findstring LOWBOOT_,$@)" ] || \
		{ echo "TEXT_BASE = 0xFF000000" >$(obj)board/digsy_mtc/config.tmp ; \
		  echo "... with LOWBOOT configuration" ; \
		}
	@[ -z "$(findstring RAMBOOT_,$@)" ] || \
		{ echo "TEXT_BASE = 0x00100000" >$(obj)board/digsy_mtc/config.tmp ; \
		  echo "... with RAMBOOT configuration" ; \
		}
	@$(MKCONFIG) -a digsy_mtc  ppc mpc5xxx digsy_mtc

534 535 536 537 538 539
galaxy5200_LOWBOOT_config \
galaxy5200_config:	unconfig
	@mkdir -p $(obj)include
	@echo "#define CONFIG_$(@:_config=) 1" >$(obj)include/config.h
	@$(MKCONFIG) -a galaxy5200 ppc mpc5xxx galaxy5200

540
hmi1001_config:	unconfig
541
	@$(MKCONFIG) hmi1001 ppc mpc5xxx hmi1001
wdenk's avatar
wdenk committed
542

543 544 545 546 547 548
Lite5200_config				\
Lite5200_LOWBOOT_config			\
Lite5200_LOWBOOT08_config		\
icecube_5200_config			\
icecube_5200_LOWBOOT_config		\
icecube_5200_LOWBOOT08_config		\
Wolfgang Denk's avatar
Wolfgang Denk committed
549 550
icecube_5200_DDR_config			\
icecube_5200_DDR_LOWBOOT_config		\
551
icecube_5200_DDR_LOWBOOT08_config:	unconfig
552 553
	@mkdir -p $(obj)include
	@mkdir -p $(obj)board/icecube
wdenk's avatar
wdenk committed
554 555
	@[ -z "$(findstring LOWBOOT_,$@)" ] || \
		{ if [ "$(findstring DDR,$@)" ] ; \
556 557
			then echo "TEXT_BASE = 0xFF800000" >$(obj)board/icecube/config.tmp ; \
			else echo "TEXT_BASE = 0xFF000000" >$(obj)board/icecube/config.tmp ; \
wdenk's avatar
wdenk committed
558
		  fi ; \
559
		  $(XECHO) "... with LOWBOOT configuration" ; \
560 561
		}
	@[ -z "$(findstring LOWBOOT08,$@)" ] || \
562
		{ echo "TEXT_BASE = 0xFF800000" >$(obj)board/icecube/config.tmp ; \
563
		  echo "... with 8 MB flash only" ; \
564
		  $(XECHO) "... with LOWBOOT configuration" ; \
565
		}
566
	@[ -z "$(findstring DDR,$@)" ] || \
567
		{ echo "#define CONFIG_MPC5200_DDR"	>>$(obj)include/config.h ; \
568
		  $(XECHO) "... DDR memory revision" ; \
569
		}
570
	@$(MKCONFIG) -a IceCube ppc mpc5xxx icecube
571

572
jupiter_config:	unconfig
573 574
	@$(MKCONFIG) jupiter ppc mpc5xxx jupiter

575
inka4x0_config:	unconfig
576
	@$(MKCONFIG) inka4x0 ppc mpc5xxx inka4x0
wdenk's avatar
wdenk committed
577

578 579 580
ipek01_config: unconfig
	@$(MKCONFIG) -a ipek01 ppc mpc5xxx ipek01

581
lite5200b_config	\
582
lite5200b_PM_config	\
583
lite5200b_LOWBOOT_config:	unconfig
584 585 586
	@mkdir -p $(obj)include
	@mkdir -p $(obj)board/icecube
	@ echo "#define CONFIG_MPC5200_DDR"	>>$(obj)include/config.h
587
	@ $(XECHO) "... DDR memory revision"
588
	@ echo "#define CONFIG_LITE5200B"	>>$(obj)include/config.h
589 590
	@[ -z "$(findstring _PM_,$@)" ] || \
		{ echo "#define CONFIG_LITE5200B_PM"	>>$(obj)include/config.h ; \
591
		  $(XECHO) "... with power management (low-power mode) support" ; \
592
		}
593
	@[ -z "$(findstring LOWBOOT_,$@)" ] || \
594
		{ echo "TEXT_BASE = 0xFF000000" >$(obj)board/icecube/config.tmp ; \
595
		  $(XECHO) "... with LOWBOOT configuration" ; \
596
		}
597
	@$(MKCONFIG) -a IceCube  ppc mpc5xxx icecube
598

599
mcc200_config	\
600 601 602 603
mcc200_SDRAM_config	\
mcc200_highboot_config	\
mcc200_COM12_config	\
mcc200_COM12_SDRAM_config	\
604 605
mcc200_COM12_highboot_config	\
mcc200_COM12_highboot_SDRAM_config	\
606 607 608 609 610
mcc200_highboot_SDRAM_config	\
prs200_config	\
prs200_DDR_config	\
prs200_highboot_config	\
prs200_highboot_DDR_config:	unconfig
611 612
	@mkdir -p $(obj)include
	@mkdir -p $(obj)board/mcc200
613
	@[ -n "$(findstring highboot,$@)" ] || \
614
		{ $(XECHO) "... with lowboot configuration" ; \
615
		}
616
	@[ -z "$(findstring highboot,$@)" ] || \
617
		{ echo "TEXT_BASE = 0xFFF00000" >$(obj)board/mcc200/config.tmp ; \
618
		  $(XECHO) "... with highboot configuration" ; \
619 620
		}
	@[ -n "$(findstring _SDRAM,$@)" ] || \
621 622
		{ if [ -n "$(findstring mcc200,$@)" ]; \
		  then \
623
			$(XECHO) "... with DDR" ; \
624 625 626
		  else \
			if [ -n "$(findstring _DDR,$@)" ];\
			then \
627
				$(XECHO) "... with DDR" ; \
628
			else \
629
				echo "#define CONFIG_MCC200_SDRAM" >>$(obj)include/config.h ;\
630
				$(XECHO) "... with SDRAM" ; \
631 632
			fi; \
		  fi; \
633 634
		}
	@[ -z "$(findstring _SDRAM,$@)" ] || \
635
		{ echo "#define CONFIG_MCC200_SDRAM"	>>$(obj)include/config.h ; \
636
		  $(XECHO) "... with SDRAM" ; \
637
		}
638
	@[ -z "$(findstring COM12,$@)" ] || \
639
		{ echo "#define CONFIG_CONSOLE_COM12"	>>$(obj)include/config.h ; \
640
		  $(XECHO) "... with console on COM12" ; \
641
		}
642
	@[ -z "$(findstring prs200,$@)" ] || \
643
		{ echo "#define CONFIG_PRS200"	>>$(obj)include/config.h ;\
644
		}
645
	@$(MKCONFIG) -n $@ -a mcc200 ppc mpc5xxx mcc200
646

647
mecp5200_config:  unconfig
648
	@$(MKCONFIG) mecp5200  ppc mpc5xxx mecp5200 esd
649

650 651 652
motionpro_config:	unconfig
	@$(MKCONFIG) motionpro ppc mpc5xxx motionpro

653 654 655
mucmc52_config:		unconfig
	@$(MKCONFIG) mucmc52 ppc mpc5xxx mucmc52

656
munices_config:	unconfig
657
	@$(MKCONFIG) munices ppc mpc5xxx munices
658

659 660 661 662 663 664 665 666
MVBC_P_config: unconfig
	@mkdir -p $(obj)include
	@mkdir -p $(obj)board/mvbc_p
	@ >$(obj)include/config.h
	@[ -z "$(findstring MVBC_P,$@)" ] || \
	{   	echo "#define CONFIG_MVBC_P" 	>>$(obj)include/config.h; }
	@$(MKCONFIG) -n $@ -a MVBC_P ppc mpc5xxx mvbc_p matrix_vision

667 668 669 670 671
MVSMR_config: unconfig
	@mkdir -p $(obj)include
	@mkdir -p $(obj)board/matrix_vision/mvsmr
	@$(MKCONFIG) $(@:_config=) ppc mpc5xxx mvsmr matrix_vision

672
o2dnt_config:	unconfig
673
	@$(MKCONFIG) o2dnt ppc mpc5xxx o2dnt
674

675 676
pcm030_config \
pcm030_LOWBOOT_config:	unconfig
677
	@mkdir -p $(obj)include $(obj)board/phytec/pcm030
678
	@ >$(obj)include/config.h
679 680 681 682 683 684
	@[ -z "$(findstring LOWBOOT_,$@)" ] || \
		{ echo "TEXT_BASE = 0xFF000000"	>$(obj)board/phytec/pcm030/config.tmp ; \
		  echo "... with LOWBOOT configuration" ; \
		}
	@$(MKCONFIG) -a pcm030 ppc mpc5xxx pcm030 phytec

685
pf5200_config:	unconfig
686
	@$(MKCONFIG) pf5200  ppc mpc5xxx pf5200 esd
687

688 689 690 691
PM520_config \
PM520_DDR_config \
PM520_ROMBOOT_config \
PM520_ROMBOOT_DDR_config:	unconfig
692
	@mkdir -p $(obj)include
693
	@[ -z "$(findstring DDR,$@)" ] || \
694
		{ echo "#define CONFIG_MPC5200_DDR"	>>$(obj)include/config.h ; \
695
		  $(XECHO) "... DDR memory revision" ; \
696 697
		}
	@[ -z "$(findstring ROMBOOT,$@)" ] || \
698
		{ echo "#define CONFIG_BOOT_ROM" >>$(obj)include/config.h ; \
699
		  $(XECHO) "... booting from 8-bit flash" ; \
700
		}
701
	@$(MKCONFIG) -a PM520 ppc mpc5xxx pm520
702

703
smmaco4_config: unconfig
704
	@$(MKCONFIG) -a smmaco4 ppc mpc5xxx tqm5200 tqc
705 706

spieval_config:	unconfig
707
	@$(MKCONFIG) -a spieval ppc mpc5xxx tqm5200 tqc
708

709
TB5200_B_config \
710
TB5200_config:	unconfig
711
	@mkdir -p $(obj)include
712
	@[ -z "$(findstring _B,$@)" ] || \
713
		{ echo "#define CONFIG_TQM5200_B"	>>$(obj)include/config.h ; \
714
		  $(XECHO) "... with MPC5200B processor" ; \
715
		}
716
	@$(MKCONFIG) -n $@ -a TB5200 ppc mpc5xxx tqm5200 tqc
717

718 719 720
MINI5200_config	\
EVAL5200_config	\
TOP5200_config:	unconfig
721 722 723
	@mkdir -p $(obj)include
	@ echo "#define CONFIG_$(@:_config=) 1"	>$(obj)include/config.h
	@$(MKCONFIG) -n $@ -a TOP5200 ppc mpc5xxx top5200 emk
724

725 726 727 728
Total5200_config		\
Total5200_lowboot_config	\
Total5200_Rev2_config		\
Total5200_Rev2_lowboot_config:	unconfig
729 730
	@mkdir -p $(obj)include
	@mkdir -p $(obj)board/total5200
731
	@[ -n "$(findstring Rev,$@)" ] || \
732
		{ echo "#define CONFIG_TOTAL5200_REV 1"	>>$(obj)include/config.h ; \
733
		  $(XECHO) "... revision 1 board" ; \
734 735
		}
	@[ -z "$(findstring Rev2_,$@)" ] || \
736
		{ echo "#define CONFIG_TOTAL5200_REV 2"	>>$(obj)include/config.h ; \
737
		  $(XECHO) "... revision 2 board" ; \
738 739
		}
	@[ -z "$(findstring lowboot_,$@)" ] || \
740
		{ echo "TEXT_BASE = 0xFE000000" >$(obj)board/total5200/config.tmp ; \
741
		  $(XECHO) "... with lowboot configuration" ; \
742
		}
743
	@$(MKCONFIG) -a Total5200 ppc mpc5xxx total5200
744

745
cam5200_config \
746
cam5200_niosflash_config \
Wolfgang Denk's avatar
Wolfgang Denk committed
747
fo300_config \
748
MiniFAP_config \
749 750
TQM5200S_config \
TQM5200S_HIGHBOOT_config \
Wolfgang Denk's avatar
Wolfgang Denk committed
751 752 753 754
TQM5200_B_config \
TQM5200_B_HIGHBOOT_config \
TQM5200_config	\
TQM5200_STK100_config:	unconfig
755
	@mkdir -p $(obj)include
756
	@mkdir -p $(obj)board/tqc/tqm5200
757
	@[ -z "$(findstring cam5200,$@)" ] || \
758 759 760
		{ echo "#define CONFIG_CAM5200"	>>$(obj)include/config.h ; \
		  echo "#define CONFIG_TQM5200S"	>>$(obj)include/config.h ; \
		  echo "#define CONFIG_TQM5200_B"	>>$(obj)include/config.h ; \
761
		  $(XECHO) "... TQM5200S on Cam5200" ; \
762
		}
763 764
	@[ -z "$(findstring niosflash,$@)" ] || \
		{ echo "#define CONFIG_CAM5200_NIOSFLASH"	>>$(obj)include/config.h ; \
765
		  $(XECHO) "... with NIOS flash driver" ; \
766
		}
767
	@[ -z "$(findstring fo300,$@)" ] || \
768
		{ echo "#define CONFIG_FO300"	>>$(obj)include/config.h ; \
769
		  $(XECHO) "... TQM5200 on FO300" ; \
770
		}
771
	@[ -z "$(findstring MiniFAP,$@)" ] || \
772
		{ echo "#define CONFIG_MINIFAP"	>>$(obj)include/config.h ; \
773
		  $(XECHO) "... TQM5200_AC on MiniFAP" ; \
774
		}
775
	@[ -z "$(findstring STK100,$@)" ] || \
776
		{ echo "#define CONFIG_STK52XX_REV100"	>>$(obj)include/config.h ; \
777
		  $(XECHO) "... on a STK52XX.100 base board" ; \
778
		}
779
	@[ -z "$(findstring TQM5200_B,$@)" ] || \
780
		{ echo "#define CONFIG_TQM5200_B"	>>$(obj)include/config.h ; \
781 782
		}
	@[ -z "$(findstring TQM5200S,$@)" ] || \
783 784
		{ echo "#define CONFIG_TQM5200S"	>>$(obj)include/config.h ; \
		  echo "#define CONFIG_TQM5200_B"	>>$(obj)include/config.h ; \
785
		}
786
	@[ -z "$(findstring HIGHBOOT,$@)" ] || \
787
		{ echo "TEXT_BASE = 0xFFF00000" >$(obj)board/tqm5200/config.tmp ; \
788
		}
789
	@$(MKCONFIG) -n $@ -a TQM5200 ppc mpc5xxx tqm5200 tqc
790

791
uc101_config:		unconfig
792
	@$(MKCONFIG) uc101 ppc mpc5xxx uc101
793

794 795
v38b_config: unconfig
	@$(MKCONFIG) -a v38b ppc mpc5xxx v38b
796

797 798 799
#########################################################################
## MPC512x Systems
#########################################################################
800

801 802 803
aria_config:	unconfig
	@$(MKCONFIG) -a aria ppc mpc512x aria davedenx

804 805 806
mecp5123_config:	unconfig
	@$(MKCONFIG) -a mecp5123 ppc mpc512x mecp5123 esd

807 808
mpc5121ads_config \
mpc5121ads_rev2_config	\
809
	: unconfig
810
	@mkdir -p $(obj)include
811 812
	@if [ "$(findstring rev2,$@)" ] ; then \
		echo "#define CONFIG_ADS5121_REV2 1" > $(obj)include/config.h; \
813
	fi
814
	@$(MKCONFIG) -a mpc5121ads ppc mpc512x mpc5121ads freescale
815

wdenk's avatar
wdenk committed
816 817 818 819
#########################################################################
## MPC8xx Systems
#########################################################################

820
Adder_config	\
821
Adder87x_config \
822
AdderII_config	\
823
	:		unconfig
824
	@mkdir -p $(obj)include
825
	$(if $(findstring AdderII,$@), \
826 827
	@echo "#define CONFIG_MPC852T" > $(obj)include/config.h)
	@$(MKCONFIG) -a Adder ppc mpc8xx adder
828

829
AdderUSB_config:	unconfig
830
	@$(MKCONFIG) -a AdderUSB ppc mpc8xx adder
831

832 833
ADS860_config	  \
FADS823_config	  \
834 835
FADS850SAR_config \
MPC86xADS_config  \
836
MPC885ADS_config  \
837
FADS860T_config:	unconfig
838
	@$(MKCONFIG) $(@:_config=) ppc mpc8xx fads
wdenk's avatar
wdenk committed
839 840

AMX860_config	:	unconfig
841
	@$(MKCONFIG) $(@:_config=) ppc mpc8xx amx860 westel
wdenk's avatar
wdenk committed
842 843

c2mon_config:		unconfig
844
	@$(MKCONFIG) $(@:_config=) ppc mpc8xx c2mon
wdenk's avatar
wdenk committed
845 846

CCM_config:		unconfig
847
	@$(MKCONFIG) $(@:_config=) ppc mpc8xx CCM siemens
wdenk's avatar
wdenk committed
848 849

cogent_mpc8xx_config:	unconfig
850
	@$(MKCONFIG) $(@:_config=) ppc mpc8xx cogent
wdenk's avatar
wdenk committed
851

852
ELPT860_config:		unconfig
853
	@$(MKCONFIG) $(@:_config=) ppc mpc8xx elpt860 LEOX
854

855
EP88x_config:		unconfig
856
	@$(MKCONFIG) $(@:_config=) ppc mpc8xx ep88x
857

wdenk's avatar
wdenk committed
858
ESTEEM192E_config:	unconfig
859
	@$(MKCONFIG) $(@:_config=) ppc mpc8xx esteem192e
wdenk's avatar
wdenk committed
860 861

ETX094_config	:	unconfig
862
	@$(MKCONFIG) $(@:_config=) ppc mpc8xx etx094
wdenk's avatar
wdenk committed
863 864

FLAGADM_config:	unconfig
865
	@$(MKCONFIG) $(@:_config=) ppc mpc8xx flagadm
wdenk's avatar
wdenk committed
866

867 868 869
xtract_GEN860T = $(subst _SC,,$(subst _config,,$1))

GEN860T_SC_config	\
wdenk's avatar
wdenk committed
870
GEN860T_config: unconfig
871
	@mkdir -p $(obj)include
872
	@[ -z "$(findstring _SC,$@)" ] || \
873
		{ echo "#define CONFIG_SC" >>$(obj)include/config.h ; \
874
		  $(XECHO) "With reduced H/W feature set (SC)..." ; \
875
		}
876
	@$(MKCONFIG) -a $(call xtract_GEN860T,$@) ppc mpc8xx gen860t
wdenk's avatar
wdenk committed
877 878

GENIETV_config:	unconfig
879
	@$(MKCONFIG) $(@:_config=) ppc mpc8xx genietv
wdenk's avatar
wdenk committed
880 881

GTH_config:	unconfig
882
	@$(MKCONFIG) $(@:_config=) ppc mpc8xx gth
wdenk's avatar
wdenk committed
883 884

hermes_config	:	unconfig
885
	@$(MKCONFIG) $(@:_config=) ppc mpc8xx hermes
wdenk's avatar
wdenk committed
886

887
HMI10_config	:	unconfig
888
	@$(MKCONFIG) $(@:_config=) ppc mpc8xx tqm8xx tqc
889

wdenk's avatar
wdenk committed
890
IAD210_config: unconfig
891
	@$(MKCONFIG) $(@:_config=) ppc mpc8xx IAD210 siemens
wdenk's avatar
wdenk committed
892 893 894 895 896

xtract_ICU862 = $(subst _100MHz,,$(subst _config,,$1))

ICU862_100MHz_config	\
ICU862_config: unconfig
897
	@mkdir -p $(obj)include
wdenk's avatar
wdenk committed
898
	@[ -z "$(findstring _100MHz,$@)" ] || \
899
		{ echo "#define CONFIG_100MHz"	>>$(obj)include/config.h ; \
900
		  $(XECHO) "... with 100MHz system clock" ; \
wdenk's avatar
wdenk committed
901
		}
902
	@$(MKCONFIG) -a $(call xtract_ICU862,$@) ppc mpc8xx icu862
wdenk's avatar
wdenk committed
903 904

IP860_config	:	unconfig
905
	@$(MKCONFIG) $(@:_config=) ppc mpc8xx ip860
wdenk's avatar
wdenk committed
906 907 908 909

IVML24_256_config \
IVML24_128_config \
IVML24_config:	unconfig
910
	@mkdir -p $(obj)include
wdenk's avatar
wdenk committed
911
	@[ -z "$(findstring IVML24_config,$@)" ] || \
912
		 { echo "#define CONFIG_IVML24_16M"	>>$(obj)include/config.h ; \
wdenk's avatar
wdenk committed
913 914
		 }
	@[ -z "$(findstring IVML24_128_config,$@)" ] || \
915
		 { echo "#define CONFIG_IVML24_32M"	>>$(obj)include/config.h ; \
wdenk's avatar
wdenk committed
916 917
		 }
	@[ -z "$(findstring IVML24_256_config,$@)" ] || \
918
		 { echo "#define CONFIG_IVML24_64M"	>>$(obj)include/config.h ; \
wdenk's avatar
wdenk committed
919
		 }
920
	@$(MKCONFIG) -a IVML24 ppc mpc8xx ivm
wdenk's avatar
wdenk committed
921 922 923 924

IVMS8_256_config \
IVMS8_128_config \
IVMS8_config:	unconfig
925
	@mkdir -p $(obj)include
wdenk's avatar
wdenk committed
926
	@[ -z "$(findstring IVMS8_config,$@)" ] || \
927
		 { echo "#define CONFIG_IVMS8_16M"	>>$(obj)include/config.h ; \
wdenk's avatar
wdenk committed
928 929
		 }
	@[ -z "$(findstring IVMS8_128_config,$@)" ] || \
930
		 { echo "#define CONFIG_IVMS8_32M"	>>$(obj)include/config.h ; \
wdenk's avatar
wdenk committed
931 932
		 }
	@[ -z "$(findstring IVMS8_256_config,$@)" ] || \
933
		 { echo "#define CONFIG_IVMS8_64M"	>>$(obj)include/config.h ; \
wdenk's avatar
wdenk committed
934
		 }
935
	@$(MKCONFIG) -a IVMS8 ppc mpc8xx ivm
wdenk's avatar
wdenk committed
936

937 938 939
kmsupx4_config:		unconfig
	@$(MKCONFIG) $(@:_config=) ppc mpc8xx km8xx keymile

940
KUP4K_config	:	unconfig
941
	@$(MKCONFIG) $(@:_config=) ppc mpc8xx kup4k kup
942

943
KUP4X_config	:	unconfig
944
	@$(MKCONFIG) $(@:_config=) ppc mpc8xx kup4x kup
945

wdenk's avatar
wdenk committed
946
LANTEC_config	:	unconfig
947
	@$(MKCONFIG) $(@:_config=) ppc mpc8xx lantec
wdenk's avatar
wdenk committed
948 949

lwmon_config:		unconfig
950
	@$(MKCONFIG) $(@:_config=) ppc mpc8xx lwmon
wdenk's avatar
wdenk committed
951 952 953

MBX_config	\
MBX860T_config:	unconfig
954
	@$(MKCONFIG) $(@:_config=) ppc mpc8xx mbx8xx
wdenk's avatar
wdenk committed
955

956
mgsuvd_config:		unconfig
957
	@$(MKCONFIG) $(@:_config=) ppc mpc8xx km8xx keymile
958

wdenk's avatar
wdenk committed
959
MHPC_config:		unconfig
960
	@$(MKCONFIG) $(@:_config=) ppc mpc8xx mhpc eltec
wdenk's avatar
wdenk committed
961

962 963 964
xtract_NETVIA = $(subst _V2,,$(subst _config,,$1))

NETVIA_V2_config \
wdenk's avatar
wdenk committed
965
NETVIA_config:		unconfig
966
	@mkdir -p $(obj)include
967
	@[ -z "$(findstring NETVIA_config,$@)" ] || \
968
		 { echo "#define CONFIG_NETVIA_VERSION 1" >>$(obj)include/config.h ; \
969
		  $(XECHO) "... Version 1" ; \
970 971
		 }
	@[ -z "$(findstring NETVIA_V2_config,$@)" ] || \
972
		 { echo "#define CONFIG_NETVIA_VERSION 2" >>$(obj)include/config.h ; \
973
		  $(XECHO) "... Version 2" ; \
974
		 }
975
	@$(MKCONFIG) -a $(call xtract_NETVIA,$@) ppc mpc8xx netvia
wdenk's avatar
wdenk committed
976

977 978 979
xtract_NETPHONE = $(subst _V2,,$(subst _config,,$1))

NETPHONE_V2_config \
980
NETPHONE_config:	unconfig
981
	@mkdir -p $(obj)include
982
	@[ -z "$(findstring NETPHONE_config,$@)" ] || \
983
		 { echo "#define CONFIG_NETPHONE_VERSION 1" >>$(obj)include/config.h ; \
984 985
		 }
	@[ -z "$(findstring NETPHONE_V2_config,$@)" ] || \
986
		 { echo "#define CONFIG_NETPHONE_VERSION 2" >>$(obj)include/config.h ; \
987
		 }
988
	@$(MKCONFIG) -a $(call xtract_NETPHONE,$@) ppc mpc8xx netphone
989

990
xtract_NETTA = $(subst _SWAPHOOK,,$(subst _6412,,$(subst _ISDN,,$(subst _config,,$1))))
991

992 993 994 995 996
NETTA_ISDN_6412_SWAPHOOK_config \
NETTA_ISDN_SWAPHOOK_config \
NETTA_6412_SWAPHOOK_config \
NETTA_SWAPHOOK_config \
NETTA_ISDN_6412_config \
997
NETTA_ISDN_config \
998
NETTA_6412_config \
999
NETTA_config:		unconfig
1000
	@mkdir -p $(obj)include
1001
	@[ -z "$(findstring ISDN_,$@)" ] || \
1002
		 { echo "#define CONFIG_NETTA_ISDN 1" >>$(obj)include/config.h ; \
1003 1004
		 }
	@[ -n "$(findstring ISDN_,$@)" ] || \
1005
		 { echo "#undef CONFIG_NETTA_ISDN" >>$(obj)include/config.h ; \
1006
		 }
1007
	@[ -z "$(findstring 6412_,$@)" ] || \
1008
		 { echo "#define CONFIG_NETTA_6412 1" >>$(obj)include/config.h ; \
1009 1010
		 }
	@[ -n "$(findstring 6412_,$@)" ] || \
1011
		 { echo "#undef CONFIG_NETTA_6412" >>$(obj)include/config.h ; \
1012 1013
		 }
	@[ -z "$(findstring SWAPHOOK_,$@)" ] || \
1014
		 { echo "#define CONFIG_NETTA_SWAPHOOK 1" >>$(obj)include/config.h ; \
wdenk's avatar