Back to home page

LXR

 
 

    


0001 ###############################################################################
0002 #
0003 # MN10300 Kernel makefile system specifications
0004 #
0005 # Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
0006 # Modified by David Howells (dhowells@redhat.com)
0007 #
0008 # This program is free software; you can redistribute it and/or
0009 # modify it under the terms of the GNU General Public Licence
0010 # as published by the Free Software Foundation; either version
0011 # 2 of the Licence, or (at your option) any later version.
0012 #
0013 ###############################################################################
0014 
0015 KBUILD_DEFCONFIG := asb2303_defconfig
0016 
0017 CCSPECS := $(shell $(CC) -v 2>&1 | grep "^Reading specs from " | head -1 | cut -c20-)
0018 CCDIR   := $(strip $(patsubst %/specs,%,$(CCSPECS)))
0019 KBUILD_CPPFLAGS += -nostdinc -I$(CCDIR)/include
0020 
0021 LDFLAGS         :=
0022 OBJCOPYFLAGS    := -O binary -R .note -R .comment -R .GCC-command-line -R .note.gnu.build-id -S
0023 #LDFLAGS_vmlinux := -Map linkmap.txt
0024 CHECKFLAGS      +=
0025 
0026 PROCESSOR       := unset
0027 UNIT            := unset
0028 
0029 KBUILD_CFLAGS   += -mam33 -DCPU=AM33 $(call cc-option,-mmem-funcs,)
0030 KBUILD_AFLAGS   += -mam33 -DCPU=AM33
0031 
0032 ifeq ($(CONFIG_MN10300_CURRENT_IN_E2),y)
0033 KBUILD_CFLAGS   += -ffixed-e2 -fcall-saved-e5
0034 endif
0035 
0036 ifeq ($(CONFIG_MN10300_PROC_MN103E010),y)
0037 PROCESSOR       := mn103e010
0038 endif
0039 ifeq ($(CONFIG_MN10300_PROC_MN2WS0050),y)
0040 PROCESSOR       := mn2ws0050
0041 endif
0042 
0043 ifeq ($(CONFIG_MN10300_UNIT_ASB2303),y)
0044 UNIT            := asb2303
0045 endif
0046 ifeq ($(CONFIG_MN10300_UNIT_ASB2305),y)
0047 UNIT            := asb2305
0048 endif
0049 ifeq ($(CONFIG_MN10300_UNIT_ASB2364),y)
0050 UNIT            := asb2364
0051 endif
0052 
0053 
0054 head-y          := arch/mn10300/kernel/head.o
0055 
0056 core-y          += arch/mn10300/kernel/ arch/mn10300/mm/
0057 
0058 ifneq ($(PROCESSOR),unset)
0059 core-y          += arch/mn10300/proc-$(PROCESSOR)/
0060 endif
0061 ifneq ($(UNIT),unset)
0062 core-y          += arch/mn10300/unit-$(UNIT)/
0063 endif
0064 libs-y          += arch/mn10300/lib/
0065 
0066 drivers-$(CONFIG_OPROFILE)      += arch/mn10300/oprofile/
0067 
0068 boot := arch/mn10300/boot
0069 
0070 .PHONY: zImage
0071 
0072 KBUILD_IMAGE := $(boot)/zImage
0073 CLEAN_FILES += $(boot)/zImage
0074 CLEAN_FILES += $(boot)/compressed/vmlinux
0075 CLEAN_FILES += $(boot)/compressed/vmlinux.bin
0076 CLEAN_FILES += $(boot)/compressed/vmlinux.bin.gz
0077 
0078 zImage: vmlinux
0079         $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
0080 
0081 all: zImage
0082 
0083 bootstrap:
0084         $(Q)$(MAKEBOOT) bootstrap
0085 
0086 archclean:
0087         $(Q)$(MAKE) $(clean)=arch/mn10300/proc-mn103e010
0088         $(Q)$(MAKE) $(clean)=arch/mn10300/unit-asb2303
0089         $(Q)$(MAKE) $(clean)=arch/mn10300/unit-asb2305
0090 
0091 define archhelp
0092   echo  '* zImage        - Compressed kernel image (arch/$(ARCH)/boot/zImage)'
0093 endef
0094 
0095 #
0096 # include the appropriate processor- and unit-specific headers
0097 #
0098 KBUILD_CPPFLAGS += -I$(srctree)/arch/mn10300/proc-$(PROCESSOR)/include
0099 KBUILD_CPPFLAGS += -I$(srctree)/arch/mn10300/unit-$(UNIT)/include