| summaryrefslogtreecommitdiff | 
diff options
| author | nsensfel <SpamShield0@noot-noot.org> | 2018-04-10 14:35:46 +0200 | 
|---|---|---|
| committer | nsensfel <SpamShield0@noot-noot.org> | 2018-04-10 14:35:46 +0200 | 
| commit | 0624b9920ea537f399c87f6a1ab2f0bc714b3a47 (patch) | |
| tree | ed90a0a9c88a508c0bc10a92217bd51b327efa7d /src/battlemap/mk/debug.mk | |
| parent | 1001c3f6cfefd880c1721f2b80c1795197d05365 (diff) | |
Cleaning up the module's makefiles...
Diffstat (limited to 'src/battlemap/mk/debug.mk')
| -rw-r--r-- | src/battlemap/mk/debug.mk | 39 | 
1 files changed, 39 insertions, 0 deletions
| diff --git a/src/battlemap/mk/debug.mk b/src/battlemap/mk/debug.mk new file mode 100644 index 0000000..2b98ff3 --- /dev/null +++ b/src/battlemap/mk/debug.mk @@ -0,0 +1,39 @@ +################################################################################ +## CONFIG ###################################################################### +################################################################################ +DIALYZER_PLT_FILE ?= tacticians-server.plt +DIALYZER ?= dialyzer + +################################################################################ +## MAKEFILE MAGIC ############################################################## +################################################################################ +SRC_FILES ?= $(wildcard $(SRC_DIR)/*.erl $(SRC_DIR)/*/*.erl) + +################################################################################ +## SANITY CHECKS ############################################################### +################################################################################ + +################################################################################ +## TARGET RULES ################################################################ +################################################################################ +DEBUG_RESULT = $(DIALYZER_PLT_FILE) + +debug_rebuild: +	$(MAKE) clean +	$(MAKE) ERLC_OPTS=+debug_info + +################################################################################ +## INTERNAL RULES ############################################################## +################################################################################ +ifeq ($(wildcard $(DIALYZER_PLT_FILE)),) +debug_run: +	$(DIALYZER) --build_plt --apps erts kernel stdlib jiffy --output_plt $@ +	$(MAKE) debug_rebuild +	$(DIALYZER) --add_to_plt --plt $@ -r $(BIN_DIR) +else +debug_run: +	$(MAKE) debug_rebuild +	$(DIALYZER) --check_plt --plt $(DIALYZER_PLT_FILE) +	$(DIALYZER) --get_warnings $(SRC_DIR)/*.erl $(SRC_DIR)/*/*.erl \ +		--src --plt $(DIALYZER_PLT_FILE) +endif | 


