]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/cris/Makefile
[CRIS] Merge asm-offsets.c for both arches into one file.
[linux-2.6-omap-h63xx.git] / arch / cris / Makefile
index 838cd2ae03ae53ffdb130bedec3f90e225d676b8..241e35bc3b59087e21cd07856364f03cd64a1de6 100644 (file)
@@ -10,6 +10,8 @@
 # License.  See the file "COPYING" in the main directory of this archive
 # for more details.
 
+KBUILD_DEFCONFIG := etrax-100lx_v2_defconfig
+
 arch-y := v10
 arch-$(CONFIG_ETRAX_ARCH_V10) := v10
 arch-$(CONFIG_ETRAX_ARCH_V32) := v32
@@ -21,12 +23,16 @@ mach-$(CONFIG_ETRAXFS) := fs
 
 ifneq ($(arch-y),)
 SARCH := arch-$(arch-y)
+inc := -Iarch/cris/include/arch-$(arch-y) -Iarch/cris/include/arch-$(arch-y)/arch
 else
 SARCH :=
+inc :=
 endif
 
 ifneq ($(mach-y),)
 MACH := mach-$(mach-y)
+inc += -Iarch/cris/include/$(SARCH)/$(MACH)/
+inc += -Iarch/cris/include/$(SARCH)/$(MACH)/mach
 else
 MACH :=
 endif
@@ -37,9 +43,9 @@ OBJCOPYFLAGS := -O binary -R .note -R .comment -S
 
 CPPFLAGS_vmlinux.lds = -DDRAM_VIRTUAL_BASE=0x$(CONFIG_ETRAX_DRAM_VIRTUAL_BASE)
 
-KBUILD_AFLAGS += -mlinux -march=$(arch-y) -Iinclude/asm/arch/mach -Iinclude/asm/arch
-
-KBUILD_CFLAGS += -mlinux -march=$(arch-y) -pipe -Iinclude/asm/arch/mach -Iinclude/asm/arch
+KBUILD_AFLAGS += -mlinux -march=$(arch-y) $(inc)
+KBUILD_CFLAGS += -mlinux -march=$(arch-y) -pipe $(inc)
+KBUILD_CPPFLAGS += $(inc)
 
 ifdef CONFIG_FRAME_POINTER
 KBUILD_CFLAGS := $(subst -fomit-frame-pointer,,$(KBUILD_CFLAGS)) -g
@@ -71,7 +77,7 @@ all: zImage
 zImage Image: vmlinux
        $(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $(boot)/$@
 
-archprepare: $(SRC_ARCH)/.links $(srctree)/include/asm-$(ARCH)/.arch FORCE
+archprepare: $(SRC_ARCH)/.links FORCE
 
 # Create some links to make all tools happy
 $(SRC_ARCH)/.links:
@@ -89,19 +95,6 @@ ifdef CONFIG_ETRAX_ARCH_V32
 endif
        @rm -rf $(SRC_ARCH)/kernel/vmlinux.lds.S
        @ln -sfn ../$(SARCH)/vmlinux.lds.S $(SRC_ARCH)/kernel/vmlinux.lds.S
-       @rm -rf $(SRC_ARCH)/kernel/asm-offsets.c
-       @ln -sfn ../$(SARCH)/kernel/asm-offsets.c $(SRC_ARCH)/kernel/asm-offsets.c
-       @touch $@
-
-# Create link to sub arch includes
-$(srctree)/include/asm-$(ARCH)/.arch: $(wildcard include/config/arch/*.h)
-       @echo '  SYMLINK include/asm-$(ARCH)/arch -> include/asm-$(ARCH)/$(SARCH)'
-       @rm -f $(srctree)/include/asm-$(ARCH)/arch/mach
-       @rm -f $(srctree)/include/asm-$(ARCH)/arch
-       @ln -sf $(SARCH) $(srctree)/include/asm-$(ARCH)/arch
-ifdef CONFIG_ETRAX_ARCH_V32
-       @ln -sf $(MACH) $(srctree)/include/asm-$(ARCH)/arch/mach
-endif
        @touch $@
 
 archclean:
@@ -114,16 +107,15 @@ CLEAN_FILES += \
        $(MACHINE)/boot/compressed/decompress.bin \
        $(MACHINE)/boot/compressed/piggy.gz \
        $(MACHINE)/boot/rescue/rescue.bin \
-       $(SRC_ARCH)/.links \
-       $(srctree)/include/asm-$(ARCH)/.arch
+       $(SRC_ARCH)/.links
 
 MRPROPER_FILES += \
        $(SRC_ARCH)/drivers \
        $(SRC_ARCH)/boot \
        $(SRC_ARCH)/lib \
        $(SRC_ARCH)/arch \
-       $(SRC_ARCH)/kernel/vmlinux.lds.S \
-       $(SRC_ARCH)/kernel/asm-offsets.c
+       $(SRC_ARCH)/kernel/vmlinux.lds.S
+
 
 define archhelp
   echo  '* zImage        - Compressed kernel image (arch/$(ARCH)/boot/zImage)'