diff options
Diffstat (limited to 'arch/cris/Makefile')
-rw-r--r-- | arch/cris/Makefile | 26 |
1 files changed, 9 insertions, 17 deletions
diff --git a/arch/cris/Makefile b/arch/cris/Makefile index c6f5f5a2ffdf..22825a7bbe57 100644 --- a/arch/cris/Makefile +++ b/arch/cris/Makefile | |||
@@ -23,12 +23,16 @@ mach-$(CONFIG_ETRAXFS) := fs | |||
23 | 23 | ||
24 | ifneq ($(arch-y),) | 24 | ifneq ($(arch-y),) |
25 | SARCH := arch-$(arch-y) | 25 | SARCH := arch-$(arch-y) |
26 | inc := -Iarch/cris/include/arch-$(arch-y) -Iarch/cris/include/arch-$(arch-y)/arch | ||
26 | else | 27 | else |
27 | SARCH := | 28 | SARCH := |
29 | inc := | ||
28 | endif | 30 | endif |
29 | 31 | ||
30 | ifneq ($(mach-y),) | 32 | ifneq ($(mach-y),) |
31 | MACH := mach-$(mach-y) | 33 | MACH := mach-$(mach-y) |
34 | inc += -Iarch/cris/include/$(SARCH)/$(MACH)/ | ||
35 | inc += -Iarch/cris/include/$(SARCH)/$(MACH)/mach | ||
32 | else | 36 | else |
33 | MACH := | 37 | MACH := |
34 | endif | 38 | endif |
@@ -39,9 +43,9 @@ OBJCOPYFLAGS := -O binary -R .note -R .comment -S | |||
39 | 43 | ||
40 | CPPFLAGS_vmlinux.lds = -DDRAM_VIRTUAL_BASE=0x$(CONFIG_ETRAX_DRAM_VIRTUAL_BASE) | 44 | CPPFLAGS_vmlinux.lds = -DDRAM_VIRTUAL_BASE=0x$(CONFIG_ETRAX_DRAM_VIRTUAL_BASE) |
41 | 45 | ||
42 | KBUILD_AFLAGS += -mlinux -march=$(arch-y) -Iinclude/asm/arch/mach -Iinclude/asm/arch | 46 | KBUILD_AFLAGS += -mlinux -march=$(arch-y) $(inc) |
43 | 47 | KBUILD_CFLAGS += -mlinux -march=$(arch-y) -pipe $(inc) | |
44 | KBUILD_CFLAGS += -mlinux -march=$(arch-y) -pipe -Iinclude/asm/arch/mach -Iinclude/asm/arch | 48 | KBUILD_CPPFLAGS += $(inc) |
45 | 49 | ||
46 | ifdef CONFIG_FRAME_POINTER | 50 | ifdef CONFIG_FRAME_POINTER |
47 | KBUILD_CFLAGS := $(subst -fomit-frame-pointer,,$(KBUILD_CFLAGS)) -g | 51 | KBUILD_CFLAGS := $(subst -fomit-frame-pointer,,$(KBUILD_CFLAGS)) -g |
@@ -73,7 +77,7 @@ all: zImage | |||
73 | zImage Image: vmlinux | 77 | zImage Image: vmlinux |
74 | $(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $(boot)/$@ | 78 | $(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $(boot)/$@ |
75 | 79 | ||
76 | archprepare: $(SRC_ARCH)/.links $(srctree)/include/asm-$(ARCH)/.arch FORCE | 80 | archprepare: $(SRC_ARCH)/.links FORCE |
77 | 81 | ||
78 | # Create some links to make all tools happy | 82 | # Create some links to make all tools happy |
79 | $(SRC_ARCH)/.links: | 83 | $(SRC_ARCH)/.links: |
@@ -95,17 +99,6 @@ endif | |||
95 | @ln -sfn ../$(SARCH)/kernel/asm-offsets.c $(SRC_ARCH)/kernel/asm-offsets.c | 99 | @ln -sfn ../$(SARCH)/kernel/asm-offsets.c $(SRC_ARCH)/kernel/asm-offsets.c |
96 | @touch $@ | 100 | @touch $@ |
97 | 101 | ||
98 | # Create link to sub arch includes | ||
99 | $(srctree)/include/asm-$(ARCH)/.arch: $(wildcard include/config/arch/*.h) | ||
100 | @echo ' SYMLINK include/asm-$(ARCH)/arch -> include/asm-$(ARCH)/$(SARCH)' | ||
101 | @rm -f $(srctree)/include/asm-$(ARCH)/arch/mach | ||
102 | @rm -f $(srctree)/include/asm-$(ARCH)/arch | ||
103 | @ln -sf $(SARCH) $(srctree)/include/asm-$(ARCH)/arch | ||
104 | ifdef CONFIG_ETRAX_ARCH_V32 | ||
105 | @ln -sf $(MACH) $(srctree)/include/asm-$(ARCH)/arch/mach | ||
106 | endif | ||
107 | @touch $@ | ||
108 | |||
109 | archclean: | 102 | archclean: |
110 | $(Q)if [ -e arch/$(ARCH)/boot ]; then \ | 103 | $(Q)if [ -e arch/$(ARCH)/boot ]; then \ |
111 | $(MAKE) $(clean)=arch/$(ARCH)/boot; \ | 104 | $(MAKE) $(clean)=arch/$(ARCH)/boot; \ |
@@ -116,8 +109,7 @@ CLEAN_FILES += \ | |||
116 | $(MACHINE)/boot/compressed/decompress.bin \ | 109 | $(MACHINE)/boot/compressed/decompress.bin \ |
117 | $(MACHINE)/boot/compressed/piggy.gz \ | 110 | $(MACHINE)/boot/compressed/piggy.gz \ |
118 | $(MACHINE)/boot/rescue/rescue.bin \ | 111 | $(MACHINE)/boot/rescue/rescue.bin \ |
119 | $(SRC_ARCH)/.links \ | 112 | $(SRC_ARCH)/.links |
120 | $(srctree)/include/asm-$(ARCH)/.arch | ||
121 | 113 | ||
122 | MRPROPER_FILES += \ | 114 | MRPROPER_FILES += \ |
123 | $(SRC_ARCH)/drivers \ | 115 | $(SRC_ARCH)/drivers \ |