aboutsummaryrefslogtreecommitdiffhomepage
path: root/makefile
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2015-10-21 11:57:39 -0400
committerRalph Amissah <ralph@amissah.com>2015-10-21 11:57:39 -0400
commit263375c3a4726f1b3d503a9d7d2be3fea9d38246 (patch)
treea2088a4933bdf0e188dd1a6576f91f2824d62dd8 /makefile
parentmaker.org make setting debug flags more straightforward (diff)
maker.org make setting debug flags more straightforward
Diffstat (limited to 'makefile')
-rw-r--r--makefile34
1 files changed, 18 insertions, 16 deletions
diff --git a/makefile b/makefile
index d8bee00..6f9b746 100644
--- a/makefile
+++ b/makefile
@@ -15,27 +15,29 @@ GDC_FLAGS_RELEASE=-frelease
GDC_FLAG_BINOF=-o
# set D_COMPILER one of DMD LDC or GDC:
-D_COMPILER=LDC
+SET_D_COMPILER=LDC
-SET_DC_FLAGS_DEBUG=-unittest -debug=checkdoc -debug=summary
SET_DC_FLAGS_DEBUG_EXTRA=-debug=headings -debug=bookindex
-DC=$($(D_COMPILER))
-DC_FLAGS=$($(shell echo $(D_COMPILER)_FLAGS))
-DC_FLAGS_RELEASE=$($(shell echo $(D_COMPILER)_FLAGS_RELEASE))
-DC_FLAG_BINOF=$($(shell echo $(D_COMPILER)_FLAG_BINOF))
+DC=$($(SET_D_COMPILER))
+DC_FLAGS=$($(shell echo $(SET_D_COMPILER)_FLAGS))
+DC_FLAGS_RELEASE=$($(shell echo $(SET_D_COMPILER)_FLAGS_RELEASE))
+DC_FLAG_BINOF=$($(shell echo $(SET_D_COMPILER)_FLAG_BINOF))
+#DC_FLAGS=$($(shell echo $(DC)_FLAGS))
+#DC_FLAGS_RELEASE=$($(shell echo $(DC)_FLAGS_RELEASE))
+#DC_FLAG_BINOF=$($(shell echo $(DC)_FLAG_BINOF))
+DC_FLAGS_DEBUG_DEFAULT_SET=-unittest -debug=checkdoc -debug=summary
+DC_FLAGS_DEBUG_SET=\
+ $(shell echo $(DC_FLAGS_DEBUG_DEFAULT_SET) $(SET_DC_FLAGS_DEBUG_EXTRA))
ifeq ($(DC), $(DMD))
- DC_FLAGS_DEBUG :=$(shell echo $(SET_DC_FLAGS_DEBUG))
- DC_FLAGS_DEBUG_EXTRA :=$(shell echo $(SET_DC_FLAGS_DEBUG_EXTRA))
+ DC_FLAGS_DEBUG :=$(shell echo $(DC_FLAGS_DEBUG_SET))
endif
ifeq ($(DC) ,$(LDC))
- DC_FLAGS_DEBUG :=$(shell echo $(SET_DC_FLAGS_DEBUG)| sed -e "s/-debug=/-d-debug=/g")
- DC_FLAGS_DEBUG_EXTRA :=$(shell echo $(SET_DC_FLAGS_DEBUG_EXTRA)| sed -e "s/-debug=/-d-debug=/g")
+ DC_FLAGS_DEBUG :=$(shell echo $(DC_FLAGS_DEBUG_SET)| sed -e "s/-debug=/-d-debug=/g")
endif
ifeq ($(DC), $(GDC))
- DC_FLAGS_DEBUG :=$(shell echo $(SET_DC_FLAGS_DEBUG)| sed -e "s/-debug/-fdebug/g")
- DC_FLAGS_DEBUG_EXTRA :=$(shell echo $(SET_DC_FLAGS_DEBUG_EXTRA)| sed -e "s/-debug/-fdebug/g")
+ DC_FLAGS_DEBUG :=$(shell echo $(DC_FLAGS_DEBUG_SET)| sed -e "s/-debug/-fdebug/g")
endif
PRG_NAME=sdp
@@ -62,22 +64,22 @@ build: $(PRG_SRCDIR)/$(PRG_SRC)
rebuild: $(PRG_SRCDIR)/$(PRG_SRC) $(PRG_BINDIR)/$(PRG_BIN).o clean build
debug: $(PRG_SRCDIR)/$(PRG_SRC)
- $(DC) $(DC_FLAGS) $(DC_FLAGS_DEBUG) $(DC_FLAGS_DEBUG_EXTRA) \
+ $(DC) $(DC_FLAGS) $(DC_FLAGS_DEBUG) \
$(DC_FLAG_BINOF)$(PRG_BINDIR)/$(PRG_BIN) \
$(PRG_SRCDIR)/$(PRG_SRC)
debug_dmd: $(PRG_SRCDIR)/$(PRG_SRC)
- $(DMD) $(DMD_FLAGS) $(DMD_FLAGS_DEBUG) $(DC_FLAGS_DEBUG_EXTRA) \
+ $(DMD) $(DMD_FLAGS) $(DMD_FLAGS_DEBUG) \
$(DMD_FLAG_BINOF)$(PRG_BINDIR)/$(PRG_BIN) \
$(PRG_SRCDIR)/$(PRG_SRC)
debug_ldc: $(PRG_SRCDIR)/$(PRG_SRC)
- $(LDC) $(LDC_FLAGS) $(LDC_FLAGS_DEBUG) $(DC_FLAGS_DEBUG_EXTRA) \
+ $(LDC) $(LDC_FLAGS) $(LDC_FLAGS_DEBUG) \
$(LDC_FLAG_BINOF)$(PRG_BINDIR)/$(PRG_BIN) \
$(PRG_SRCDIR)/$(PRG_SRC)
debug_gdc: $(PRG_SRCDIR)/$(PRG_SRC)
- $(GDC) $(GDC_FLAGS) $(GDC_FLAGS_DEBUG) $(DC_FLAGS_DEBUG_EXTRA) \
+ $(GDC) $(GDC_FLAGS) $(GDC_FLAGS_DEBUG) \
$(GDC_FLAG_BINOF)$(PRG_BINDIR)/$(PRG_BIN) \
$(PRG_SRCDIR)/$(PRG_SRC)