diff options
author | David S. Miller <davem@davemloft.net> | 2008-11-07 01:43:03 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-11-07 01:43:03 -0500 |
commit | 9eeda9abd1faf489f3df9a1f557975f4c8650363 (patch) | |
tree | 3e0a58e25b776cfbee193195460324dccb1886c7 /arch/cris/Makefile | |
parent | 61c9eaf90081cbe6dc4f389e0056bff76eca19ec (diff) | |
parent | 4bab0ea1d42dd1927af9df6fbf0003fc00617c50 (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
drivers/net/wireless/ath5k/base.c
net/8021q/vlan_core.c
Diffstat (limited to 'arch/cris/Makefile')
-rw-r--r-- | arch/cris/Makefile | 87 |
1 files changed, 27 insertions, 60 deletions
diff --git a/arch/cris/Makefile b/arch/cris/Makefile index c6f5f5a2ffdf..3662cfb7b61d 100644 --- a/arch/cris/Makefile +++ b/arch/cris/Makefile | |||
@@ -23,12 +23,17 @@ 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/$(SARCH) | ||
27 | inc += -Iarch/cris/include/$(SARCH)/arch | ||
26 | else | 28 | else |
27 | SARCH := | 29 | SARCH := |
30 | inc := | ||
28 | endif | 31 | endif |
29 | 32 | ||
30 | ifneq ($(mach-y),) | 33 | ifneq ($(mach-y),) |
31 | MACH := mach-$(mach-y) | 34 | MACH := mach-$(mach-y) |
35 | inc += -Iarch/cris/include/$(SARCH)/$(MACH)/ | ||
36 | inc += -Iarch/cris/include/$(SARCH)/$(MACH)/mach | ||
32 | else | 37 | else |
33 | MACH := | 38 | MACH := |
34 | endif | 39 | endif |
@@ -39,95 +44,57 @@ OBJCOPYFLAGS := -O binary -R .note -R .comment -S | |||
39 | 44 | ||
40 | CPPFLAGS_vmlinux.lds = -DDRAM_VIRTUAL_BASE=0x$(CONFIG_ETRAX_DRAM_VIRTUAL_BASE) | 45 | CPPFLAGS_vmlinux.lds = -DDRAM_VIRTUAL_BASE=0x$(CONFIG_ETRAX_DRAM_VIRTUAL_BASE) |
41 | 46 | ||
42 | KBUILD_AFLAGS += -mlinux -march=$(arch-y) -Iinclude/asm/arch/mach -Iinclude/asm/arch | 47 | KBUILD_AFLAGS += -mlinux -march=$(arch-y) $(inc) |
43 | 48 | KBUILD_CFLAGS += -mlinux -march=$(arch-y) -pipe $(inc) | |
44 | KBUILD_CFLAGS += -mlinux -march=$(arch-y) -pipe -Iinclude/asm/arch/mach -Iinclude/asm/arch | 49 | KBUILD_CPPFLAGS += $(inc) |
45 | 50 | ||
46 | ifdef CONFIG_FRAME_POINTER | 51 | ifdef CONFIG_FRAME_POINTER |
47 | KBUILD_CFLAGS := $(subst -fomit-frame-pointer,,$(KBUILD_CFLAGS)) -g | 52 | KBUILD_CFLAGS := $(subst -fomit-frame-pointer,,$(KBUILD_CFLAGS)) -g |
48 | KBUILD_CFLAGS += -fno-omit-frame-pointer | 53 | KBUILD_CFLAGS += -fno-omit-frame-pointer |
49 | endif | 54 | endif |
50 | 55 | ||
51 | head-y := arch/$(ARCH)/$(SARCH)/kernel/head.o | 56 | head-y := arch/cris/$(SARCH)/kernel/head.o |
52 | 57 | ||
53 | LIBGCC = $(shell $(CC) $(KBUILD_CFLAGS) -print-file-name=libgcc.a) | 58 | LIBGCC = $(shell $(CC) $(KBUILD_CFLAGS) -print-file-name=libgcc.a) |
54 | 59 | ||
55 | core-y += arch/$(ARCH)/kernel/ arch/$(ARCH)/mm/ | 60 | core-y += arch/cris/kernel/ arch/cris/mm/ |
56 | core-y += arch/$(ARCH)/$(SARCH)/kernel/ arch/$(ARCH)/$(SARCH)/mm/ | 61 | core-y += arch/cris/$(SARCH)/kernel/ arch/cris/$(SARCH)/mm/ |
57 | ifdef CONFIG_ETRAX_ARCH_V32 | 62 | ifdef CONFIG_ETRAX_ARCH_V32 |
58 | core-y += arch/$(ARCH)/$(SARCH)/$(MACH)/ | 63 | core-y += arch/cris/$(SARCH)/$(MACH)/ |
59 | endif | 64 | endif |
60 | drivers-y += arch/$(ARCH)/$(SARCH)/drivers/ | 65 | drivers-y += arch/cris/$(SARCH)/drivers/ |
61 | libs-y += arch/$(ARCH)/$(SARCH)/lib/ $(LIBGCC) | 66 | libs-y += arch/cris/$(SARCH)/lib/ $(LIBGCC) |
62 | 67 | ||
63 | # cris source path | 68 | # cris source path |
64 | SRC_ARCH = $(srctree)/arch/$(ARCH) | 69 | SRC_ARCH = $(srctree)/arch/cris |
65 | # cris object files path | 70 | # cris object files path |
66 | OBJ_ARCH = $(objtree)/arch/$(ARCH) | 71 | OBJ_ARCH = $(objtree)/arch/cris |
67 | 72 | ||
68 | boot := arch/$(ARCH)/boot | 73 | boot := arch/cris/$(SARCH)/boot |
69 | MACHINE := arch/$(ARCH)/$(SARCH) | 74 | MACHINE := arch/cris/$(SARCH) |
70 | 75 | ||
71 | all: zImage | 76 | all: zImage |
72 | 77 | ||
73 | zImage Image: vmlinux | 78 | zImage Image: vmlinux |
74 | $(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $(boot)/$@ | 79 | $(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $(boot)/$@ |
75 | 80 | ||
76 | archprepare: $(SRC_ARCH)/.links $(srctree)/include/asm-$(ARCH)/.arch FORCE | 81 | archprepare: |
77 | |||
78 | # Create some links to make all tools happy | ||
79 | $(SRC_ARCH)/.links: | ||
80 | @rm -rf $(SRC_ARCH)/drivers | ||
81 | @ln -sfn $(SARCH)/drivers $(SRC_ARCH)/drivers | ||
82 | @rm -rf $(SRC_ARCH)/boot | ||
83 | @ln -sfn $(SARCH)/boot $(SRC_ARCH)/boot | ||
84 | @rm -rf $(SRC_ARCH)/lib | ||
85 | @ln -sfn $(SARCH)/lib $(SRC_ARCH)/lib | ||
86 | @rm -f $(SRC_ARCH)/arch/mach | ||
87 | @rm -rf $(SRC_ARCH)/arch | ||
88 | @ln -sfn $(SARCH) $(SRC_ARCH)/arch | ||
89 | ifdef CONFIG_ETRAX_ARCH_V32 | ||
90 | @ln -sfn ../$(SARCH)/$(MACH) $(SRC_ARCH)/arch/mach | ||
91 | endif | ||
92 | @rm -rf $(SRC_ARCH)/kernel/vmlinux.lds.S | ||
93 | @ln -sfn ../$(SARCH)/vmlinux.lds.S $(SRC_ARCH)/kernel/vmlinux.lds.S | ||
94 | @rm -rf $(SRC_ARCH)/kernel/asm-offsets.c | ||
95 | @ln -sfn ../$(SARCH)/kernel/asm-offsets.c $(SRC_ARCH)/kernel/asm-offsets.c | ||
96 | @touch $@ | ||
97 | |||
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 | 82 | ||
109 | archclean: | 83 | archclean: |
110 | $(Q)if [ -e arch/$(ARCH)/boot ]; then \ | 84 | $(Q)if [ -e arch/cris/$(SARCH)/boot ]; then \ |
111 | $(MAKE) $(clean)=arch/$(ARCH)/boot; \ | 85 | $(MAKE) $(clean)=arch/cris/$(SARCH)/boot; \ |
112 | fi | 86 | fi |
113 | 87 | ||
114 | CLEAN_FILES += \ | 88 | CLEAN_FILES += \ |
115 | $(MACHINE)/boot/zImage \ | 89 | $(MACHINE)/boot/zImage \ |
116 | $(MACHINE)/boot/compressed/decompress.bin \ | 90 | $(MACHINE)/boot/compressed/decompress.bin \ |
117 | $(MACHINE)/boot/compressed/piggy.gz \ | 91 | $(MACHINE)/boot/compressed/piggy.gz \ |
118 | $(MACHINE)/boot/rescue/rescue.bin \ | 92 | $(MACHINE)/boot/rescue/rescue.bin |
119 | $(SRC_ARCH)/.links \ | 93 | |
120 | $(srctree)/include/asm-$(ARCH)/.arch | 94 | |
121 | 95 | # MRPROPER_FILES += | |
122 | MRPROPER_FILES += \ | ||
123 | $(SRC_ARCH)/drivers \ | ||
124 | $(SRC_ARCH)/boot \ | ||
125 | $(SRC_ARCH)/lib \ | ||
126 | $(SRC_ARCH)/arch \ | ||
127 | $(SRC_ARCH)/kernel/vmlinux.lds.S \ | ||
128 | $(SRC_ARCH)/kernel/asm-offsets.c | ||
129 | 96 | ||
130 | define archhelp | 97 | define archhelp |
131 | echo '* zImage - Compressed kernel image (arch/$(ARCH)/boot/zImage)' | 98 | echo '* zImage - Compressed kernel image (arch/cris/boot/zImage)' |
132 | echo '* Image - Uncompressed kernel image (arch/$(ARCH)/boot/Image)' | 99 | echo '* Image - Uncompressed kernel image (arch/cris/boot/Image)' |
133 | endef | 100 | endef |