avr32: re-instate MCI WP/CD pin assignments for ATNGW100
[safe/jmp/linux-2.6] / arch / avr32 / Makefile
index cefc95a..c21a329 100644 (file)
@@ -7,46 +7,41 @@
 
 # Default target when executing plain make
 .PHONY: all
-all: uImage vmlinux.elf linux.lst
+all: uImage vmlinux.elf
 
 KBUILD_DEFCONFIG       := atstk1002_defconfig
 
-CFLAGS         += -pipe -fno-builtin -mno-pic
-AFLAGS         += -mrelax -mno-pic
+KBUILD_CFLAGS  += -pipe -fno-builtin -mno-pic
+KBUILD_AFLAGS  += -mrelax -mno-pic
 CFLAGS_MODULE  += -mno-relax
 LDFLAGS_vmlinux        += --relax
 
-cpuflags-$(CONFIG_CPU_AP7000)  += -mcpu=ap7000
+cpuflags-$(CONFIG_PLATFORM_AT32AP)     += -march=ap
 
-CFLAGS         += $(cpuflags-y)
-AFLAGS         += $(cpuflags-y)
+KBUILD_CFLAGS  += $(cpuflags-y)
+KBUILD_AFLAGS  += $(cpuflags-y)
 
-CHECKFLAGS     += -D__avr32__
+CHECKFLAGS     += -D__avr32__ -D__BIG_ENDIAN
 
-LIBGCC         := $(shell $(CC) $(CFLAGS) -print-libgcc-file-name)
+machine-$(CONFIG_PLATFORM_AT32AP) := at32ap
+machdirs       := $(patsubst %,arch/avr32/mach-%/, $(machine-y))
+
+KBUILD_CPPFLAGS        += $(patsubst %,-I$(srctree)/%include,$(machdirs))
 
 head-$(CONFIG_LOADER_U_BOOT)           += arch/avr32/boot/u-boot/head.o
 head-y                                 += arch/avr32/kernel/head.o
-core-$(CONFIG_PLATFORM_AT32AP)         += arch/avr32/mach-at32ap/
+core-y                                 += $(machdirs)
 core-$(CONFIG_BOARD_ATSTK1000)         += arch/avr32/boards/atstk1000/
+core-$(CONFIG_BOARD_ATNGW100)          += arch/avr32/boards/atngw100/
+core-$(CONFIG_BOARD_HAMMERHEAD)                += arch/avr32/boards/hammerhead/
+core-$(CONFIG_BOARD_FAVR_32)           += arch/avr32/boards/favr-32/
+core-$(CONFIG_BOARD_MERISC)            += arch/avr32/boards/merisc/
+core-$(CONFIG_BOARD_MIMC200)           += arch/avr32/boards/mimc200/
 core-$(CONFIG_LOADER_U_BOOT)           += arch/avr32/boot/u-boot/
 core-y                                 += arch/avr32/kernel/
 core-y                                 += arch/avr32/mm/
-libs-y                                 += arch/avr32/lib/ #$(LIBGCC)
-
-archincdir-$(CONFIG_PLATFORM_AT32AP)   := arch-at32ap
-
-include/asm-avr32/.arch: $(wildcard include/config/platform/*.h) include/config/auto.conf
-       @echo '  SYMLINK include/asm-avr32/arch -> include/asm-avr32/$(archincdir-y)'
-ifneq ($(KBUILD_SRC),)
-       $(Q)mkdir -p include/asm-avr32
-       $(Q)ln -fsn $(srctree)/include/asm-avr32/$(archincdir-y) include/asm-avr32/arch
-else
-       $(Q)ln -fsn $(archincdir-y) include/asm-avr32/arch
-endif
-       @touch $@
-
-archprepare: include/asm-avr32/.arch
+drivers-$(CONFIG_OPROFILE)             += arch/avr32/oprofile/
+libs-y                                 += arch/avr32/lib/
 
 BOOT_TARGETS := vmlinux.elf vmlinux.bin uImage uImage.srec
 
@@ -71,14 +66,19 @@ vmlinux.elf vmlinux.bin uImage.srec uImage vmlinux.cso: vmlinux
 install: vmlinux
        $(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(KBUILD_IMAGE) $@
 
-linux.s: vmlinux
+vmlinux.s: vmlinux
        $(call if_changed,disasm)
 
-linux.lst: vmlinux
+vmlinux.lst: vmlinux
        $(call if_changed,listing)
 
+CLEAN_FILES += vmlinux.s vmlinux.lst
+
+archclean:
+       $(Q)$(MAKE) $(clean)=$(boot)
+
 define archhelp
   @echo '* vmlinux.elf         - ELF image with load address 0'
   @echo '  vmlinux.cso         - PathFinder CSO image'
-  @echo '  uImage              - Create a bootable image for U-Boot'
+  @echo '* uImage              - Create a bootable image for U-Boot'
 endef