msxbuild/lib/make/天房系統擴展/mb_msxhub.mk

247 lines
13 KiB
Makefile
Raw Normal View History

2021-07-04 00:12:48 +00:00
MB_MSXHUB_API ?= https://msxhub.com/api
2024-07-07 18:53:06 +00:00
$(call mb_make_call,mb_doc_variable_deep,MB_MSXHUB_API,"Resource identifier for msxhub package rest api.")
2024-07-05 22:11:54 +00:00
MB_MSXHUB_CACHE ?= $(MB_OS_CACHE)/msxbuild/msxhub
2024-07-07 18:53:06 +00:00
$(call mb_make_call,mb_doc_variable_deep,MB_MSXHUB_CACHE,"Cache storage location.")
2024-06-20 22:06:06 +00:00
define _mb_msxhub_file_fetch
2024-07-12 15:59:26 +00:00
$(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))
2021-07-04 00:12:48 +00:00
endef
# NOTE: with HDD import/export we get duplicate files after openMSX run, so force to lowercase.
2021-07-04 00:12:48 +00:00
define mb_msxhub_file
2024-07-12 15:59:26 +00:00
$(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)))))
2021-07-04 00:12:48 +00:00
endef
2024-07-07 18:53:06 +00:00
$(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
2024-07-12 15:59:26 +00:00
$(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
2024-07-07 18:53:06 +00:00
$(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
2024-07-12 15:59:26 +00:00
$(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
2024-07-07 18:53:06 +00:00
$(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
2024-07-12 15:59:26 +00:00
$(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
2024-07-07 18:53:06 +00:00
$(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
2024-07-12 15:59:26 +00:00
$(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
2024-07-07 18:53:06 +00:00
$(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
2024-07-12 15:59:26 +00:00
$(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
2024-07-07 18:53:06 +00:00
$(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
2024-07-12 15:59:26 +00:00
$(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
2024-07-07 18:53:06 +00:00
$(call mb_make_call,mb_doc_function,mb_msxhub_get_macro80,"Installs macro80 package into dir.","<dir>")
define mb_msxhub_get_z80asmuk
2024-07-12 15:59:26 +00:00
$(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
2024-07-07 18:53:06 +00:00
$(call mb_make_call,mb_doc_function,mb_msxhub_get_z80asmuk,"Installs z80asmuk package into dir.","<dir>")
2024-06-29 01:36:55 +00:00
define mb_msxhub_get_wbass2
2024-07-12 15:59:26 +00:00
$(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)
2024-06-29 01:36:55 +00:00
endef
2024-07-07 18:53:06 +00:00
$(call mb_make_call,mb_doc_function,mb_msxhub_get_wbass2,"Installs wbass2 package into dir.","<dir>")
2024-06-29 01:42:46 +00:00
define mb_msxhub_get_konpass
2024-07-12 15:59:26 +00:00
$(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)
2024-06-29 01:42:46 +00:00
endef
2024-07-07 18:53:06 +00:00
$(call mb_make_call,mb_doc_function,mb_msxhub_get_konpass,"Installs konpass package into dir.","<dir>")
#
# Compressors
#
define mb_msxhub_get_pmarc
2024-07-12 15:59:26 +00:00
$(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
2024-07-07 18:53:06 +00:00
$(call mb_make_call,mb_doc_function,mb_msxhub_get_pmarc,"Installs pmarc package into dir.","<dir>")
define mb_msxhub_get_lhpack
2024-07-12 15:59:26 +00:00
$(MB_   )$(call mb_make_call,mb_msxhub_file,$(1),LHPACK/1.00-1/get/LHPACK/lhpack.com)
endef
2024-07-07 18:53:06 +00:00
$(call mb_make_call,mb_doc_function,mb_msxhub_get_lhpack,"Installs lhpack package into dir.","<dir>")
define mb_msxhub_get_lhext
2024-07-12 15:59:26 +00:00
$(MB_   )$(call mb_make_call,mb_msxhub_file,$(1),LHEXT/1.34-2/get/LHEXT/lhext.com)
endef
2024-07-07 18:53:06 +00:00
$(call mb_make_call,mb_doc_function,mb_msxhub_get_lhext,"Installs lhext package into dir.","<dir>")
define mb_msxhub_get_gunzip
2024-07-12 15:59:26 +00:00
$(MB_   )$(call mb_make_call,mb_msxhub_file,$(1),GUNZIP/1.1-1/get/GUNZIP/gunzip.com)
endef
2024-07-07 18:53:06 +00:00
$(call mb_make_call,mb_doc_function,mb_msxhub_get_gunzip,"Installs gunzip package into dir.","<dir>")
define mb_msxhub_get_tunzip
2024-07-12 15:59:26 +00:00
$(MB_   )$(call mb_make_call,mb_msxhub_file,$(1),TUNZIP/0.91-1/get/TUNZIP/tunzip.com)
endef
2024-07-07 18:53:06 +00:00
$(call mb_make_call,mb_doc_function,mb_msxhub_get_tunzip,"Installs tunzip package into dir.","<dir>")
define mb_msxhub_get_popcom
2024-07-12 15:59:26 +00:00
$(MB_   )$(call mb_make_call,mb_msxhub_file,$(1),POPCOM/1.00-2/get/POPCOM/popcom.com)
endef
2024-07-07 18:53:06 +00:00
$(call mb_make_call,mb_doc_function,mb_msxhub_get_popcom,"Installs popcom package into dir.","<dir>")
#
# Tools
#
2024-06-29 01:52:54 +00:00
define mb_msxhub_get_make
2024-07-12 15:59:26 +00:00
$(MB_   )$(call mb_make_call,mb_msxhub_file,$(1),MAKE/2.00-1/get/MAKE/MAKE.COM)
2024-06-29 01:52:54 +00:00
endef
2024-07-07 18:53:06 +00:00
$(call mb_make_call,mb_doc_function,mb_msxhub_get_make,"Installs make package into dir.","<dir>")
define mb_msxhub_get_adir
2024-07-12 15:59:26 +00:00
$(MB_   )$(call mb_make_call,mb_msxhub_file,$(1),ADIR/1.3-1/get/ADIR/adir.com)
endef
2024-07-07 18:53:06 +00:00
$(call mb_make_call,mb_doc_function,mb_msxhub_get_adir,"Installs adir package into dir.","<dir>")
define mb_msxhub_get_turbo
2024-07-12 15:59:26 +00:00
$(MB_   )$(call mb_make_call,mb_msxhub_file,$(1),TURBO/2.1-1/get/TURBO/turbo.com)
endef
2024-07-07 18:53:06 +00:00
$(call mb_make_call,mb_doc_function,mb_msxhub_get_turbo,"Installs turbo package into dir.","<dir>")
define mb_msxhub_get_baskom
2024-07-12 15:59:26 +00:00
$(MB_   )$(call mb_make_call,mb_msxhub_file,$(1),BASKOM/1.0-1/get/BASKOM/baskom.com)
endef
2024-07-07 18:53:06 +00:00
$(call mb_make_call,mb_doc_function,mb_msxhub_get_baskom,"Installs baskom package into dir.","<dir>")
define mb_msxhub_get_binldr
2024-07-12 15:59:26 +00:00
$(MB_   )$(call mb_make_call,mb_msxhub_file,$(1),BINLDR/1.0.2-1/get/BINLDR/BINLDR.COM)
endef
2024-07-07 18:53:06 +00:00
$(call mb_make_call,mb_doc_function,mb_msxhub_get_binldr,"Installs binldr package into dir.","<dir>")
define mb_msxhub_get_dmphex
2024-07-12 15:59:26 +00:00
$(MB_   )$(call mb_make_call,mb_msxhub_file,$(1),DMPHEX/1.00-1/get/DMPHEX/dmphex.com)
endef
2024-07-07 18:53:06 +00:00
$(call mb_make_call,mb_doc_function,mb_msxhub_get_dmphex,"Installs dmphex package into dir.","<dir>")
2024-06-29 01:52:54 +00:00
define mb_msxhub_get_zd
2024-07-12 15:59:26 +00:00
$(MB_   )$(call mb_make_call,mb_msxhub_file,$(1),ZD/3.30-1/get/ZD/zd.com)
2024-06-29 01:52:54 +00:00
endef
2024-07-07 18:53:06 +00:00
$(call mb_make_call,mb_doc_function,mb_msxhub_get_zd,"Installs zd package into dir.","<dir>")
define mb_msxhub_get_msxdos2t
2024-07-12 15:59:26 +00:00
$(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)
2024-06-28 23:01:17 +00:00
endef
2024-07-07 18:53:06 +00:00
$(call mb_make_call,mb_doc_function,mb_msxhub_get_msxdos2t,"Installs msxdos2t package into dir.","<dir>")
#
# Graphics editors
#
define mb_msxhub_get_gfxage
2024-07-12 15:59:26 +00:00
$(MB_   )$(call mb_make_call,mb_msxhub_file,$(1),GFXAGE/0.99-1/get/GFXAGE/gfxage.com)
endef
2024-07-07 18:53:06 +00:00
$(call mb_make_call,mb_doc_function,mb_msxhub_get_gfxage,"Installs gfxage package into dir.","<dir>")