#
# Makefile for the linux kernel.
# Luke Lee 09/07/2005

# Object file lists.

obj-y				:= platform.o intc.o timer.o cacheflush.o fmem.o  debug_cpe.o

obj-$(CONFIG_PCI) 		+= ftpci.o

obj-$(CONFIG_PLATFORM_AHBDMA)	+= ahb_dma.o

#obj-$(CONFIG_AHB_DMA_TEST)	+= ahb_dma_test.o

#obj-$(CONFIG_PLATFORM_APBDMA)	+= apb_dma.o

# Luke Lee 09/07/2005 ins begin

#
# All supported GM platforms are listed here
# reference to arch/arm/mach-GM/Kconfig
#
GM-platform-$(CONFIG_PLATFORM_FIE)		:= platform-fie
GM-platform-$(CONFIG_PLATFORM_GM8120)	:= platform-GM8120
GM-platform-$(CONFIG_PLATFORM_GM8180)	:= platform-GM8180
GM-platform-$(CONFIG_PLATFORM_GM8185)	:= platform-GM8185

#
# Default platform directory set to A320
# TODO: Make this an error, should never happen unless the Kconfig or Makefile is wrong
ifeq ($(GM-platform-y),)
GM-platform-y := platform-a320
endif
PLATFORM_DIR   := $(GM-platform-y)

core-y		+=  arch/arm/mach-GM/$(PLATFORM_DIR)/

include/asm-arm/arch-GM/.platform: $(wildcard include/config/arch/*.h) include/config/MARKER
	@echo '  SYMLINK include/asm-arm/arch-GM/platform -> include/asm-arm/arch-GM/$(PLATFORM_DIR)'
ifneq ($(KBUILD_SRC),)
	$(Q)mkdir -p include/asm-arm/arch-GM
	$(Q)ln -fsn $(srctree)/include/asm-arm/arch-GM/$(PLATFORM_DIR) include/asm-arm/arch-GM/platform
else
	$(Q)ln -fsn $(PLATFORM_DIR) include/asm-arm/arch-GM/platform
endif
	@touch $@

prepare: include/asm-arm/arch-GM/.platform
# Luke Lee 09/07/2005 ins end
