msxbuild/src/ahello-m80/0module.mk

39 lines
1.5 KiB
Makefile
Raw Normal View History

AHELLO_M80_MOD := ahello-m80
AHELLO_M80_SRC := $(PATH_SRC)/$(AHELLO_M80_MOD)
AHELLO_M80_BIN := $(PATH_BIN)/$(AHELLO_M80_MOD)
BUILD_HELP += \\n\\t* $(AHELLO_M80_BIN)/ahello.com\\n\\t* ahello-m80-run\\n\\t* ahello-m80-assert
$(AHELLO_M80_BIN):
$(call mb_mkdir,$(AHELLO_M80_BIN))
$(call mb_mkdir,$(AHELLO_M80_BIN)/utils)
$(call mb_msxhub_get_macro80,$(AHELLO_M80_BIN)/utils)
$(call mb_msxhub_get_z80asmuk,$(AHELLO_M80_BIN)/utils)
$(AHELLO_M80_BIN)/%.mac: $(AHELLO_M80_SRC)/%.mac | $(AHELLO_M80_BIN)
$(call mb_unix2dos,$<,$@)
$(AHELLO_M80_BIN)/ahello.rel: $(AHELLO_M80_BIN)/ahello.mac
$(call mb_autoexec_safe_cmd,$(AHELLO_M80_BIN),m80 =ahello/Z)
$(call mb_openmsx_dosctl,$(AHELLO_M80_BIN))
$(AHELLO_M80_BIN)/ahello.hex: $(AHELLO_M80_BIN)/ahello.rel
$(call mb_autoexec_safe_cmd,$(AHELLO_M80_BIN),l80 ahello$(MB_COMMA)ahello/N/X/Y/E)
$(call mb_openmsx_dosctl,$(AHELLO_M80_BIN))
$(AHELLO_M80_BIN)/ahello.com: $(AHELLO_M80_BIN)/ahello.hex
$(call mb_autoexec_safe_cmd,$(AHELLO_M80_BIN),hextocom ahello)
$(call mb_openmsx_dosctl,$(AHELLO_M80_BIN))
.PHONY: ahello-m80-run
ahello-m80-run: $(AHELLO_M80_BIN)/ahello.com
$(call mb_autoexec_show_gui80,$(AHELLO_M80_BIN))
$(call mb_openmsx_dosctl,$(AHELLO_M80_BIN))
.PHONY: ahello-m80-assert
ahello-m80-assert: $(AHELLO_M80_BIN)/ahello.com
$(call mb_delete,$(AHELLO_M80_BIN)/ahello.out)
$(call mb_autoexec_safe_test,$(AHELLO_M80_BIN),ahello > ahello.out)
$(call mb_openmsx_dosctl,$(AHELLO_M80_BIN))
grep "M80: Hello world..." $(AHELLO_M80_BIN)/ahello.out