module: zero mod->init_ro_size after init is freed.
[linux-2.6.git] / arch / unicore32 / Makefile
1 #
2 # arch/unicore32/Makefile
3 #
4 # This file is included by the global makefile so that you can add your own
5 # architecture-specific flags and dependencies.
6 #
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.
10 #
11 # Copyright (C) 2002~2010 by Guan Xue-tao
12 #
13 ifneq ($(SUBARCH),$(ARCH))
14         ifeq ($(CROSS_COMPILE),)
15                 CROSS_COMPILE := $(call cc-cross-prefix, unicore32-linux-)
16         endif
17 endif
18
19 LDFLAGS_vmlinux         := -p --no-undefined -X
20
21 OBJCOPYFLAGS            := -O binary -R .note -R .note.gnu.build-id -R .comment -S
22
23 # Never generate .eh_frame
24 KBUILD_CFLAGS           += $(call cc-option,-fno-dwarf2-cfi-asm)
25
26 # Never use hard float in kernel
27 KBUILD_CFLAGS           += -msoft-float
28
29 ifeq ($(CONFIG_FRAME_POINTER),y)
30 KBUILD_CFLAGS           += -mno-sched-prolog
31 endif
32
33 CHECKFLAGS              += -D__unicore32__
34
35 head-y                  := arch/unicore32/kernel/head.o
36 head-y                  += arch/unicore32/kernel/init_task.o
37
38 core-y                  += arch/unicore32/kernel/
39 core-y                  += arch/unicore32/mm/
40
41 libs-y                  += arch/unicore32/lib/
42
43 ASM_GENERATED_DIR       := $(srctree)/arch/unicore32/include/generated
44 LINUXINCLUDE            += -I$(ASM_GENERATED_DIR)
45
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
67
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
75
76 boot                    := arch/unicore32/boot
77
78 # Default target when executing plain make
79 KBUILD_IMAGE            := zImage
80
81 all:    $(KBUILD_IMAGE)
82
83 zImage Image uImage: vmlinux
84         $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
85
86 MRPROPER_DIRS           += $(ASM_GENERATED_DIR)
87
88 archclean:
89         $(Q)$(MAKE) $(clean)=$(boot)
90
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