]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
x86: Add BITS to allow simple Makefile sharing
authorThomas Gleixner <tglx@linutronix.de>
Tue, 23 Oct 2007 20:37:23 +0000 (22:37 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Tue, 23 Oct 2007 20:37:23 +0000 (22:37 +0200)
Preperatory patch to simplify the sharing of Makefiles in
arch/x86.

Linus came up with this during a discussion about the ugliness of
ifeq($CONFIG_X86_32),y) and obj-$(CONFIG_X86_32) in the shared
Makefiles.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/i386/Makefile
arch/x86_64/Makefile

index b81cb64d48e5f689ca229e443e7b996c7f7db393..f5b9a37def8bdc7e6bc732518fab5c9dcebae671 100644 (file)
 # Fill in SRCARCH
 SRCARCH        := x86
 
+# BITS is used as extension for files which are available in a 32 bit
+# and a 64 bit version to simplify shared Makefiles.
+# e.g.: obj-y += foo_$(BITS).o
+BITS := 32
+export BITS
+
 HAS_BIARCH      := $(call cc-option-yn, -m32)
 ifeq ($(HAS_BIARCH),y)
 AS              := $(AS) --32
index 6d89ab762ffcf759b2dc6d344babe73ce056a239..20eb69bd5a6da74a168629f286448905cfc022e4 100644 (file)
 # Fill in SRCARCH
 SRCARCH        := x86
 
+# BITS is used as extension for files which are available in a 32 bit
+# and a 64 bit version to simplify shared Makefiles.
+# e.g.: obj-y += foo_$(BITS).o
+BITS := 64
+export BITS
+
 LDFLAGS                := -m elf_x86_64
 OBJCOPYFLAGS   := -O binary -R .note -R .comment -S
 LDFLAGS_vmlinux :=