m68knommu: move ColdFire pit.c to its own coldfire directory
[wrt350n-kernel.git] / arch / avr32 / Makefile
blob17a3529341ddef62eb5c6129a84e25622a280c4a
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.
6 # Copyright (C) 2004-2006 Atmel Corporation.
8 # Default target when executing plain make
9 .PHONY: all
10 all: uImage vmlinux.elf
12 KBUILD_DEFCONFIG := atstk1002_defconfig
14 KBUILD_CFLAGS += -pipe -fno-builtin -mno-pic
15 KBUILD_AFLAGS += -mrelax -mno-pic
16 CFLAGS_MODULE += -mno-relax
17 LDFLAGS_vmlinux += --relax
19 cpuflags-$(CONFIG_PLATFORM_AT32AP) += -march=ap
21 KBUILD_CFLAGS += $(cpuflags-y)
22 KBUILD_AFLAGS += $(cpuflags-y)
24 CHECKFLAGS += -D__avr32__ -D__BIG_ENDIAN
26 head-$(CONFIG_LOADER_U_BOOT) += arch/avr32/boot/u-boot/head.o
27 head-y += arch/avr32/kernel/head.o
28 core-$(CONFIG_PLATFORM_AT32AP) += arch/avr32/mach-at32ap/
29 core-$(CONFIG_BOARD_ATSTK1000) += arch/avr32/boards/atstk1000/
30 core-$(CONFIG_BOARD_ATNGW100) += arch/avr32/boards/atngw100/
31 core-$(CONFIG_LOADER_U_BOOT) += arch/avr32/boot/u-boot/
32 core-y += arch/avr32/kernel/
33 core-y += arch/avr32/mm/
34 drivers-$(CONFIG_OPROFILE) += arch/avr32/oprofile/
35 libs-y += arch/avr32/lib/
37 archincdir-$(CONFIG_PLATFORM_AT32AP) := arch-at32ap
39 include/asm-avr32/.arch: $(wildcard include/config/platform/*.h) include/config/auto.conf
40 @echo ' SYMLINK include/asm-avr32/arch -> include/asm-avr32/$(archincdir-y)'
41 ifneq ($(KBUILD_SRC),)
42 $(Q)mkdir -p include/asm-avr32
43 $(Q)ln -fsn $(srctree)/include/asm-avr32/$(archincdir-y) include/asm-avr32/arch
44 else
45 $(Q)ln -fsn $(archincdir-y) include/asm-avr32/arch
46 endif
47 @touch $@
49 archprepare: include/asm-avr32/.arch
51 CLEAN_FILES += include/asm-avr32/.arch include/asm-avr32/arch
53 BOOT_TARGETS := vmlinux.elf vmlinux.bin uImage uImage.srec
55 .PHONY: $(BOOT_TARGETS) install
57 boot := arch/$(ARCH)/boot/images
59 KBUILD_IMAGE := $(boot)/uImage
60 vmlinux.elf: KBUILD_IMAGE := $(boot)/vmlinux.elf
61 vmlinux.cso: KBUILD_IMAGE := $(boot)/vmlinux.cso
62 uImage.srec: KBUILD_IMAGE := $(boot)/uImage.srec
63 uImage: KBUILD_IMAGE := $(boot)/uImage
65 quiet_cmd_listing = LST $@
66 cmd_listing = avr32-linux-objdump $(OBJDUMPFLAGS) -lS $< > $@
67 quiet_cmd_disasm = DIS $@
68 cmd_disasm = avr32-linux-objdump $(OBJDUMPFLAGS) -d $< > $@
70 vmlinux.elf vmlinux.bin uImage.srec uImage vmlinux.cso: vmlinux
71 $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
73 install: vmlinux
74 $(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(KBUILD_IMAGE) $@
76 vmlinux.s: vmlinux
77 $(call if_changed,disasm)
79 vmlinux.lst: vmlinux
80 $(call if_changed,listing)
82 CLEAN_FILES += vmlinux.s vmlinux.lst
84 archclean:
85 $(Q)$(MAKE) $(clean)=$(boot)
87 define archhelp
88 @echo '* vmlinux.elf - ELF image with load address 0'
89 @echo ' vmlinux.cso - PathFinder CSO image'
90 @echo '* uImage - Create a bootable image for U-Boot'
91 endef