aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2015-10-06 16:54:43 -0400
committerRalph Amissah <ralph@amissah.com>2015-10-10 11:46:54 -0400
commita575367fdfb179bba69abd5116370f3e436738ec (patch)
tree96818c29bb43fd6ed7bb62eaba3b2a8bfec047d4
parentgdc flags, but gdc compilation still broken (diff)
alternative D compiler debug modes
-rw-r--r--makefile28
1 files changed, 23 insertions, 5 deletions
diff --git a/makefile b/makefile
index 08edd98..5fe6f58 100644
--- a/makefile
+++ b/makefile
@@ -1,22 +1,25 @@
-# dmd
+#DMD=dmd
DMD=dmd
DMD_FLAGS=-de -w
DMD_FLAGS_DEBUG=-unittest -debug=checkdoc -debug=summary
DMD_FLAGS_RELEASE=-release
-DMD_FLAG_BINOF=-of=
-# ldc2
+DMD_FLAG_BINOF=-of
+#LDC=ldc2
LDC=ldc2
LDC_FLAGS=-w
LDC_FLAGS_DEBUG=-unittest -d-debug=checkdoc -d-debug=summary
LDC_FLAGS_RELEASE=-release
LDC_FLAG_BINOF=-of=
-# gdc
+#GDC=gdc
GDC=gdc
+#GDC=gdc-5
GDC_FLAGS=
GDC_FLAGS_DEBUG=-fdebug=checkdoc -fdebug=summary
GDC_FLAGS_RELEASE=-frelease
GDC_FLAG_BINOF=-o
-# D compiler
+## D_COMPILER=DMD
+## D_COMPILER=LDC
+## D_COMPILER=GDC
D_COMPILER=LDC
DC=$($(D_COMPILER))
DC_FLAGS=$($(shell echo $(D_COMPILER)_FLAGS))
@@ -43,6 +46,21 @@ debug: $(PRG_SRCDIR)/$(PRG_SRC)
$(DC_FLAG_BINOF)$(PRG_BINDIR)/$(PRG_BIN) \
$(PRG_SRCDIR)/$(PRG_SRC)
+debug_dmd: $(PRG_SRCDIR)/$(PRG_SRC)
+ $(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) \
+ $(LDC_FLAG_BINOF)$(PRG_BINDIR)/$(PRG_BIN) \
+ $(PRG_SRCDIR)/$(PRG_SRC)
+
+debug_gdc: $(PRG_SRCDIR)/$(PRG_SRC)
+ $(GDC) $(GDC_FLAGS) $(GDC_FLAGS_DEBUG) \
+ $(GDC_FLAG_BINOF)$(PRG_BINDIR)/$(PRG_BIN) \
+ $(PRG_SRCDIR)/$(PRG_SRC)
+
release: $(PRG_SRCDIR)/$(PRG_SRC)
$(DC) $(DC_FLAGS) $(DC_FLAGS_RELEASE) \
$(DC_FLAG_BINOF)$(PRG_BINDIR)/$(PRG_BIN) \