aboutsummaryrefslogtreecommitdiffstats
path: root/mk
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2011-06-27 18:37:00 -0700
committerH. Peter Anvin <hpa@zytor.com>2011-06-27 18:37:00 -0700
commitde86893bf5692743983420bad1a3b37fbb8dbdd2 (patch)
tree0efdcdb9b94ead1ce0fd60c8b4cb3b882543975f /mk
parent822623d3583ac8a32c75f8fb98a1121c1d7a6c01 (diff)
downloadsyslinux-de86893bf5692743983420bad1a3b37fbb8dbdd2.tar.gz
syslinux-de86893bf5692743983420bad1a3b37fbb8dbdd2.tar.xz
syslinux-de86893bf5692743983420bad1a3b37fbb8dbdd2.zip
core: Add "dprint" facility to assembly
Add a "dprint" facility to the assembly files, which simply calls dprintf if debugging is enabled. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'mk')
-rw-r--r--mk/syslinux.mk11
1 files changed, 7 insertions, 4 deletions
diff --git a/mk/syslinux.mk b/mk/syslinux.mk
index 6d87187f..5b7100f7 100644
--- a/mk/syslinux.mk
+++ b/mk/syslinux.mk
@@ -32,8 +32,13 @@ COM32DIR = $(AUXDIR)/com32
BOOTDIR = /boot
EXTLINUXDIR = $(BOOTDIR)/extlinux
+ifdef DEBUG
+# This allows DEBUGOPT to be set from the command line
+DEBUGOPT = -DDEBUG=$(DEBUG)
+endif
+
NASM = nasm
-NASMOPT = -Ox
+NASMOPT = -Ox $(DEBUGOPT)
PERL = perl
UPX = upx
@@ -66,9 +71,7 @@ WGET = wget
com32 = $(topdir)/com32
# Common warnings we want for all gcc-generated code
-GCCWARN := -W -Wall -Wstrict-prototypes
-# Extremely useful variant for debugging...
-#GCCWARN += -Wno-clobbered -Werror
+GCCWARN = -W -Wall -Wstrict-prototypes $(DEBUGOPT)
# Common stanza to make gcc generate .*.d dependency files
MAKEDEPS = -Wp,-MT,$@,-MD,$(dir $@).$(notdir $@).d