Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6
[linux-2.6/linux-acpi-2.6/ibm-acpi-2.6.git] / arch / unicore32 / Makefile
blob76a8beec7d03e454d49e9da70a6c6dbc734566ef
2 # arch/unicore32/Makefile
4 # This file is included by the global makefile so that you can add your own
5 # architecture-specific flags and dependencies.
7 # This file is subject to the terms and conditions of the GNU General Public
8 # License. See the file "COPYING" in the main directory of this archive
9 # for more details.
11 # Copyright (C) 2002~2010 by Guan Xue-tao
13 ifneq ($(SUBARCH),$(ARCH))
14 ifeq ($(CROSS_COMPILE),)
15 CROSS_COMPILE := $(call cc-cross-prefix, unicore32-linux-)
16 endif
17 endif
19 LDFLAGS_vmlinux := -p --no-undefined -X
21 OBJCOPYFLAGS := -O binary -R .note -R .note.gnu.build-id -R .comment -S
23 # Never generate .eh_frame
24 KBUILD_CFLAGS += $(call cc-option,-fno-dwarf2-cfi-asm)
26 # Never use hard float in kernel
27 KBUILD_CFLAGS += -msoft-float
29 ifeq ($(CONFIG_FRAME_POINTER),y)
30 KBUILD_CFLAGS += -mno-sched-prolog
31 endif
33 CHECKFLAGS += -D__unicore32__
35 head-y := arch/unicore32/kernel/head.o
36 head-y += arch/unicore32/kernel/init_task.o
38 core-y += arch/unicore32/kernel/
39 core-y += arch/unicore32/mm/
41 libs-y += arch/unicore32/lib/
43 ASM_GENERATED_DIR := $(srctree)/arch/unicore32/include/generated
44 LINUXINCLUDE += -I$(ASM_GENERATED_DIR)
46 ASM_GENERIC_HEADERS := atomic.h auxvec.h
47 ASM_GENERIC_HEADERS += bitsperlong.h bug.h bugs.h
48 ASM_GENERIC_HEADERS += cputime.h current.h
49 ASM_GENERIC_HEADERS += device.h div64.h
50 ASM_GENERIC_HEADERS += emergency-restart.h errno.h
51 ASM_GENERIC_HEADERS += fb.h fcntl.h ftrace.h futex.h
52 ASM_GENERIC_HEADERS += hardirq.h hw_irq.h
53 ASM_GENERIC_HEADERS += ioctl.h ioctls.h ipcbuf.h irq_regs.h
54 ASM_GENERIC_HEADERS += kdebug.h kmap_types.h
55 ASM_GENERIC_HEADERS += local.h
56 ASM_GENERIC_HEADERS += mman.h module.h msgbuf.h
57 ASM_GENERIC_HEADERS += param.h parport.h percpu.h poll.h posix_types.h
58 ASM_GENERIC_HEADERS += resource.h
59 ASM_GENERIC_HEADERS += scatterlist.h sections.h segment.h sembuf.h serial.h
60 ASM_GENERIC_HEADERS += setup.h shmbuf.h shmparam.h
61 ASM_GENERIC_HEADERS += siginfo.h signal.h sizes.h
62 ASM_GENERIC_HEADERS += socket.h sockios.h stat.h statfs.h swab.h syscalls.h
63 ASM_GENERIC_HEADERS += termbits.h termios.h topology.h types.h
64 ASM_GENERIC_HEADERS += ucontext.h unaligned.h user.h
65 ASM_GENERIC_HEADERS += vga.h
66 ASM_GENERIC_HEADERS += xor.h
68 archprepare:
69 ifneq ($(ASM_GENERATED_DIR), $(wildcard $(ASM_GENERATED_DIR)))
70 $(Q)mkdir -p $(ASM_GENERATED_DIR)/asm
71 $(Q)$(foreach a, $(ASM_GENERIC_HEADERS), \
72 echo '#include <asm-generic/$a>' \
73 > $(ASM_GENERATED_DIR)/asm/$a; )
74 endif
76 boot := arch/unicore32/boot
78 # Default target when executing plain make
79 KBUILD_IMAGE := zImage
81 all: $(KBUILD_IMAGE)
83 zImage Image uImage: vmlinux
84 $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
86 MRPROPER_DIRS += $(ASM_GENERATED_DIR)
88 archclean:
89 $(Q)$(MAKE) $(clean)=$(boot)
91 define archhelp
92 echo '* zImage - Compressed kernel image (arch/$(ARCH)/boot/zImage)'
93 echo ' Image - Uncompressed kernel image (arch/$(ARCH)/boot/Image)'
94 echo ' uImage - U-Boot wrapped zImage'
95 endef