forked from Minki/linux
821f3eff7c
* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild: (40 commits) kbuild: introduce ccflags-y, asflags-y and ldflags-y kbuild: enable 'make CPPFLAGS=...' to add additional options to CPP kbuild: enable use of AFLAGS and CFLAGS on commandline kbuild: enable 'make AFLAGS=...' to add additional options to AS kbuild: fix AFLAGS use in h8300 and m68knommu kbuild: check for wrong use of CFLAGS kbuild: enable 'make CFLAGS=...' to add additional options to CC kbuild: fix up CFLAGS usage kbuild: make modpost detect unterminated device id lists kbuild: call export_report from the Makefile kbuild: move Kai Germaschewski to CREDITS kconfig/menuconfig: distinguish between selected-by-another options and comments kconfig: tristate choices with mixed tristate and boolean values include/linux/Kbuild: remove duplicate entries kbuild: kill backward compatibility checks kbuild: kill EXTRA_ARFLAGS kbuild: fix documentation in makefiles.txt kbuild: call make once for all targets when O=.. is used kbuild: pass -g to assembler under CONFIG_DEBUG_INFO kbuild: update _shipped files for kconfig syntax cleanup ... Fix up conflicts in arch/um/sys-{x86_64,i386}/Makefile manually.
112 lines
2.9 KiB
Makefile
112 lines
2.9 KiB
Makefile
#
|
|
# 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.
|
|
#
|
|
# Copyright (C) 2000, 2001 Paolo Alberelli
|
|
# Copyright (C) 2003, 2004 Paul Mundt
|
|
#
|
|
# 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
|
|
#
|
|
|
|
cpu-y := -mb
|
|
cpu-$(CONFIG_LITTLE_ENDIAN) := -ml
|
|
|
|
cpu-$(CONFIG_CPU_SH5) += -m5-32media-nofpu
|
|
|
|
ifdef CONFIG_LITTLE_ENDIAN
|
|
LDFLAGS_vmlinux += --defsym 'jiffies=jiffies_64'
|
|
LDFLAGS += -EL -mshlelf32_linux
|
|
else
|
|
LDFLAGS_vmlinux += --defsym 'jiffies=jiffies_64+4'
|
|
LDFLAGS += -EB -mshelf32_linux
|
|
endif
|
|
|
|
# No requirements for endianess support from AFLAGS, 'as' always run through gcc
|
|
KBUILD_CFLAGS += $(cpu-y)
|
|
|
|
LDFLAGS_vmlinux += --defsym phys_stext=_stext-$(CONFIG_CACHED_MEMORY_OFFSET) \
|
|
--defsym phys_stext_shmedia=phys_stext+1 \
|
|
-e phys_stext_shmedia
|
|
|
|
OBJCOPYFLAGS := -O binary -R .note -R .comment -R .stab -R .stabstr -S
|
|
|
|
#
|
|
# arch/sh64/defconfig never had any hope of being
|
|
# frequently updated, so use one that does
|
|
#
|
|
KBUILD_DEFCONFIG := cayman_defconfig
|
|
|
|
KBUILD_IMAGE := arch/$(ARCH)/boot/zImage
|
|
|
|
ifdef LOADADDR
|
|
LINKFLAGS += -Ttext $(word 1,$(LOADADDR))
|
|
endif
|
|
|
|
machine-$(CONFIG_SH_CAYMAN) := cayman
|
|
machine-$(CONFIG_SH_SIMULATOR) := sim
|
|
machine-$(CONFIG_SH_HARP) := harp
|
|
|
|
head-y := arch/$(ARCH)/kernel/head.o arch/$(ARCH)/kernel/init_task.o
|
|
|
|
core-y += arch/sh64/kernel/ arch/sh64/mm/
|
|
|
|
ifneq ($(machine-y),)
|
|
core-y += arch/sh64/mach-$(machine-y)/
|
|
endif
|
|
|
|
LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)
|
|
libs-y += arch/$(ARCH)/lib/ $(LIBGCC)
|
|
|
|
drivers-$(CONFIG_OPROFILE) += arch/sh64/oprofile/
|
|
|
|
boot := arch/$(ARCH)/boot
|
|
|
|
zImage: vmlinux
|
|
$(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
|
|
|
|
compressed: zImage
|
|
|
|
archclean:
|
|
$(Q)$(MAKE) $(clean)=$(boot)
|
|
|
|
archprepare: arch/$(ARCH)/lib/syscalltab.h
|
|
|
|
define filechk_gen-syscalltab
|
|
(set -e; \
|
|
echo "/*"; \
|
|
echo " * DO NOT MODIFY."; \
|
|
echo " *"; \
|
|
echo " * This file was generated by arch/$(ARCH)/Makefile"; \
|
|
echo " * Any changes will be reverted at build time."; \
|
|
echo " */"; \
|
|
echo ""; \
|
|
echo "#ifndef __SYSCALLTAB_H"; \
|
|
echo "#define __SYSCALLTAB_H"; \
|
|
echo ""; \
|
|
echo "#include <linux/kernel.h>"; \
|
|
echo ""; \
|
|
echo "struct syscall_info {"; \
|
|
echo " const char *name;"; \
|
|
echo "} syscall_info_table[] = {"; \
|
|
sed -e '/^.*\.long /!d;s// { "/;s/\(\([^/]*\)\/\)\{1\}.*/\2/; \
|
|
s/[ \t]*$$//g;s/$$/" },/;s/\("\)sys_/\1/g'; \
|
|
echo "};"; \
|
|
echo ""; \
|
|
echo "#define NUM_SYSCALL_INFO_ENTRIES ARRAY_SIZE(syscall_info_table)"; \
|
|
echo ""; \
|
|
echo "#endif /* __SYSCALLTAB_H */" )
|
|
endef
|
|
|
|
arch/$(ARCH)/lib/syscalltab.h: arch/sh64/kernel/syscalls.S
|
|
$(call filechk,gen-syscalltab)
|
|
|
|
CLEAN_FILES += arch/$(ARCH)/lib/syscalltab.h
|
|
|
|
define archhelp
|
|
@echo '* zImage - Compressed kernel image'
|
|
endef
|