Back to home page

LXR

 
 

    


0001 #
0002 # cris/Makefile
0003 #
0004 # This file is included by the global makefile so that you can add your own
0005 # architecture-specific flags and dependencies. Remember to do have actions
0006 # for "archclean" and "archdep" for cleaning up and making dependencies for
0007 # this architecture
0008 #
0009 # This file is subject to the terms and conditions of the GNU General Public
0010 # License.  See the file "COPYING" in the main directory of this archive
0011 # for more details.
0012 
0013 KBUILD_DEFCONFIG := etrax-100lx_v2_defconfig
0014 
0015 arch-y := v10
0016 arch-$(CONFIG_ETRAX_ARCH_V10) := v10
0017 arch-$(CONFIG_ETRAX_ARCH_V32) := v32
0018 
0019 # No config available for make clean etc
0020 mach-y := fs
0021 mach-$(CONFIG_CRIS_MACH_ARTPEC3) := a3
0022 mach-$(CONFIG_ETRAXFS) := fs
0023 
0024 ifneq ($(arch-y),)
0025 SARCH := arch-$(arch-y)
0026 inc := -Iarch/cris/include/uapi/$(SARCH)
0027 inc += -Iarch/cris/include/$(SARCH)
0028 inc += -Iarch/cris/include/uapi/$(SARCH)/arch
0029 inc += -Iarch/cris/include/$(SARCH)/arch
0030 else
0031 SARCH :=
0032 inc :=
0033 endif
0034 
0035 ifneq ($(mach-y),)
0036 MACH := mach-$(mach-y)
0037 inc += -Iarch/cris/include/$(SARCH)/$(MACH)/
0038 inc += -Iarch/cris/include/$(SARCH)/$(MACH)/mach
0039 else
0040 MACH :=
0041 endif
0042 
0043 ifneq ($(CONFIG_BUILTIN_DTB),"")
0044 core-$(CONFIG_OF) += arch/cris/boot/dts/
0045 endif
0046 
0047 LD = $(CROSS_COMPILE)ld -mcrislinux
0048 
0049 OBJCOPYFLAGS := -O binary -R .note -R .comment -S
0050 
0051 KBUILD_AFLAGS += -mlinux -march=$(arch-y) $(inc)
0052 KBUILD_CFLAGS += -mlinux -march=$(arch-y) -pipe $(inc)
0053 KBUILD_CPPFLAGS += $(inc)
0054 
0055 ifdef CONFIG_FRAME_POINTER
0056 KBUILD_CFLAGS := $(subst -fomit-frame-pointer,,$(KBUILD_CFLAGS)) -g
0057 KBUILD_CFLAGS += -fno-omit-frame-pointer
0058 endif
0059 
0060 head-y := arch/cris/$(SARCH)/kernel/head.o
0061 
0062 LIBGCC = $(shell $(CC) $(KBUILD_CFLAGS) -print-file-name=libgcc.a)
0063 
0064 core-y          += arch/cris/kernel/ arch/cris/mm/
0065 core-y          += arch/cris/$(SARCH)/kernel/ arch/cris/$(SARCH)/mm/
0066 ifdef CONFIG_ETRAX_ARCH_V32
0067 core-y          += arch/cris/$(SARCH)/$(MACH)/
0068 endif
0069 drivers-y       += arch/cris/$(SARCH)/drivers/
0070 libs-y          += arch/cris/$(SARCH)/lib/ $(LIBGCC)
0071 
0072 # cris source path
0073 SRC_ARCH              = $(srctree)/arch/cris
0074 # cris object files path
0075 OBJ_ARCH              = $(objtree)/arch/cris
0076 
0077 boot := arch/cris/boot
0078 MACHINE := arch/cris/$(SARCH)
0079 
0080 all: zImage
0081 
0082 zImage Image: vmlinux
0083         $(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $(boot)/$@
0084 
0085 archprepare:
0086 
0087 archclean:
0088         $(Q)if [ -e arch/cris/boot ]; then \
0089                 $(MAKE) $(clean)=arch/cris/boot; \
0090         fi
0091 
0092 CLEAN_FILES += \
0093         $(boot)/zImage \
0094         $(boot)/compressed/decompress.bin \
0095         $(boot)/compressed/piggy.gz \
0096         $(boot)/rescue/rescue.bin
0097 
0098 
0099 # MRPROPER_FILES +=
0100 
0101 define archhelp
0102   echo  '* zImage        - Compressed kernel image (arch/cris/boot/zImage)'
0103   echo  '* Image         - Uncompressed kernel image (arch/cris/boot/Image)'
0104 endef