From: Mike Frysinger Date: Fri, 6 Feb 2009 02:04:36 +0000 (-0500) Subject: common/{hush, kgdb, serial}.c: build by COBJS-$(...) in Makefile X-Git-Tag: v2009.03-rc1~86 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=e915f8bb73d74178bc21d3a457959883b1afd1c0;p=oweals%2Fu-boot.git common/{hush, kgdb, serial}.c: build by COBJS-$(...) in Makefile Move global '#ifdef CONFIG_xxx .... #endif' out of the .c files and into the COBJS-$(CONFIG_xxx) in the Makefile. Also delete unused var in kgdb code in the process. Signed-off-by: Mike Frysinger --- diff --git a/common/Makefile b/common/Makefile index 93e3963079..f13cd11b9a 100644 --- a/common/Makefile +++ b/common/Makefile @@ -35,11 +35,11 @@ COBJS-y += command.o COBJS-y += devices.o COBJS-y += dlmalloc.o COBJS-y += exports.o -COBJS-y += hush.o +COBJS-$(CONFIG_SYS_HUSH_PARSER) += hush.o COBJS-y += image.o COBJS-y += memsize.o COBJS-y += s_record.o -COBJS-y += serial.o +COBJS-$(CONFIG_SERIAL_MULTI) += serial.o COBJS-y += xyzModem.o # core command @@ -144,7 +144,7 @@ COBJS-$(CONFIG_DDR_SPD) += ddr_spd.o COBJS-$(CONFIG_CMD_DOC) += docecc.o COBJS-$(CONFIG_CONSOLE_MUX) += iomux.o COBJS-y += flash.o -COBJS-y += kgdb.o +COBJS-$(CONFIG_CMD_KGDB) += kgdb.o COBJS-$(CONFIG_LCD) += lcd.o COBJS-$(CONFIG_LYNXKDI) += lynxkdi.o COBJS-$(CONFIG_UPDATE_TFTP) += update.o diff --git a/common/hush.c b/common/hush.c index 01b74d7829..cf5782a7cd 100644 --- a/common/hush.c +++ b/common/hush.c @@ -96,7 +96,6 @@ /*cmd_boot.c*/ extern int do_bootd (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); /* do_bootd */ #endif -#ifdef CONFIG_SYS_HUSH_PARSER #ifndef __U_BOOT__ #include /* isalpha, isdigit */ #include /* getpid */ @@ -3632,5 +3631,4 @@ U_BOOT_CMD( ); #endif -#endif /* CONFIG_SYS_HUSH_PARSER */ /****************************************************************************/ diff --git a/common/kgdb.c b/common/kgdb.c index 888b96b68d..862f3684e2 100644 --- a/common/kgdb.c +++ b/common/kgdb.c @@ -92,8 +92,6 @@ #include #include -#if defined(CONFIG_CMD_KGDB) - #undef KGDB_DEBUG /* @@ -587,8 +585,3 @@ U_BOOT_CMD( " program if it is executed (see the \"hello_world\"\n" " example program in the U-Boot examples directory)." ); -#else - -int kgdb_not_configured = 1; - -#endif diff --git a/common/serial.c b/common/serial.c index b38d1e7628..09385d017d 100644 --- a/common/serial.c +++ b/common/serial.c @@ -27,8 +27,6 @@ DECLARE_GLOBAL_DATA_PTR; -#if defined(CONFIG_SERIAL_MULTI) - static struct serial_device *serial_devices = NULL; static struct serial_device *serial_current = NULL; @@ -255,5 +253,3 @@ void serial_puts (const char *s) serial_current->puts (s); } - -#endif /* CONFIG_SERIAL_MULTI */