x86: move cpufreq Kconfigs to the same directory
[safe/jmp/linux-2.6] / arch / x86_64 / Makefile
index 265484c..f48d862 100644 (file)
@@ -21,6 +21,9 @@
 #
 # $Id: Makefile,v 1.31 2002/03/22 15:56:07 ak Exp $
 
+# Fill in SRCARCH
+SRCARCH        := x86
+
 LDFLAGS                := -m elf_x86_64
 OBJCOPYFLAGS   := -O binary -R .note -R .comment -S
 LDFLAGS_vmlinux :=
@@ -58,31 +61,31 @@ cflags-y += -maccumulate-outgoing-args
 
 # do binutils support CFI?
 cflags-y += $(call as-instr,.cfi_startproc\n.cfi_rel_offset rsp${comma}0\n.cfi_endproc,-DCONFIG_AS_CFI=1,)
-AFLAGS += $(call as-instr,.cfi_startproc\n.cfi_rel_offset rsp${comma}0\n.cfi_endproc,-DCONFIG_AS_CFI=1,)
+KBUILD_AFLAGS += $(call as-instr,.cfi_startproc\n.cfi_rel_offset rsp${comma}0\n.cfi_endproc,-DCONFIG_AS_CFI=1,)
 
 # is .cfi_signal_frame supported too?
 cflags-y += $(call as-instr,.cfi_startproc\n.cfi_signal_frame\n.cfi_endproc,-DCONFIG_AS_CFI_SIGNAL_FRAME=1,)
-AFLAGS += $(call as-instr,.cfi_startproc\n.cfi_signal_frame\n.cfi_endproc,-DCONFIG_AS_CFI_SIGNAL_FRAME=1,)
+KBUILD_AFLAGS += $(call as-instr,.cfi_startproc\n.cfi_signal_frame\n.cfi_endproc,-DCONFIG_AS_CFI_SIGNAL_FRAME=1,)
 
 cflags-$(CONFIG_CC_STACKPROTECTOR) += $(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-x86_64-has-stack-protector.sh "$(CC)" -fstack-protector )
 cflags-$(CONFIG_CC_STACKPROTECTOR_ALL) += $(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-x86_64-has-stack-protector.sh "$(CC)" -fstack-protector-all )
 
-CFLAGS += $(cflags-y)
+KBUILD_CFLAGS += $(cflags-y)
 CFLAGS_KERNEL += $(cflags-kernel-y)
-AFLAGS += -m64
+KBUILD_AFLAGS += -m64
 
-head-y := arch/x86_64/kernel/head_64.o arch/x86_64/kernel/head64.o arch/x86_64/kernel/init_task_64.o
+head-y := arch/x86/kernel/head_64.o arch/x86/kernel/head64.o arch/x86/kernel/init_task_64.o
 
-libs-y                                         += arch/x86_64/lib/
-core-y                                 += arch/x86_64/kernel/ \
-                                          arch/x86_64/mm/ \
+libs-y                                         += arch/x86/lib/
+core-y                                 += arch/x86/kernel/ \
+                                          arch/x86/mm/ \
                                           arch/x86/crypto/ \
-                                          arch/x86_64/vdso/
-core-$(CONFIG_IA32_EMULATION)          += arch/x86_64/ia32/
-drivers-$(CONFIG_PCI)                  += arch/x86_64/pci/
+                                          arch/x86/vdso/
+core-$(CONFIG_IA32_EMULATION)          += arch/x86/ia32/
+drivers-$(CONFIG_PCI)                  += arch/x86/pci/
 drivers-$(CONFIG_OPROFILE)             += arch/x86/oprofile/
 
-boot := arch/x86_64/boot
+boot := arch/x86/boot
 
 PHONY += bzImage bzlilo install archmrproper \
         fdimage fdimage144 fdimage288 isoimage archclean
@@ -90,11 +93,13 @@ PHONY += bzImage bzlilo install archmrproper \
 #Default target when executing "make"
 all: bzImage
 
-BOOTIMAGE                     := arch/x86_64/boot/bzImage
+BOOTIMAGE                     := arch/x86/boot/bzImage
 KBUILD_IMAGE                  := $(BOOTIMAGE)
 
 bzImage: vmlinux
        $(Q)$(MAKE) $(build)=$(boot) $(BOOTIMAGE)
+       $(Q)mkdir -p $(objtree)/arch/x86_64/boot
+       $(Q)ln -fsn ../../x86/boot/bzImage $(objtree)/arch/x86_64/boot/bzImage
 
 bzlilo: vmlinux
        $(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(BOOTIMAGE) zlilo
@@ -105,10 +110,17 @@ bzdisk: vmlinux
 fdimage fdimage144 fdimage288 isoimage: vmlinux
        $(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(BOOTIMAGE) $@
 
-install:
+install: vdso_install
        $(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(BOOTIMAGE) $@ 
 
+vdso_install:
+ifeq ($(CONFIG_IA32_EMULATION),y)
+       $(Q)$(MAKE) $(build)=arch/x86/ia32 $@
+endif
+       $(Q)$(MAKE) $(build)=arch/x86/vdso $@
+
 archclean:
+       $(Q)rm -rf $(objtree)/arch/x86_64/boot
        $(Q)$(MAKE) $(clean)=$(boot)
 
 define archhelp