From: York Sun <yorksun@freescale.com>
Date: Mon, 12 May 2008 19:36:39 +0000 (-0500)
Subject: Make ads5121 out-of-tree compiling safe
X-Git-Tag: v2025.01-rc5-pxa1908~22109
X-Git-Url: http://git.dujemihanovic.xyz/img/static/html/index.html?a=commitdiff_plain;h=4416603aeb06861b468b06a981e52c3ff805db7b;p=u-boot.git

Make ads5121 out-of-tree compiling safe

Reuse the existing DIU driver in board/freescale/common.

Signed-off-by: York Sun <yorksun@freescale.com>
---

diff --git a/board/ads5121/Makefile b/board/ads5121/Makefile
index 8ace8a1e5c..f4dacce285 100644
--- a/board/ads5121/Makefile
+++ b/board/ads5121/Makefile
@@ -23,9 +23,14 @@
 
 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)