Commit e915f8bb73d74178bc21d3a457959883b1afd1c0

Authored by Mike Frysinger
Committed by Wolfgang Denk
1 parent ab76e9848a

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 <vapier@gentoo.org>

Showing 4 changed files with 3 additions and 16 deletions Side-by-side Diff

... ... @@ -35,11 +35,11 @@
35 35 COBJS-y += devices.o
36 36 COBJS-y += dlmalloc.o
37 37 COBJS-y += exports.o
38   -COBJS-y += hush.o
  38 +COBJS-$(CONFIG_SYS_HUSH_PARSER) += hush.o
39 39 COBJS-y += image.o
40 40 COBJS-y += memsize.o
41 41 COBJS-y += s_record.o
42   -COBJS-y += serial.o
  42 +COBJS-$(CONFIG_SERIAL_MULTI) += serial.o
43 43 COBJS-y += xyzModem.o
44 44  
45 45 # core command
... ... @@ -144,7 +144,7 @@
144 144 COBJS-$(CONFIG_CMD_DOC) += docecc.o
145 145 COBJS-$(CONFIG_CONSOLE_MUX) += iomux.o
146 146 COBJS-y += flash.o
147   -COBJS-y += kgdb.o
  147 +COBJS-$(CONFIG_CMD_KGDB) += kgdb.o
148 148 COBJS-$(CONFIG_LCD) += lcd.o
149 149 COBJS-$(CONFIG_LYNXKDI) += lynxkdi.o
150 150 COBJS-$(CONFIG_UPDATE_TFTP) += update.o
... ... @@ -96,7 +96,6 @@
96 96 /*cmd_boot.c*/
97 97 extern int do_bootd (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); /* do_bootd */
98 98 #endif
99   -#ifdef CONFIG_SYS_HUSH_PARSER
100 99 #ifndef __U_BOOT__
101 100 #include <ctype.h> /* isalpha, isdigit */
102 101 #include <unistd.h> /* getpid */
... ... @@ -3632,6 +3631,5 @@
3632 3631 );
3633 3632  
3634 3633 #endif
3635   -#endif /* CONFIG_SYS_HUSH_PARSER */
3636 3634 /****************************************************************************/
... ... @@ -92,8 +92,6 @@
92 92 #include <kgdb.h>
93 93 #include <command.h>
94 94  
95   -#if defined(CONFIG_CMD_KGDB)
96   -
97 95 #undef KGDB_DEBUG
98 96  
99 97 /*
... ... @@ -587,9 +585,4 @@
587 585 " program if it is executed (see the \"hello_world\"\n"
588 586 " example program in the U-Boot examples directory)."
589 587 );
590   -#else
591   -
592   -int kgdb_not_configured = 1;
593   -
594   -#endif
... ... @@ -27,8 +27,6 @@
27 27  
28 28 DECLARE_GLOBAL_DATA_PTR;
29 29  
30   -#if defined(CONFIG_SERIAL_MULTI)
31   -
32 30 static struct serial_device *serial_devices = NULL;
33 31 static struct serial_device *serial_current = NULL;
34 32  
... ... @@ -255,6 +253,4 @@
255 253  
256 254 serial_current->puts (s);
257 255 }
258   -
259   -#endif /* CONFIG_SERIAL_MULTI */