]>
Commit | Line | Data |
---|---|---|
2c2314bf | 1 | # |
1da177e4 LT |
2 | # cris/Makefile |
3 | # | |
4 | # This file is included by the global makefile so that you can add your own | |
5 | # architecture-specific flags and dependencies. Remember to do have actions | |
6 | # for "archclean" and "archdep" for cleaning up and making dependencies for | |
7 | # this architecture | |
8 | # | |
9 | # This file is subject to the terms and conditions of the GNU General Public | |
10 | # License. See the file "COPYING" in the main directory of this archive | |
11 | # for more details. | |
12 | ||
8f808417 AB |
13 | KBUILD_DEFCONFIG := etrax-100lx_v2_defconfig |
14 | ||
1da177e4 LT |
15 | arch-y := v10 |
16 | arch-$(CONFIG_ETRAX_ARCH_V10) := v10 | |
3e41d652 | 17 | arch-$(CONFIG_ETRAX_ARCH_V32) := v32 |
1da177e4 | 18 | |
2c2314bf JN |
19 | # No config available for make clean etc |
20 | mach-y := fs | |
21 | mach-$(CONFIG_CRIS_MACH_ARTPEC3) := a3 | |
22 | mach-$(CONFIG_ETRAXFS) := fs | |
23 | ||
1da177e4 LT |
24 | ifneq ($(arch-y),) |
25 | SARCH := arch-$(arch-y) | |
abbf1590 DH |
26 | inc := -Iarch/cris/include/uapi/$(SARCH) |
27 | inc += -Iarch/cris/include/$(SARCH) | |
28 | inc += -Iarch/cris/include/uapi/$(SARCH)/arch | |
c5ec6fb0 | 29 | inc += -Iarch/cris/include/$(SARCH)/arch |
1da177e4 LT |
30 | else |
31 | SARCH := | |
556dcee7 | 32 | inc := |
1da177e4 LT |
33 | endif |
34 | ||
2c2314bf JN |
35 | ifneq ($(mach-y),) |
36 | MACH := mach-$(mach-y) | |
556dcee7 JN |
37 | inc += -Iarch/cris/include/$(SARCH)/$(MACH)/ |
38 | inc += -Iarch/cris/include/$(SARCH)/$(MACH)/mach | |
2c2314bf JN |
39 | else |
40 | MACH := | |
41 | endif | |
42 | ||
1da177e4 LT |
43 | LD = $(CROSS_COMPILE)ld -mcrislinux |
44 | ||
45 | OBJCOPYFLAGS := -O binary -R .note -R .comment -S | |
46 | ||
556dcee7 JN |
47 | KBUILD_AFLAGS += -mlinux -march=$(arch-y) $(inc) |
48 | KBUILD_CFLAGS += -mlinux -march=$(arch-y) -pipe $(inc) | |
49 | KBUILD_CPPFLAGS += $(inc) | |
1da177e4 LT |
50 | |
51 | ifdef CONFIG_FRAME_POINTER | |
a0f97e06 SR |
52 | KBUILD_CFLAGS := $(subst -fomit-frame-pointer,,$(KBUILD_CFLAGS)) -g |
53 | KBUILD_CFLAGS += -fno-omit-frame-pointer | |
1da177e4 LT |
54 | endif |
55 | ||
c5ec6fb0 | 56 | head-y := arch/cris/$(SARCH)/kernel/head.o |
1da177e4 | 57 | |
a0f97e06 | 58 | LIBGCC = $(shell $(CC) $(KBUILD_CFLAGS) -print-file-name=libgcc.a) |
1da177e4 | 59 | |
c5ec6fb0 JN |
60 | core-y += arch/cris/kernel/ arch/cris/mm/ |
61 | core-y += arch/cris/$(SARCH)/kernel/ arch/cris/$(SARCH)/mm/ | |
2c2314bf | 62 | ifdef CONFIG_ETRAX_ARCH_V32 |
c5ec6fb0 | 63 | core-y += arch/cris/$(SARCH)/$(MACH)/ |
2c2314bf | 64 | endif |
c5ec6fb0 JN |
65 | drivers-y += arch/cris/$(SARCH)/drivers/ |
66 | libs-y += arch/cris/$(SARCH)/lib/ $(LIBGCC) | |
1da177e4 | 67 | |
3e41d652 | 68 | # cris source path |
c5ec6fb0 | 69 | SRC_ARCH = $(srctree)/arch/cris |
3e41d652 | 70 | # cris object files path |
c5ec6fb0 | 71 | OBJ_ARCH = $(objtree)/arch/cris |
3e41d652 | 72 | |
66ab3a74 | 73 | boot := arch/cris/boot |
c5ec6fb0 | 74 | MACHINE := arch/cris/$(SARCH) |
1da177e4 | 75 | |
2c2314bf | 76 | all: zImage |
1da177e4 | 77 | |
2c2314bf JN |
78 | zImage Image: vmlinux |
79 | $(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $(boot)/$@ | |
1da177e4 | 80 | |
c5ec6fb0 | 81 | archprepare: |
1da177e4 | 82 | |
2c2314bf | 83 | archclean: |
66ab3a74 JN |
84 | $(Q)if [ -e arch/cris/boot ]; then \ |
85 | $(MAKE) $(clean)=arch/cris/boot; \ | |
2c2314bf JN |
86 | fi |
87 | ||
88 | CLEAN_FILES += \ | |
66ab3a74 JN |
89 | $(boot)/zImage \ |
90 | $(boot)/compressed/decompress.bin \ | |
91 | $(boot)/compressed/piggy.gz \ | |
92 | $(boot)/rescue/rescue.bin | |
2c2314bf | 93 | |
0365f707 | 94 | |
c5ec6fb0 | 95 | # MRPROPER_FILES += |
2c2314bf JN |
96 | |
97 | define archhelp | |
c5ec6fb0 JN |
98 | echo '* zImage - Compressed kernel image (arch/cris/boot/zImage)' |
99 | echo '* Image - Uncompressed kernel image (arch/cris/boot/Image)' | |
2c2314bf | 100 | endef |