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

# Object file lists.

obj-y				:= platform.o intc.o timer.o cacheflush.o peppercon.o ahb_dma.o apb_dma.o net_lock.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 Faraday platforms are listed here
# reference to arch/arm/mach-faraday/Kconfig
#
faraday-platform-$(CONFIG_PLATFORM_A320)	:= platform-a320
faraday-platform-$(CONFIG_PLATFORM_FIE)		:= platform-fie

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

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

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

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