[U-Boot] [PATCH 07/12] miiphyutil: Move conditional compilation to Makefile

Jean-Christophe PLAGNIOL-VILLARD plagnioj at jcrosoft.com
Thu Aug 28 12:27:26 CEST 2008


Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj at jcrosoft.com>
---
 common/Makefile     |    2 +-
 common/miiphyutil.c |    2 --
 2 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/common/Makefile b/common/Makefile
index 92d7a9e..7db70f5 100644
--- a/common/Makefile
+++ b/common/Makefile
@@ -85,6 +85,7 @@ COBJS-$(CONFIG_CMD_LICENSE) += cmd_license.o
 COBJS-y += cmd_load.o
 COBJS-$(CONFIG_LOGBUFFER) += cmd_log.o
 COBJS-y += cmd_mem.o
+COBJS-$(CONFIG_MII)$(CONFIG_CMD_MII) += miiphyutil.o
 COBJS-$(CONFIG_CMD_MII) += cmd_mii.o
 COBJS-$(CONFIG_CMD_MISC) += cmd_misc.o
 COBJS-$(CONFIG_CMD_MMC) += cmd_mmc.o
@@ -134,7 +135,6 @@ COBJS-$(CONFIG_LCD) += lcd.o
 COBJS-y += lists.o
 COBJS-$(CONFIG_LYNXKDI) += lynxkdi.o
 COBJS-y += memsize.o
-COBJS-y += miiphyutil.o
 COBJS-y += s_record.o
 COBJS-y += serial.o
 ifdef CONFIG_CMD_USB
diff --git a/common/miiphyutil.c b/common/miiphyutil.c
index eac8275..5ef4a33 100644
--- a/common/miiphyutil.c
+++ b/common/miiphyutil.c
@@ -29,7 +29,6 @@
 #include <common.h>
 #include <miiphy.h>
 
-#if defined(CONFIG_MII) || defined(CONFIG_CMD_MII)
 #include <asm/types.h>
 #include <linux/list.h>
 #include <malloc.h>
@@ -487,4 +486,3 @@ int miiphy_link (char *devname, unsigned char addr)
 	}
 }
 #endif
-#endif /* CONFIG_MII */
-- 
1.5.6.3



More information about the U-Boot mailing list