msxbuild/lib/make/麥加系統擴大/mb_msxhub.mk
Willem Cazander b67ba15457
All checks were successful
Run test asserts / Test-Asserts (push) Successful in -11s
WIP moving all flow to namespace.
2024-07-12 17:59:26 +02:00

247 lines
13 KiB
Makefile
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

MB_MSXHUB_API ?= https://msxhub.com/api
$(call mb_make_call,mb_doc_variable_deep,MB_MSXHUB_API,"Resource identifier for msxhub package rest api.")
MB_MSXHUB_CACHE ?= $(MB_OS_CACHE)/msxbuild/msxhub
$(call mb_make_call,mb_doc_variable_deep,MB_MSXHUB_CACHE,"Cache storage location.")
define _mb_msxhub_file_fetch
$(MB_   )$(call mb_make_call,mb_os_echo_command,$(MB_I18N_MSXHUB_FILE_FETCH) $(subst $(MB_MSXHUB_API)/,,$(1)))
$(MB_   )$(if $(wildcard $(dir $(MB_MSXHUB_CACHE)/$(subst $(MB_MSXHUB_API)/,,$(1)))),,$(call mb_make_call,mb_os_dir_create,$(dir $(MB_MSXHUB_CACHE)/$(subst $(MB_MSXHUB_API)/,,$(1)))))
$(MB_   )$(if $(wildcard $(MB_MSXHUB_CACHE)/$(subst $(MB_MSXHUB_API)/,,$(1))),,wget -O $(MB_MSXHUB_CACHE)/$(subst $(MB_MSXHUB_API)/,,$(1)) $(1))
endef
# NOTE: with HDD import/export we get duplicate files after openMSX run, so force to lowercase.
define mb_msxhub_file
$(MB_   )$(if $(wildcard $(MB_MSXHUB_CACHE)/$(2)),,$(call mb_make_call,_mb_msxhub_file_fetch,$(MB_MSXHUB_API)/$(2)))
$(MB_   )$(if $(wildcard $(1)/$(call mb_make_call,mb_make_lowercase,$(notdir $(2)))),,$(call mb_make_call,mb_os_file_copy,$(MB_MSXHUB_CACHE)/$(2),$(1)/$(call mb_make_call,mb_make_lowercase,$(notdir $(2)))))
endef
$(call mb_make_call,mb_doc_function_deep,mb_msxhub_file,"Installs msxsub packages from slug into dir.","<dir> <msxhub-slug>")
#
# Operating System (minimal)
#
define mb_msxhub_get_msxdos1_boot
$(MB_   )$(call mb_make_call,mb_msxhub_file,$(1),MSXDOS1/1.03-2/get/MSXDOS1/MSXDOS.SYS)
$(MB_   )$(call mb_make_call,mb_msxhub_file,$(1),MSXDOS1/1.03-2/get/MSXDOS1/COMMAND.COM)
endef
$(call mb_make_call,mb_doc_function_deep,mb_msxhub_get_msxdos1_boot,"Installs msxdos1 boot files into dir.","<dir>")
define mb_msxhub_get_msxdos2_boot
$(MB_   )$(call mb_make_call,mb_msxhub_file,$(1),MSXDOS2/2.20-1/get/MSXDOS2/MSXDOS2.SYS)
$(MB_   )$(call mb_make_call,mb_msxhub_file,$(1),MSXDOS2/2.20-1/get/MSXDOS2/COMMAND2.COM)
endef
$(call mb_make_call,mb_doc_function_deep,mb_msxhub_get_msxdos2_boot,"Installs msxdos2 boot files into dir.","<dir>")
define mb_msxhub_get_nextor_boot
$(MB_   )$(call mb_make_call,mb_msxhub_file,$(1),NEXTOR/2.1.0-1/get/NEXTOR/NEXTOR.SYS)
$(MB_   )$(call mb_make_call,mb_msxhub_file,$(1),NEXTOR/2.1.0-1/get/NEXTOR/COMMAND2.COM)
endef
$(call mb_make_call,mb_doc_function_deep,mb_msxhub_get_nextor_boot,"Installs nextor boot files into dir.","<dir>")
#
# Native OS utils
#
define mb_msxhub_get_msxdos2_utils
$(MB_   )$(call mb_make_call,mb_msxhub_file,$(1),MSXDOS2/2.20-1/get/MSXDOS2/UTILS/CHKDSK.COM)
$(MB_   )$(call mb_make_call,mb_msxhub_file,$(1),MSXDOS2/2.20-1/get/MSXDOS2/UTILS/DISKCOPY.COM)
$(MB_   )$(call mb_make_call,mb_msxhub_file,$(1),MSXDOS2/2.20-1/get/MSXDOS2/UTILS/FIXDISK.COM)
$(MB_   )$(call mb_make_call,mb_msxhub_file,$(1),MSXDOS2/2.20-1/get/MSXDOS2/UTILS/UNDEL.COM)
$(MB_   )$(call mb_make_call,mb_msxhub_file,$(1),MSXDOS2/2.20-1/get/MSXDOS2/UTILS/XCOPY.COM)
$(MB_   )$(call mb_make_call,mb_msxhub_file,$(1),MSXDOS2/2.20-1/get/MSXDOS2/UTILS/XDIR.COM)
$(MB_   )$(call mb_make_call,mb_msxhub_file,$(1),MSXDOS2/2.20-1/get/MSXDOS2/UTILS/KMODE.COM)
endef
$(call mb_make_call,mb_doc_function,mb_msxhub_get_msxdos2_utils,"Installs msxdos2 util files into dir.","<dir>")
define mb_msxhub_get_nextor_utils
$(MB_   )$(call mb_make_call,mb_msxhub_file,$(1),NEXTOR/2.1.0-1/get/NEXTOR/DELALL.COM)
$(MB_   )$(call mb_make_call,mb_msxhub_file,$(1),NEXTOR/2.1.0-1/get/NEXTOR/DEVINFO.COM)
$(MB_   )$(call mb_make_call,mb_msxhub_file,$(1),NEXTOR/2.1.0-1/get/NEXTOR/DRIVERS.COM)
$(MB_   )$(call mb_make_call,mb_msxhub_file,$(1),NEXTOR/2.1.0-1/get/NEXTOR/DRVINFO.COM)
$(MB_   )$(call mb_make_call,mb_msxhub_file,$(1),NEXTOR/2.1.0-1/get/NEXTOR/FASTOUT.COM)
$(MB_   )$(call mb_make_call,mb_msxhub_file,$(1),NEXTOR/2.1.0-1/get/NEXTOR/LOCK.COM)
$(MB_   )$(call mb_make_call,mb_msxhub_file,$(1),NEXTOR/2.1.0-1/get/NEXTOR/MAPDRV.COM)
$(MB_   )$(call mb_make_call,mb_msxhub_file,$(1),NEXTOR/2.1.0-1/get/NEXTOR/EMUFILE.COM)
$(MB_   )$(call mb_make_call,mb_msxhub_file,$(1),NEXTOR/2.1.0-1/get/NEXTOR/RALLOC.COM)
$(MB_   )$(call mb_make_call,mb_msxhub_file,$(1),NEXTOR/2.1.0-1/get/NEXTOR/Z80MODE.COM)
$(MB_   )$(call mb_make_call,mb_msxhub_file,$(1),NEXTOR/2.1.0-1/get/NEXTOR/NSYSVER.COM)
$(MB_   )$(call mb_make_call,mb_msxhub_file,$(1),NEXTOR/2.1.0-1/get/NEXTOR/NEXBOOT.COM)
$(MB_   )$(call mb_make_call,mb_msxhub_file,$(1),NEXTOR/2.1.0-1/get/NEXTOR/CONCLUS.COM)
endef
$(call mb_make_call,mb_doc_function,mb_msxhub_get_nextor_utils,"Installs nextor util files into dir.","<dir>")
#
# Compilers
#
define mb_msxhub_get_macro80
$(MB_   )$(call mb_make_call,mb_msxhub_file,$(1),MACRO80/2.0-1/get/MACRO80/CREF80.COM)
$(MB_   )$(call mb_make_call,mb_msxhub_file,$(1),MACRO80/2.0-1/get/MACRO80/L80.COM)
$(MB_   )$(call mb_make_call,mb_msxhub_file,$(1),MACRO80/2.0-1/get/MACRO80/LIB80.COM)
$(MB_   )$(call mb_make_call,mb_msxhub_file,$(1),MACRO80/2.0-1/get/MACRO80/M80.COM)
endef
$(call mb_make_call,mb_doc_function,mb_msxhub_get_macro80,"Installs macro80 package into dir.","<dir>")
define mb_msxhub_get_z80asmuk
$(MB_   )$(call mb_make_call,mb_msxhub_file,$(1),Z80ASMUK/3.4-1/get/Z80ASMUK/BINTOASM.COM)
$(MB_   )$(call mb_make_call,mb_msxhub_file,$(1),Z80ASMUK/3.4-1/get/Z80ASMUK/DUMP.COM)
$(MB_   )$(call mb_make_call,mb_msxhub_file,$(1),Z80ASMUK/3.4-1/get/Z80ASMUK/HEXTOCOM.COM)
$(MB_   )$(call mb_make_call,mb_msxhub_file,$(1),Z80ASMUK/3.4-1/get/Z80ASMUK/PRL.COM)
$(MB_   )$(call mb_make_call,mb_msxhub_file,$(1),Z80ASMUK/3.4-1/get/Z80ASMUK/PRNTOSYM.COM)
$(MB_   )$(call mb_make_call,mb_msxhub_file,$(1),Z80ASMUK/3.4-1/get/Z80ASMUK/RSX.COM)
$(MB_   )$(call mb_make_call,mb_msxhub_file,$(1),Z80ASMUK/3.4-1/get/Z80ASMUK/ZSM.COM)
$(MB_   )$(call mb_make_call,mb_msxhub_file,$(1),Z80ASMUK/3.4-1/get/Z80ASMUK/ZSMPP.COM)
$(MB_   )$(call mb_make_call,mb_msxhub_file,$(1),Z80ASMUK/3.4-1/get/Z80ASMUK/HEXTOBIN.COM)
endef
$(call mb_make_call,mb_doc_function,mb_msxhub_get_z80asmuk,"Installs z80asmuk package into dir.","<dir>")
define mb_msxhub_get_wbass2
$(MB_   )$(call mb_make_call,mb_msxhub_file,$(1),WBASS2/2.0-1/get/WBASS2/zoekram.bin)
$(MB_   )$(call mb_make_call,mb_msxhub_file,$(1),WBASS2/2.0-1/get/WBASS2/wbass2.bin)
$(MB_   )$(call mb_make_call,mb_msxhub_file,$(1),WBASS2/2.0-1/get/WBASS2/wbass2.bas)
endef
$(call mb_make_call,mb_doc_function,mb_msxhub_get_wbass2,"Installs wbass2 package into dir.","<dir>")
define mb_msxhub_get_konpass
$(MB_   )$(call mb_make_call,mb_msxhub_file,$(1),KONPASS/1.3.0-1/get/KONPASS/KONPASS.COM)
$(MB_   )$(call mb_make_call,mb_msxhub_file,$(1),KONPASS/1.3.0-1/get/KONPASS/KONPASS.DAT)
endef
$(call mb_make_call,mb_doc_function,mb_msxhub_get_konpass,"Installs konpass package into dir.","<dir>")
#
# Compressors
#
define mb_msxhub_get_pmarc
$(MB_   )$(call mb_make_call,mb_msxhub_file,$(1),PMARC/2.0-1/get/PMARC/PMARC.COM)
$(MB_   )$(call mb_make_call,mb_msxhub_file,$(1),PMARC/2.0-1/get/PMARC/PMCAT.COM)
$(MB_   )$(call mb_make_call,mb_msxhub_file,$(1),PMARC/2.0-1/get/PMARC/PMEXE2.COM)
$(MB_   )$(call mb_make_call,mb_msxhub_file,$(1),PMARC/2.0-1/get/PMARC/PMEXT.COM)
$(MB_   )$(call mb_make_call,mb_msxhub_file,$(1),PMARC/2.0-1/get/PMARC/PMSET.COM)
$(MB_   )$(call mb_make_call,mb_msxhub_file,$(1),PMARC/2.0-1/get/PMARC/PMSFX2.COM)
endef
$(call mb_make_call,mb_doc_function,mb_msxhub_get_pmarc,"Installs pmarc package into dir.","<dir>")
define mb_msxhub_get_lhpack
$(MB_   )$(call mb_make_call,mb_msxhub_file,$(1),LHPACK/1.00-1/get/LHPACK/lhpack.com)
endef
$(call mb_make_call,mb_doc_function,mb_msxhub_get_lhpack,"Installs lhpack package into dir.","<dir>")
define mb_msxhub_get_lhext
$(MB_   )$(call mb_make_call,mb_msxhub_file,$(1),LHEXT/1.34-2/get/LHEXT/lhext.com)
endef
$(call mb_make_call,mb_doc_function,mb_msxhub_get_lhext,"Installs lhext package into dir.","<dir>")
define mb_msxhub_get_gunzip
$(MB_   )$(call mb_make_call,mb_msxhub_file,$(1),GUNZIP/1.1-1/get/GUNZIP/gunzip.com)
endef
$(call mb_make_call,mb_doc_function,mb_msxhub_get_gunzip,"Installs gunzip package into dir.","<dir>")
define mb_msxhub_get_tunzip
$(MB_   )$(call mb_make_call,mb_msxhub_file,$(1),TUNZIP/0.91-1/get/TUNZIP/tunzip.com)
endef
$(call mb_make_call,mb_doc_function,mb_msxhub_get_tunzip,"Installs tunzip package into dir.","<dir>")
define mb_msxhub_get_popcom
$(MB_   )$(call mb_make_call,mb_msxhub_file,$(1),POPCOM/1.00-2/get/POPCOM/popcom.com)
endef
$(call mb_make_call,mb_doc_function,mb_msxhub_get_popcom,"Installs popcom package into dir.","<dir>")
#
# Tools
#
define mb_msxhub_get_make
$(MB_   )$(call mb_make_call,mb_msxhub_file,$(1),MAKE/2.00-1/get/MAKE/MAKE.COM)
endef
$(call mb_make_call,mb_doc_function,mb_msxhub_get_make,"Installs make package into dir.","<dir>")
define mb_msxhub_get_adir
$(MB_   )$(call mb_make_call,mb_msxhub_file,$(1),ADIR/1.3-1/get/ADIR/adir.com)
endef
$(call mb_make_call,mb_doc_function,mb_msxhub_get_adir,"Installs adir package into dir.","<dir>")
define mb_msxhub_get_turbo
$(MB_   )$(call mb_make_call,mb_msxhub_file,$(1),TURBO/2.1-1/get/TURBO/turbo.com)
endef
$(call mb_make_call,mb_doc_function,mb_msxhub_get_turbo,"Installs turbo package into dir.","<dir>")
define mb_msxhub_get_baskom
$(MB_   )$(call mb_make_call,mb_msxhub_file,$(1),BASKOM/1.0-1/get/BASKOM/baskom.com)
endef
$(call mb_make_call,mb_doc_function,mb_msxhub_get_baskom,"Installs baskom package into dir.","<dir>")
define mb_msxhub_get_binldr
$(MB_   )$(call mb_make_call,mb_msxhub_file,$(1),BINLDR/1.0.2-1/get/BINLDR/BINLDR.COM)
endef
$(call mb_make_call,mb_doc_function,mb_msxhub_get_binldr,"Installs binldr package into dir.","<dir>")
define mb_msxhub_get_dmphex
$(MB_   )$(call mb_make_call,mb_msxhub_file,$(1),DMPHEX/1.00-1/get/DMPHEX/dmphex.com)
endef
$(call mb_make_call,mb_doc_function,mb_msxhub_get_dmphex,"Installs dmphex package into dir.","<dir>")
define mb_msxhub_get_zd
$(MB_   )$(call mb_make_call,mb_msxhub_file,$(1),ZD/3.30-1/get/ZD/zd.com)
endef
$(call mb_make_call,mb_doc_function,mb_msxhub_get_zd,"Installs zd package into dir.","<dir>")
define mb_msxhub_get_msxdos2t
$(MB_   )$(call mb_make_call,mb_msxhub_file,$(1),MSXDOS2T/1.0-1/get/MSXDOS2T/ADDAUX.COM)
$(MB_   )$(call mb_make_call,mb_msxhub_file,$(1),MSXDOS2T/1.0-1/get/MSXDOS2T/BEEP.COM)
$(MB_   )$(call mb_make_call,mb_msxhub_file,$(1),MSXDOS2T/1.0-1/get/MSXDOS2T/BIO.COM)
$(MB_   )$(call mb_make_call,mb_msxhub_file,$(1),MSXDOS2T/1.0-1/get/MSXDOS2T/BODY.COM)
$(MB_   )$(call mb_make_call,mb_msxhub_file,$(1),MSXDOS2T/1.0-1/get/MSXDOS2T/BSAVE.COM)
$(MB_   )$(call mb_make_call,mb_msxhub_file,$(1),MSXDOS2T/1.0-1/get/MSXDOS2T/CAL.COM)
$(MB_   )$(call mb_make_call,mb_msxhub_file,$(1),MSXDOS2T/1.0-1/get/MSXDOS2T/CALC.COM)
$(MB_   )$(call mb_make_call,mb_msxhub_file,$(1),MSXDOS2T/1.0-1/get/MSXDOS2T/DUMP.COM)
$(MB_   )$(call mb_make_call,mb_msxhub_file,$(1),MSXDOS2T/1.0-1/get/MSXDOS2T/EXPAND.COM)
$(MB_   )$(call mb_make_call,mb_msxhub_file,$(1),MSXDOS2T/1.0-1/get/MSXDOS2T/GREP.COM)
$(MB_   )$(call mb_make_call,mb_msxhub_file,$(1),MSXDOS2T/1.0-1/get/MSXDOS2T/HEAD.COM)
$(MB_   )$(call mb_make_call,mb_msxhub_file,$(1),MSXDOS2T/1.0-1/get/MSXDOS2T/KEY.COM)
$(MB_   )$(call mb_make_call,mb_msxhub_file,$(1),MSXDOS2T/1.0-1/get/MSXDOS2T/LIST.COM)
$(MB_   )$(call mb_make_call,mb_msxhub_file,$(1),MSXDOS2T/1.0-1/get/MSXDOS2T/LS.COM)
$(MB_   )$(call mb_make_call,mb_msxhub_file,$(1),MSXDOS2T/1.0-1/get/MSXDOS2T/MENU.COM)
$(MB_   )$(call mb_make_call,mb_msxhub_file,$(1),MSXDOS2T/1.0-1/get/MSXDOS2T/MORE.COM)
$(MB_   )$(call mb_make_call,mb_msxhub_file,$(1),MSXDOS2T/1.0-1/get/MSXDOS2T/PATCH.COM)
$(MB_   )$(call mb_make_call,mb_msxhub_file,$(1),MSXDOS2T/1.0-1/get/MSXDOS2T/SLEEP.COM)
$(MB_   )$(call mb_make_call,mb_msxhub_file,$(1),MSXDOS2T/1.0-1/get/MSXDOS2T/TAIL.COM)
$(MB_   )$(call mb_make_call,mb_msxhub_file,$(1),MSXDOS2T/1.0-1/get/MSXDOS2T/TR.COM)
$(MB_   )$(call mb_make_call,mb_msxhub_file,$(1),MSXDOS2T/1.0-1/get/MSXDOS2T/UNIQ.COM)
$(MB_   )$(call mb_make_call,mb_msxhub_file,$(1),MSXDOS2T/1.0-1/get/MSXDOS2T/VIEW.COM)
$(MB_   )$(call mb_make_call,mb_msxhub_file,$(1),MSXDOS2T/1.0-1/get/MSXDOS2T/WC.COM)
endef
$(call mb_make_call,mb_doc_function,mb_msxhub_get_msxdos2t,"Installs msxdos2t package into dir.","<dir>")
#
# Graphics editors
#
define mb_msxhub_get_gfxage
$(MB_   )$(call mb_make_call,mb_msxhub_file,$(1),GFXAGE/0.99-1/get/GFXAGE/gfxage.com)
endef
$(call mb_make_call,mb_doc_function,mb_msxhub_get_gfxage,"Installs gfxage package into dir.","<dir>")