[AVR32] Add support for AT32AP7001 and AT32AP7002
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / arch / avr32 / Makefile
CommitLineData
5f97f7f9
HS
1#
2# This file is subject to the terms and conditions of the GNU General Public
3# License. See the file "COPYING" in the main directory of this archive
4# for more details.
5#
6# Copyright (C) 2004-2006 Atmel Corporation.
7
8# Default target when executing plain make
9.PHONY: all
0430fb20 10all: uImage vmlinux.elf
5f97f7f9
HS
11
12KBUILD_DEFCONFIG := atstk1002_defconfig
13
a0f97e06 14KBUILD_CFLAGS += -pipe -fno-builtin -mno-pic
222d394d 15KBUILD_AFLAGS += -mrelax -mno-pic
5f97f7f9
HS
16CFLAGS_MODULE += -mno-relax
17LDFLAGS_vmlinux += --relax
18
438ff3f3 19cpuflags-$(CONFIG_PLATFORM_AT32AP) += -march=ap
5f97f7f9 20
a0f97e06 21KBUILD_CFLAGS += $(cpuflags-y)
222d394d 22KBUILD_AFLAGS += $(cpuflags-y)
5f97f7f9 23
0430fb20 24CHECKFLAGS += -D__avr32__ -D__BIG_ENDIAN
5f97f7f9
HS
25
26head-$(CONFIG_LOADER_U_BOOT) += arch/avr32/boot/u-boot/head.o
27head-y += arch/avr32/kernel/head.o
28core-$(CONFIG_PLATFORM_AT32AP) += arch/avr32/mach-at32ap/
29core-$(CONFIG_BOARD_ATSTK1000) += arch/avr32/boards/atstk1000/
9ca20a83 30core-$(CONFIG_BOARD_ATNGW100) += arch/avr32/boards/atngw100/
5f97f7f9
HS
31core-$(CONFIG_LOADER_U_BOOT) += arch/avr32/boot/u-boot/
32core-y += arch/avr32/kernel/
33core-y += arch/avr32/mm/
2853ce5e 34drivers-$(CONFIG_OPROFILE) += arch/avr32/oprofile/
0430fb20 35libs-y += arch/avr32/lib/
5f97f7f9
HS
36
37archincdir-$(CONFIG_PLATFORM_AT32AP) := arch-at32ap
38
39include/asm-avr32/.arch: $(wildcard include/config/platform/*.h) include/config/auto.conf
40 @echo ' SYMLINK include/asm-avr32/arch -> include/asm-avr32/$(archincdir-y)'
41ifneq ($(KBUILD_SRC),)
42 $(Q)mkdir -p include/asm-avr32
43 $(Q)ln -fsn $(srctree)/include/asm-avr32/$(archincdir-y) include/asm-avr32/arch
44else
45 $(Q)ln -fsn $(archincdir-y) include/asm-avr32/arch
46endif
47 @touch $@
48
49archprepare: include/asm-avr32/.arch
50
0430fb20
HS
51CLEAN_FILES += include/asm-avr32/.arch include/asm-avr32/arch
52
5f97f7f9
HS
53BOOT_TARGETS := vmlinux.elf vmlinux.bin uImage uImage.srec
54
55.PHONY: $(BOOT_TARGETS) install
56
57boot := arch/$(ARCH)/boot/images
58
59 KBUILD_IMAGE := $(boot)/uImage
60vmlinux.elf: KBUILD_IMAGE := $(boot)/vmlinux.elf
61vmlinux.cso: KBUILD_IMAGE := $(boot)/vmlinux.cso
62uImage.srec: KBUILD_IMAGE := $(boot)/uImage.srec
63uImage: KBUILD_IMAGE := $(boot)/uImage
64
65quiet_cmd_listing = LST $@
66 cmd_listing = avr32-linux-objdump $(OBJDUMPFLAGS) -lS $< > $@
67quiet_cmd_disasm = DIS $@
68 cmd_disasm = avr32-linux-objdump $(OBJDUMPFLAGS) -d $< > $@
69
70vmlinux.elf vmlinux.bin uImage.srec uImage vmlinux.cso: vmlinux
71 $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
72
73install: vmlinux
74 $(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(KBUILD_IMAGE) $@
75
0430fb20 76vmlinux.s: vmlinux
5f97f7f9
HS
77 $(call if_changed,disasm)
78
0430fb20 79vmlinux.lst: vmlinux
5f97f7f9
HS
80 $(call if_changed,listing)
81
0430fb20
HS
82CLEAN_FILES += vmlinux.s vmlinux.lst
83
84archclean:
85 $(Q)$(MAKE) $(clean)=$(boot)
86
5f97f7f9
HS
87define archhelp
88 @echo '* vmlinux.elf - ELF image with load address 0'
89 @echo ' vmlinux.cso - PathFinder CSO image'
0430fb20 90 @echo '* uImage - Create a bootable image for U-Boot'
5f97f7f9 91endef