Jesse Keating 2f82dd
# Make rules for configuration files.
Jesse Keating 2f82dd
#
Jesse Keating 2f82dd
# $Id$
Jesse Keating 2f82dd
Jesse Keating 2f82dd
CFG		= kernel-$(VERSION)
Jesse Keating 2f82dd
Jesse Keating 2f82dd
CONFIGFILES	= \
Jesse Keating 2f82dd
	$(CFG)-i686.config $(CFG)-i686-debug.config \
Jesse Keating 2f82dd
	$(CFG)-i686-PAE.config $(CFG)-i686-PAEdebug.config \
Jesse Keating 2f82dd
	$(CFG)-x86_64.config $(CFG)-x86_64-debug.config \
Jesse Keating 2f82dd
	$(CFG)-s390x.config $(CFG)-arm.config \
Jesse Keating 2f82dd
	$(CFG)-ppc.config $(CFG)-ppc-smp.config \
Jesse Keating 2f82dd
	$(CFG)-sparc64.config  \
Jesse Keating 2f82dd
	$(CFG)-ppc64.config $(CFG)-ppc64-debug.config \
Jesse Keating 2f82dd
	$(CFG)-ia64.config
Jesse Keating 2f82dd
Jesse Keating 2f82dd
PLATFORMS	= x86 x86_64 powerpc powerpc32 powerpc64 s390x ia64 sparc64
Jesse Keating 2f82dd
TEMPFILES	= $(addprefix temp-, $(addsuffix -generic, $(PLATFORMS)))
Jesse Keating 2f82dd
Jesse Keating 2f82dd
configs: $(CONFIGFILES)
Jesse Keating 2f82dd
	@rm -f kernel-*-config
Jesse Keating 2f82dd
	@rm -f $(TEMPFILES)
Jesse Keating 2f82dd
	@rm -f temp-generic temp-*-generic temp-*-generic-tmp
Jesse Keating 2f82dd
Jesse Keating 2f82dd
# Augment the clean target to clean up our own cruft
Jesse Keating 2f82dd
clean ::
Jesse Keating 2f82dd
	@rm -fv $(CONFIGFILES) $(TEMPFILES) temp-generic kernel-$(VERSION)*config
Jesse Keating 2f82dd
Jesse Keating 2f82dd
temp-generic: config-generic
Jesse Keating 2f82dd
	cat config-generic config-nodebug > temp-generic
Jesse Keating 2f82dd
Jesse Keating 2f82dd
temp-debug-generic: config-generic
Jesse Keating 2f82dd
	cat config-generic config-debug > temp-debug-generic
Jesse Keating 2f82dd
Jesse Keating 2f82dd
temp-x86-generic: config-x86-generic temp-generic
Jesse Keating 2f82dd
	perl merge.pl $^  > $@
Jesse Keating 2f82dd
Jesse Keating 2f82dd
temp-x86-debug-generic: config-x86-generic temp-debug-generic
Jesse Keating 2f82dd
	perl merge.pl $^  > $@
Jesse Keating 2f82dd
Jesse Keating 2f82dd
temp-x86_64-generic: config-x86_64-generic temp-generic
Jesse Keating 2f82dd
	perl merge.pl $^  > $@
Jesse Keating 2f82dd
Jesse Keating 2f82dd
temp-x86_64-debug-generic: config-x86_64-generic temp-debug-generic
Jesse Keating 2f82dd
	perl merge.pl $^  > $@
Jesse Keating 2f82dd
Jesse Keating 2f82dd
temp-sparc64-generic: config-sparc64-generic temp-generic
Jesse Keating 2f82dd
	perl merge.pl $^  > $@
Jesse Keating 2f82dd
Jesse Keating 2f82dd
temp-powerpc-generic: config-powerpc-generic temp-generic
Jesse Keating 2f82dd
	perl merge.pl $^  > $@
Jesse Keating 2f82dd
Jesse Keating 2f82dd
temp-powerpc-debug-generic: config-powerpc-generic temp-debug-generic
Jesse Keating 2f82dd
	perl merge.pl $^  > $@
Jesse Keating 2f82dd
Jesse Keating 2f82dd
temp-powerpc32-generic: config-powerpc32-generic temp-powerpc-generic
Jesse Keating 2f82dd
	perl merge.pl $^  > $@
Jesse Keating 2f82dd
Jesse Keating 2f82dd
temp-s390-generic: config-s390x temp-generic
Jesse Keating 2f82dd
	perl merge.pl $^ > $@
Jesse Keating 2f82dd
Jesse Keating 2f82dd
temp-ia64-generic: config-ia64-generic temp-generic
Jesse Keating 2f82dd
	perl merge.pl $^ > $@
Jesse Keating 2f82dd
Jesse Keating 2f82dd
kernel-$(VERSION)-i686-PAE.config: config-i686-PAE temp-x86-generic
Jesse Keating 2f82dd
	perl merge.pl $^ i386 > $@
Jesse Keating 2f82dd
Jesse Keating 2f82dd
kernel-$(VERSION)-i686-PAEdebug.config: config-i686-PAE temp-x86-debug-generic
Jesse Keating 2f82dd
	perl merge.pl $^ i386 > $@
Jesse Keating 2f82dd
Jesse Keating 2f82dd
kernel-$(VERSION)-i686.config: /dev/null temp-x86-generic
Jesse Keating 2f82dd
	perl merge.pl $^ i386 > $@
Jesse Keating 2f82dd
Jesse Keating 2f82dd
kernel-$(VERSION)-i686-debug.config: /dev/null temp-x86-debug-generic
Jesse Keating 2f82dd
	perl merge.pl $^ i386 > $@
Jesse Keating 2f82dd
Jesse Keating 2f82dd
kernel-$(VERSION)-x86_64.config: /dev/null temp-x86_64-generic
Jesse Keating 2f82dd
	perl merge.pl $^ x86_64 > $@
Jesse Keating 2f82dd
Jesse Keating 2f82dd
kernel-$(VERSION)-x86_64-debug.config: /dev/null temp-x86_64-debug-generic
Jesse Keating 2f82dd
	perl merge.pl $^ x86_64 > $@
Jesse Keating 2f82dd
Jesse Keating 2f82dd
kernel-$(VERSION)-sparc64.config: /dev/null temp-sparc64-generic
Jesse Keating 2f82dd
	perl merge.pl $^ sparc64 > $@
Jesse Keating 2f82dd
Jesse Keating 2f82dd
kernel-$(VERSION)-ppc64.config: config-powerpc64 temp-powerpc-generic
Jesse Keating 2f82dd
	perl merge.pl $^ powerpc > $@
Jesse Keating 2f82dd
Jesse Keating 2f82dd
kernel-$(VERSION)-ppc64-debug.config: config-powerpc64 temp-powerpc-debug-generic
Jesse Keating 2f82dd
	perl merge.pl $^ powerpc > $@
Jesse Keating 2f82dd
Jesse Keating 2f82dd
kernel-$(VERSION)-s390x.config: config-s390x temp-s390-generic
Jesse Keating 2f82dd
	perl merge.pl $^ s390 > $@
Jesse Keating 2f82dd
Jesse Keating 2f82dd
kernel-$(VERSION)-arm.config: config-arm temp-generic
Jesse Keating 2f82dd
	perl merge.pl $^ arm > $@
Jesse Keating 2f82dd
Jesse Keating 2f82dd
kernel-$(VERSION)-ppc.config: /dev/null temp-powerpc32-generic
Jesse Keating 2f82dd
	perl merge.pl $^ powerpc > $@
Jesse Keating 2f82dd
Jesse Keating 2f82dd
kernel-$(VERSION)-ppc-smp.config: config-powerpc32-smp temp-powerpc32-generic
Jesse Keating 2f82dd
	perl merge.pl $^ powerpc > $@
Jesse Keating 2f82dd
Jesse Keating 2f82dd
kernel-$(VERSION)-ia64.config: /dev/null temp-ia64-generic
Jesse Keating 2f82dd
	perl merge.pl $^ ia64 > $@