diff options
Diffstat (limited to 'arch/cris/Makefile')
-rw-r--r-- | arch/cris/Makefile | 66 |
1 files changed, 45 insertions, 21 deletions
diff --git a/arch/cris/Makefile b/arch/cris/Makefile index 9d28fa8563cc..90ca8730b120 100644 --- a/arch/cris/Makefile +++ b/arch/cris/Makefile | |||
@@ -1,4 +1,4 @@ | |||
1 | # $Id: Makefile,v 1.23 2004/10/19 13:07:34 starvik Exp $ | 1 | # $Id: Makefile,v 1.28 2005/03/17 10:44:37 larsv Exp $ |
2 | # cris/Makefile | 2 | # cris/Makefile |
3 | # | 3 | # |
4 | # This file is included by the global makefile so that you can add your own | 4 | # This file is included by the global makefile so that you can add your own |
@@ -15,6 +15,7 @@ | |||
15 | 15 | ||
16 | arch-y := v10 | 16 | arch-y := v10 |
17 | arch-$(CONFIG_ETRAX_ARCH_V10) := v10 | 17 | arch-$(CONFIG_ETRAX_ARCH_V10) := v10 |
18 | arch-$(CONFIG_ETRAX_ARCH_V32) := v32 | ||
18 | 19 | ||
19 | # No config avaiable for make clean etc | 20 | # No config avaiable for make clean etc |
20 | ifneq ($(arch-y),) | 21 | ifneq ($(arch-y),) |
@@ -46,6 +47,21 @@ core-y += arch/$(ARCH)/$(SARCH)/kernel/ arch/$(ARCH)/$(SARCH)/mm/ | |||
46 | drivers-y += arch/$(ARCH)/$(SARCH)/drivers/ | 47 | drivers-y += arch/$(ARCH)/$(SARCH)/drivers/ |
47 | libs-y += arch/$(ARCH)/$(SARCH)/lib/ $(LIBGCC) | 48 | libs-y += arch/$(ARCH)/$(SARCH)/lib/ $(LIBGCC) |
48 | 49 | ||
50 | # cris source path | ||
51 | SRC_ARCH = $(srctree)/arch/$(ARCH) | ||
52 | # cris object files path | ||
53 | OBJ_ARCH = $(objtree)/arch/$(ARCH) | ||
54 | |||
55 | target_boot_arch_dir = $(OBJ_ARCH)/$(SARCH)/boot | ||
56 | target_boot_dir = $(OBJ_ARCH)/boot | ||
57 | src_boot_dir = $(SRC_ARCH)/boot | ||
58 | target_compressed_dir = $(OBJ_ARCH)/boot/compressed | ||
59 | src_compressed_dir = $(SRC_ARCH)/boot/compressed | ||
60 | target_rescue_dir = $(OBJ_ARCH)/boot/rescue | ||
61 | src_rescue_dir = $(SRC_ARCH)/boot/rescue | ||
62 | |||
63 | export target_boot_arch_dir target_boot_dir src_boot_dir target_compressed_dir src_compressed_dir target_rescue_dir src_rescue_dir | ||
64 | |||
49 | vmlinux.bin: vmlinux | 65 | vmlinux.bin: vmlinux |
50 | $(OBJCOPY) $(OBJCOPYFLAGS) vmlinux vmlinux.bin | 66 | $(OBJCOPY) $(OBJCOPYFLAGS) vmlinux vmlinux.bin |
51 | 67 | ||
@@ -65,44 +81,52 @@ cramfs: | |||
65 | 81 | ||
66 | clinux: vmlinux.bin decompress.bin rescue.bin | 82 | clinux: vmlinux.bin decompress.bin rescue.bin |
67 | 83 | ||
68 | decompress.bin: FORCE | 84 | decompress.bin: $(target_boot_dir) |
69 | @make -C arch/$(ARCH)/boot/compressed decompress.bin | 85 | @$(MAKE) -f $(src_compressed_dir)/Makefile $(target_compressed_dir)/decompress.bin |
70 | 86 | ||
71 | rescue.bin: FORCE | 87 | $(target_rescue_dir)/rescue.bin: $(target_boot_dir) |
72 | @make -C arch/$(ARCH)/boot/rescue rescue.bin | 88 | @$(MAKE) -f $(src_rescue_dir)/Makefile $(target_rescue_dir)/rescue.bin |
73 | 89 | ||
74 | zImage: vmlinux.bin rescue.bin | 90 | zImage: $(target_boot_dir) vmlinux.bin $(target_rescue_dir)/rescue.bin |
75 | ## zImage - Compressed kernel (gzip) | 91 | ## zImage - Compressed kernel (gzip) |
76 | @make -C arch/$(ARCH)/boot/ zImage | 92 | @$(MAKE) -f $(src_boot_dir)/Makefile zImage |
93 | |||
94 | $(target_boot_dir): $(target_boot_arch_dir) | ||
95 | ln -sfn $< $@ | ||
96 | |||
97 | $(target_boot_arch_dir): | ||
98 | mkdir -p $@ | ||
77 | 99 | ||
78 | compressed: zImage | 100 | compressed: zImage |
79 | 101 | ||
80 | archmrproper: | 102 | archmrproper: |
81 | archclean: | 103 | archclean: |
82 | $(Q)$(MAKE) $(clean)=arch/$(ARCH)/boot | 104 | @if [ -d arch/$(ARCH)/boot ]; then \ |
105 | $(MAKE) $(clean)=arch/$(ARCH)/boot ; \ | ||
106 | fi | ||
83 | rm -f timage vmlinux.bin decompress.bin rescue.bin cramfs.img | 107 | rm -f timage vmlinux.bin decompress.bin rescue.bin cramfs.img |
84 | rm -rf $(LD_SCRIPT).tmp | 108 | rm -rf $(LD_SCRIPT).tmp |
85 | 109 | ||
86 | prepare: arch/$(ARCH)/.links include/asm-$(ARCH)/.arch \ | 110 | prepare: $(SRC_ARCH)/.links $(srctree)/include/asm-$(ARCH)/.arch \ |
87 | include/asm-$(ARCH)/$(SARCH)/offset.h | 111 | include/asm-$(ARCH)/$(SARCH)/offset.h |
88 | 112 | ||
89 | # Create some links to make all tools happy | 113 | # Create some links to make all tools happy |
90 | arch/$(ARCH)/.links: | 114 | $(SRC_ARCH)/.links: |
91 | @rm -rf arch/$(ARCH)/drivers | 115 | @rm -rf $(SRC_ARCH)/drivers |
92 | @ln -sfn $(SARCH)/drivers arch/$(ARCH)/drivers | 116 | @ln -sfn $(SRC_ARCH)/$(SARCH)/drivers $(SRC_ARCH)/drivers |
93 | @rm -rf arch/$(ARCH)/boot | 117 | @rm -rf $(SRC_ARCH)/boot |
94 | @ln -sfn $(SARCH)/boot arch/$(ARCH)/boot | 118 | @ln -sfn $(SRC_ARCH)/$(SARCH)/boot $(SRC_ARCH)/boot |
95 | @rm -rf arch/$(ARCH)/lib | 119 | @rm -rf $(SRC_ARCH)/lib |
96 | @ln -sfn $(SARCH)/lib arch/$(ARCH)/lib | 120 | @ln -sfn $(SRC_ARCH)/$(SARCH)/lib $(SRC_ARCH)/lib |
97 | @ln -sfn $(SARCH) arch/$(ARCH)/arch | 121 | @ln -sfn $(SRC_ARCH)/$(SARCH) $(SRC_ARCH)/arch |
98 | @ln -sfn ../$(SARCH)/vmlinux.lds.S arch/$(ARCH)/kernel/vmlinux.lds.S | 122 | @ln -sfn $(SRC_ARCH)/$(SARCH)/vmlinux.lds.S $(SRC_ARCH)/kernel/vmlinux.lds.S |
99 | @touch $@ | 123 | @touch $@ |
100 | 124 | ||
101 | # Create link to sub arch includes | 125 | # Create link to sub arch includes |
102 | include/asm-$(ARCH)/.arch: $(wildcard include/config/arch/*.h) | 126 | $(srctree)/include/asm-$(ARCH)/.arch: $(wildcard include/config/arch/*.h) |
103 | @echo ' Making asm-$(ARCH)/arch -> asm-$(ARCH)/$(SARCH) symlink' | 127 | @echo ' Making $(srctree)/include/asm-$(ARCH)/arch -> $(srctree)/include/asm-$(ARCH)/$(SARCH) symlink' |
104 | @rm -f include/asm-$(ARCH)/arch | 128 | @rm -f include/asm-$(ARCH)/arch |
105 | @ln -sf $(SARCH) include/asm-$(ARCH)/arch | 129 | @ln -sf $(srctree)/include/asm-$(ARCH)/$(SARCH) $(srctree)/include/asm-$(ARCH)/arch |
106 | @touch $@ | 130 | @touch $@ |
107 | 131 | ||
108 | arch/$(ARCH)/$(SARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \ | 132 | arch/$(ARCH)/$(SARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \ |