mk: include $(GCCWARN) when building ELF objects
authorMatt Fleming <matt.fleming@intel.com>
Fri, 5 Jul 2013 10:33:26 +0000 (11:33 +0100)
committerMatt Fleming <matt.fleming@intel.com>
Fri, 5 Jul 2013 12:05:16 +0000 (13:05 +0100)
It's currently impossible to turn on dprintf() statements in
com32/modules because $(GCCWARN) isn't used as part of $(CFLAGS).

Signed-off-by: Matt Fleming <matt.fleming@intel.com>
com32/modules/prdhcp.c
mk/elf.mk

index e1785a0..4ae295e 100644 (file)
 #include <unistd.h>
 #include <getkey.h>
 
-#define DEBUG 0
+#define PRDHCP_DEBUG 0
 
 #define dprintf0(f, ...)               ((void)0)
 
-#ifdef DEBUG
+#ifdef PRDHCP_DEBUG
 #  define dpressanykey                 pressanykey
 #  define dprintf                      printf
 #  define dprint_pxe_bootp_t           print_pxe_bootp_t
index 109e0a6..8bc6be0 100644 (file)
--- a/mk/elf.mk
+++ b/mk/elf.mk
@@ -42,7 +42,7 @@ GPLLIB     =
 GPLINCLUDE =
 endif
 
-CFLAGS     = $(GCCOPT) -W -Wall -march=i386 \
+CFLAGS     = $(GCCOPT) $(GCCWARN) -W -Wall -march=i386 \
             -fomit-frame-pointer -D__COM32__ -DDYNAMIC_MODULE \
             -nostdinc -iwithprefix include \
             -I$(com32)/libutil/include -I$(com32)/include $(GPLINCLUDE) \