Updated to lastest msxbuild
This commit is contained in:
parent
59b4c71fad
commit
ca8f575d2d
26 changed files with 118 additions and 224 deletions
112
Makefile
112
Makefile
|
|
@ -1,102 +1,32 @@
|
|||
#
|
||||
# Single top level makefile
|
||||
# Top level makefile for dome
|
||||
#
|
||||
|
||||
rwildcard = $(foreach d,$(wildcard $1*),$(call rwildcard,$d/,$2) $(filter $(subst *,%,$2),$d))
|
||||
MODULES := $(call rwildcard, src, */0module.mk)
|
||||
MODULES_LIB := $(call rwildcard, src, */0module.lib.mk)
|
||||
|
||||
-include build/local.inc.mk
|
||||
include build/env.inc.mk
|
||||
include $(MODULES_LIB)
|
||||
include $(MODULES)
|
||||
|
||||
rwildcard = $(foreach d,$(wildcard $1*),$(call rwildcard,$d/,$2) $(filter $(subst *,%,$2),$d))
|
||||
INC_MODS := $(call rwildcard, src, */0module.mk)
|
||||
INC_LIBS := $(call rwildcard, src, */0module.lib.mk)
|
||||
PATH_BIN := bin
|
||||
PATH_SRC := src
|
||||
BUILD_ALL := "Use 'make help' for possible targets."
|
||||
BUILD_HELP := "Use one of the following build targets;"
|
||||
MB_OPENMSX_JOYPORTA := mouse
|
||||
|
||||
.SUFFIXES:
|
||||
.PHONY: all
|
||||
all:
|
||||
@echo TODO: All is build.
|
||||
@echo $(BUILD_ALL)
|
||||
|
||||
.PHONY: test
|
||||
test:
|
||||
@echo TODO: Testing
|
||||
BUILD_HELP += \\n\\t* help
|
||||
.PHONY: help
|
||||
help:
|
||||
@echo $(BUILD_HELP)
|
||||
|
||||
BUILD_HELP += \\n\\t* clean
|
||||
.PHONY: clean
|
||||
clean:
|
||||
@echo === Cleaning
|
||||
$(RM) .openmsx.cnt;
|
||||
@test $(PATH_BIN) && $(RM) -r $(PATH_BIN);
|
||||
$(call mb_clean,$(PATH_BIN))
|
||||
|
||||
|
||||
define mod_mkdir
|
||||
@echo === Create module build folder.
|
||||
$(MKDIR) $(1)
|
||||
endef
|
||||
|
||||
define mod_compile_asm
|
||||
@echo === Compile module asm.
|
||||
$(SDASM) $(SDASM_FLAGS) -I$(LIBASM_SRC)/include $(1) $(2)
|
||||
endef
|
||||
|
||||
define mod_link_asm_lib
|
||||
@echo === Link module asm lib.
|
||||
$(SDAR) $(SDAR_FLAGS) $(1) $(2)
|
||||
endef
|
||||
|
||||
define mod_link_asm_dos
|
||||
@echo === Link module asm dos.
|
||||
$(SDCC) $(SDCC_FLAG_CPU) --no-std-crt0 --code-loc 0x0100 -o $(1) $(2)
|
||||
endef
|
||||
define mod_link_asm_1000
|
||||
@echo === Link module asm 0x1000.
|
||||
$(SDCC) $(SDCC_FLAG_CPU) --no-std-crt0 --code-loc 0x1000 -o $(1) $(2)
|
||||
endef
|
||||
define mod_link_asm_4000
|
||||
@echo === Link module asm 0x4000.
|
||||
$(SDCC) $(SDCC_FLAG_CPU) --no-std-crt0 --code-loc 0x4000 -o $(1) $(2)
|
||||
endef
|
||||
define mod_link_asm_8000
|
||||
@echo === Link module asm 0x8000.
|
||||
$(SDCC) $(SDCC_FLAG_CPU) --no-std-crt0 --code-loc 0x8000 -o $(1) $(2)
|
||||
endef
|
||||
#-l$(LIBASM_LINK)
|
||||
|
||||
define mod_hex2com
|
||||
@echo === Convert to binary
|
||||
cd $(dir $(1)) && $(H2B) -e com $(notdir $(1));
|
||||
@sha1sum $(2);
|
||||
@echo === Done $(notdir $(2))
|
||||
endef
|
||||
define mod_hex2dat
|
||||
@echo === Convert to binary
|
||||
cd $(dir $(1)) && $(H2B) -e dat $(notdir $(1));
|
||||
@sha1sum $(2);
|
||||
@echo === Done $(notdir $(2))
|
||||
endef
|
||||
|
||||
#-diska $(1)
|
||||
define run_openmsx
|
||||
echo "." >> .openmsx.cnt;
|
||||
FAIL_AFTER_BOOT=$(OPENMSX_BOOT_TIMEOUT) \
|
||||
FAIL_AFTER_PATH=bin \
|
||||
BOOT_HDD_PATH="$(1)" \
|
||||
BOOT_HDD_IMAGE="$(1)/../dsk.img" \
|
||||
RENDERER=None \
|
||||
THROTTLE=off \
|
||||
SPEED=333 \
|
||||
JOYPORTA=mouse \
|
||||
$(OPENMSX) -setting $(realpath build/openmsx-settings.xml) -machine $(OPENMSX_MACHINE) $(OPENMSX_ARGS)
|
||||
endef
|
||||
define run_openmsx_tools
|
||||
cp build/tools/* $(1);
|
||||
$(call run_openmsx, $(1))
|
||||
endef
|
||||
define run_openmsx_dos1
|
||||
@echo === Run openmsx_dos1
|
||||
cp build/msxdos1/* $(1);
|
||||
$(call run_openmsx_tools, $(1))
|
||||
endef
|
||||
define run_openmsx_dos2
|
||||
@echo === Run openmsx_dos2
|
||||
cp build/msxdos2/* $(1);
|
||||
$(call run_openmsx_tools, $(1))
|
||||
endef
|
||||
-include Makelocal.mk
|
||||
include $(PATH_MSXBUILD)/lib/make/msxbuild.mk
|
||||
include $(INC_LIBS)
|
||||
include $(INC_MODS)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue