Moved openMSX and SDCC to default search path by default.
All checks were successful
Run test asserts / Test-Asserts (push) Successful in -6s

This commit is contained in:
Willem Cazander 2024-07-10 20:48:32 +02:00
parent bb31f0d186
commit 3d2443dc46
2 changed files with 19 additions and 9 deletions

View file

@ -1,6 +1,6 @@
MB_SDCC_PATH ?= /usr/bin
$(call mb_make_call,mb_doc_variable,MB_SDCC_PATH,"Path where SDCC binaries are located.")
MB_SDCC_PATH ?=
$(call mb_make_call,mb_doc_variable,MB_SDCC_PATH,"Optional path where SDCC binaries are located.")
MB_SDCC_FLAG_CPU ?= -mz80
$(call mb_make_call,mb_doc_variable_deep,MB_SDCC_FLAG_CPU,"The SDCC cpu target option.")
@ -23,23 +23,28 @@ $(call mb_make_call,mb_doc_variable_deep,MB_SDCC_AR_FLAGS,"The SDCC module archi
#-l$(LIBASM_LINK)
define _mb_sdcc_path
$(MB__    )$(if $(MB_SDCC_PATH),$(MB_SDCC_PATH)/$(1),$(1))
endef
define mb_sdcc_compile_asm
$(MB__    )$(call mb_make_call,mb_os_echo_command,$(MB_I18N_SDCC_COMPILE) $(2) - ASM)
$(MB__    )$(MB_SDCC_PATH)/sdasz80 $(MB_SDCC_ASZ80_FLAGS) $(2) $(1)
$(MB__    )$(call mb_make_call,_mb_sdcc_path,sdasz80) $(MB_SDCC_ASZ80_FLAGS) $(2) $(1)
endef
$(call mb_make_call,mb_doc_function,mb_sdcc_compile_asm,"Compiles asm source code.","<in> <out>")
define mb_sdcc_arlib_asm
$(MB__    )$(call mb_make_call,mb_os_echo_command,$(MB_I18N_SDCC_ARLIB) $(2))
$(MB__    )$(MB_SDCC_PATH)/sdar $(MB_SDCC_AR_FLAGS) $(1) $(2)
$(MB__    )$(call mb_make_call,_mb_sdcc_path,sdar) $(MB_SDCC_AR_FLAGS) $(1) $(2)
endef
$(call mb_make_call,mb_doc_function,mb_sdcc_arlib_asm,"Link asm lib module.","<in> <out>")
define mb_sdcc_link_asm
$(MB__    )$(call mb_make_call,mb_os_echo_command,$(MB_I18N_SDCC_LINK) $(2) - ASM @ $(3))
$(MB__    )$(MB_SDCC_PATH)/sdcc $(MB_SDCC_FLAG_CPU) $(MB_SDCC_CC_FLAGS) --no-std-crt0 --code-loc $(3) -o $(2) $(1)
$(MB__    )$(call mb_make_call,_mb_sdcc_path,sdcc) $(MB_SDCC_FLAG_CPU) $(MB_SDCC_CC_FLAGS) --no-std-crt0 --code-loc $(3) -o $(2) $(1)
endef
$(call mb_make_call,mb_doc_function,mb_sdcc_link_asm,"Links asm to custom code location.","<in> <out> <code-loc>")
@ -88,7 +93,7 @@ $(call mb_make_call,mb_doc_function,mb_sdcc_link_asm_bdos,"Links asm to BDOS.","
define mb_sdcc_objcopy
$(MB__    )$(call mb_make_call,mb_os_echo_command,$(MB_I18N_SDCC_OBJCOPY) $(2))
$(MB__    )$(MB_SDCC_PATH)/sdobjcopy -I ihex --output-target$(MB_MAKE_EQUALS)binary $(1) $(2)
$(MB__    )$(call mb_make_call,_mb_sdcc_path,sdobjcopy) -I ihex --output-target$(MB_MAKE_EQUALS)binary $(1) $(2)
endef
$(call mb_make_call,mb_doc_function,mb_sdcc_objcopy,"Converts an hex file to binary.","<in> <out>")

View file

@ -1,6 +1,6 @@
MB_OPENMSX_PATH ?= /usr/bin
$(call mb_make_call,mb_doc_variable,MB_OPENMSX_PATH,"Path where openMSX binary is located.")
MB_OPENMSX_PATH ?=
$(call mb_make_call,mb_doc_variable,MB_OPENMSX_PATH,"Optional path where openMSX binary is located.")
MB_OPENMSX_BOOT_TIMEOUT ?= 25
$(call mb_make_call,mb_doc_variable,MB_OPENMSX_BOOT_TIMEOUT,"Timeout in seconds to guard for boot failures.")
@ -63,6 +63,11 @@ endef
$(call mb_make_call,mb_doc_function_deep,mb_openmsx_setup,"Setup openMSX local build home folder for machine.","<dir> <machine>")
define _mb_openmsx_path
$(MB__    )$(if $(MB_OPENMSX_PATH),$(MB_OPENMSX_PATH)/$(1),$(1))
endef
define _mb_openmsx_run
$(MB__    )$(call mb_make_call,mb_os_echo_command,$(MB_I18N_OPENMSX_STARTUP) $@ - $(2))
$(MB__    )$(if $(wildcard $(1)-omsx/persistent/fire-hdd/untitled1/sync),,$(call mb_make_call,mb_os_dir_create,$(1)-omsx/persistent/fire-hdd/untitled1/sync))
@ -80,7 +85,7 @@ $(MB__    )NF_PREFIX=$(MB_FLIGHT_PREFIX) \
$(MB__    )NF_SEPERATOR=$(MB_FLIGHT_SEPERATOR) \
$(MB__    )NF_RECORD_FLAG=$(MB_FLIGHT_RECORD_FLAG) \
$(MB__    )OPENMSX_HOME="$(1)-omsx" \
$(MB__    )$(MB_OPENMSX_PATH)/openmsx \
$(MB__    )$(call mb_make_call,_mb_openmsx_path,openmsx) \
$(MB__        )-machine $(2) \
$(MB__        )-ext slotexpander \
$(MB__        )-ext fire-hdd \