From a575367fdfb179bba69abd5116370f3e436738ec Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Tue, 6 Oct 2015 16:54:43 -0400 Subject: alternative D compiler debug modes --- makefile | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) (limited to 'makefile') 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) \ -- cgit v1.2.3