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
6 # Copyright (C) 2004-2006 Atmel Corporation.
8 # Default target when executing plain make
10 all: uImage vmlinux.elf linux.lst
12 KBUILD_DEFCONFIG
:= atstk1002_defconfig
14 CFLAGS
+= -pipe
-fno-builtin
-mno-pic
15 AFLAGS
+= -mrelax
-mno-pic
16 CFLAGS_MODULE
+= -mno-relax
17 LDFLAGS_vmlinux
+= --relax
19 cpuflags-
$(CONFIG_CPU_AP7000
) += -mcpu
=ap7000
21 CFLAGS
+= $(cpuflags-y
)
22 AFLAGS
+= $(cpuflags-y
)
24 CHECKFLAGS
+= -D__avr32__
26 LIBGCC
:= $(shell $(CC
) $(CFLAGS
) -print-libgcc-file-name
)
28 head-
$(CONFIG_LOADER_U_BOOT
) += arch
/avr32
/boot
/u-boot
/head.o
29 head-y
+= arch
/avr32
/kernel
/head.o
30 core-
$(CONFIG_PLATFORM_AT32AP
) += arch
/avr32
/mach-at32ap
/
31 core-
$(CONFIG_BOARD_ATSTK1000
) += arch
/avr32
/boards
/atstk1000
/
32 core-
$(CONFIG_LOADER_U_BOOT
) += arch
/avr32
/boot
/u-boot
/
33 core-y
+= arch
/avr32
/kernel
/
34 core-y
+= arch
/avr32
/mm
/
35 libs-y
+= arch
/avr32
/lib
/ #$(LIBGCC)
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
45 $(Q
)ln
-fsn
$(archincdir-y
) include/asm-avr32
/arch
49 archprepare
: include/asm-avr32
/.arch
51 BOOT_TARGETS
:= vmlinux.elf vmlinux.bin uImage uImage.srec
53 .PHONY
: $(BOOT_TARGETS
) install
55 boot
:= arch
/$(ARCH
)/boot
/images
57 KBUILD_IMAGE
:= $(boot
)/uImage
58 vmlinux.elf
: KBUILD_IMAGE
:= $(boot
)/vmlinux.elf
59 vmlinux.cso
: KBUILD_IMAGE
:= $(boot
)/vmlinux.cso
60 uImage.srec
: KBUILD_IMAGE
:= $(boot
)/uImage.srec
61 uImage
: KBUILD_IMAGE
:= $(boot
)/uImage
63 quiet_cmd_listing
= LST
$@
64 cmd_listing
= avr32-linux-objdump
$(OBJDUMPFLAGS
) -lS
$< > $@
65 quiet_cmd_disasm
= DIS
$@
66 cmd_disasm
= avr32-linux-objdump
$(OBJDUMPFLAGS
) -d
$< > $@
68 vmlinux.elf vmlinux.bin uImage.srec uImage vmlinux.cso
: vmlinux
69 $(Q
)$(MAKE
) $(build
)=$(boot
) $(boot
)/$@
72 $(Q
)$(MAKE
) $(build
)=$(boot
) BOOTIMAGE
=$(KBUILD_IMAGE
) $@
75 $(call if_changed
,disasm
)
78 $(call if_changed
,listing
)
81 @echo
'* vmlinux.elf - ELF image with load address 0'
82 @echo
' vmlinux.cso - PathFinder CSO image'
83 @echo
' uImage - Create a bootable image for U-Boot'