Make ads5121 out-of-tree compiling safe
authorYork Sun <yorksun@freescale.com>
Mon, 12 May 2008 19:36:39 +0000 (14:36 -0500)
committerWolfgang Denk <wd@denx.de>
Tue, 20 May 2008 22:54:37 +0000 (00:54 +0200)
Reuse the existing DIU driver in board/freescale/common.

Signed-off-by: York Sun <yorksun@freescale.com>
board/ads5121/Makefile

index 8ace8a1e5cac9f0d6b71676bf91fb6608a61a62e..f4dacce285b13481f8d2e3bf27d6214f537c39d1 100644 (file)
 
 include $(TOPDIR)/config.mk
 
+$(shell mkdir -p $(OBJTREE)/board/freescale/common)
+
 LIB    = $(obj)lib$(BOARD).a
 
-COBJS-y        := $(BOARD).o ads5121_diu.o ../freescale/common/fsl_diu_fb.o ../freescale/common/fsl_logo_bmp.o
+COBJS-y        := $(BOARD).o
+COBJS-${CONFIG_FSL_DIU_FB} += ads5121_diu.o
+COBJS-${CONFIG_FSL_DIU_FB} += ../freescale/common/fsl_diu_fb.o
+COBJS-${CONFIG_FSL_DIU_FB} += ../freescale/common/fsl_logo_bmp.o
 COBJS-$(CONFIG_PCI) += pci.o
 
 COBJS  := $(COBJS-y)