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