diff options
| author | Ralph Amissah <ralph@amissah.com> | 2015-10-21 11:57:39 -0400 | 
|---|---|---|
| committer | Ralph Amissah <ralph@amissah.com> | 2015-10-21 11:57:39 -0400 | 
| commit | 263375c3a4726f1b3d503a9d7d2be3fea9d38246 (patch) | |
| tree | a2088a4933bdf0e188dd1a6576f91f2824d62dd8 /makefile | |
| parent | maker.org make setting debug flags more straightforward (diff) | |
maker.org make setting debug flags more straightforward
Diffstat (limited to 'makefile')
| -rw-r--r-- | makefile | 34 | 
1 files changed, 18 insertions, 16 deletions
| @@ -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) | 
