2024-07-12 20:35:33 +00:00
|
|
|
|
#
|
|
|
|
|
# msxbuild.mk - Makefile helper to use with msx projects.
|
|
|
|
|
#
|
2024-07-12 22:14:51 +00:00
|
|
|
|
# Make make, make behave;
|
|
|
|
|
MAKEFLAGS += --no-builtin-rules
|
|
|
|
|
MAKEFLAGS += --no-builtin-variables
|
|
|
|
|
MAKEFLAGS += --warn-undefined-variables
|
|
|
|
|
.DELETE_ON_ERROR :=
|
|
|
|
|
.RECIPEPREFIX := $(if $(.RECIPEPREFIX),$(.RECIPEPREFIX),>)
|
|
|
|
|
.SUFFIXES :=
|
|
|
|
|
.ONESHELL :=
|
|
|
|
|
.SHELLFLAGS := -e -u -o pipefail -c
|
|
|
|
|
SHELL := bash
|
|
|
|
|
ifeq ($(origin .RECIPEPREFIX), undefined)
|
2024-07-13 10:53:02 +00:00
|
|
|
|
$(error This version of make does not support dynamic white space brain fuck mode.)
|
2024-07-12 22:14:51 +00:00
|
|
|
|
endif
|
2024-07-16 14:45:37 +00:00
|
|
|
|
#########################################################
|
|
|
|
|
### IN THIS FILE NEVER USE A WHITE SPACE OR TAB SPACE ###
|
|
|
|
|
#########################################################
|
2024-07-12 22:14:51 +00:00
|
|
|
|
|
|
|
|
|
# Set some root variable to use in this library
|
2024-07-12 20:35:33 +00:00
|
|
|
|
MB_@RECIPE := ]
|
|
|
|
|
MB_@RECIPEPREFIX := $(.RECIPEPREFIX)
|
|
|
|
|
MB_@BASEPATH := $(dir $(lastword $(MAKEFILE_LIST)))
|
2024-07-14 18:53:44 +00:00
|
|
|
|
MB_@WORK := /../_work/
|
2024-07-18 09:28:57 +00:00
|
|
|
|
MB_@GRAPH_CHAIN :=
|
2024-07-12 20:35:33 +00:00
|
|
|
|
|
|
|
|
|
# Build multiple groups of chains of includes
|
2024-07-16 14:45:37 +00:00
|
|
|
|
define __mb-include
|
|
|
|
|
ifdef DEBUG
|
|
|
|
|
ifneq ("$$(DEBUG)", "off")
|
|
|
|
|
$$(warning DEBUG $(0) ($(1)))
|
|
|
|
|
endif
|
|
|
|
|
endif
|
2024-07-12 20:35:33 +00:00
|
|
|
|
.PHONY: $(MB_@BASEPATH)$(1)
|
|
|
|
|
include $(MB_@BASEPATH)$(1)
|
2024-07-18 09:28:57 +00:00
|
|
|
|
$(MB_@BASEPATH)$(1): $(MB_@GRAPH_CHAIN)
|
|
|
|
|
MB_@GRAPH_CHAIN := $(MB_@BASEPATH)$(1)
|
2024-07-12 20:35:33 +00:00
|
|
|
|
endef
|
|
|
|
|
|
|
|
|
|
# Include full library grouped in functional blocks
|
2024-07-18 09:28:57 +00:00
|
|
|
|
MB_@GRAPH_CHAIN := @@include-parent
|
2024-07-16 14:45:37 +00:00
|
|
|
|
$(eval $(call __mb-include,make/सिस्टमₚᵣₐᵧToੴ/mb_xxx.mk))
|
|
|
|
|
$(eval $(call __mb-include,make/सिस्टमₚᵣₐᵧToੴ/mb_doc.mk))
|
|
|
|
|
$(eval $(call __mb-include,make/सिस्टमₚᵣₐᵧToੴ/mb_make_call.mk))
|
2024-07-18 11:25:50 +00:00
|
|
|
|
$(eval $(call __mb-include,make/सिस्टमₚᵣₐᵧToੴ/mb_make_space.mk))
|
|
|
|
|
$(eval $(call __mb-include,make/सिस्टमₚᵣₐᵧToੴ/mb_make_doc4u.mk))
|
2024-07-16 14:45:37 +00:00
|
|
|
|
$(eval $(call __mb-include,make/सिस्टमₚᵣₐᵧToੴ/mb_make_check.mk))
|
|
|
|
|
$(eval $(call __mb-include,make/सिस्टमₚᵣₐᵧToੴ/mb_make_module.mk))
|
|
|
|
|
$(eval $(call __mb-include,make/सिस्टमₚᵣₐᵧToੴ/mb_make_xml.mk))
|
|
|
|
|
$(eval $(call __mb-include,make/सिस्टमₚᵣₐᵧToੴ/mb_make.mk))
|
2024-07-18 09:28:57 +00:00
|
|
|
|
@@include-libs:: $(MB_@GRAPH_CHAIN)
|
|
|
|
|
MB_@GRAPH_CHAIN := @@include-parent
|
2024-07-16 14:45:37 +00:00
|
|
|
|
$(eval $(call __mb-include,make/ᐅᖓᕙᕆᐊᖅᓯᓂᖅ/mb_os.mk))
|
|
|
|
|
$(eval $(call __mb-include,make/ᐅᖓᕙᕆᐊᖅᓯᓂᖅ/mb_conv.mk))
|
|
|
|
|
$(eval $(call __mb-include,make/ᐅᖓᕙᕆᐊᖅᓯᓂᖅ/mb_sdcc.mk))
|
|
|
|
|
$(eval $(call __mb-include,make/ᐅᖓᕙᕆᐊᖅᓯᓂᖅ/mb_package.mk))
|
|
|
|
|
$(eval $(call __mb-include,make/ᐅᖓᕙᕆᐊᖅᓯᓂᖅ/mb_nestor80.mk))
|
2024-07-18 09:28:57 +00:00
|
|
|
|
@@include-libs:: $(MB_@GRAPH_CHAIN)
|
|
|
|
|
MB_@GRAPH_CHAIN := @@include-parent
|
2024-07-16 14:45:37 +00:00
|
|
|
|
$(eval $(call __mb-include,make/天房系統擴展/mb_msxrom.mk))
|
|
|
|
|
$(eval $(call __mb-include,make/天房系統擴展/mb_msxhub.mk))
|
|
|
|
|
$(eval $(call __mb-include,make/天房系統擴展/mb_msxpipe.mk))
|
|
|
|
|
$(eval $(call __mb-include,make/天房系統擴展/mb_openmsx.mk))
|
|
|
|
|
$(eval $(call __mb-include,make/天房系統擴展/mb_autoexec.mk))
|
2024-07-18 09:28:57 +00:00
|
|
|
|
@@include-libs:: $(MB_@GRAPH_CHAIN)
|
|
|
|
|
MB_@GRAPH_CHAIN := @@include-parent
|
2024-07-17 10:46:31 +00:00
|
|
|
|
$(eval $(call __mb-include,make/𓃬𓍄𓋹𓀭/mb_flow_nx01.mk))
|
2024-07-16 14:45:37 +00:00
|
|
|
|
$(eval $(call __mb-include,make/𓃬𓍄𓋹𓀭/mb_flow_help.mk))
|
|
|
|
|
$(eval $(call __mb-include,make/𓃬𓍄𓋹𓀭/mb_flow_proj.mk))
|
|
|
|
|
$(eval $(call __mb-include,make/𓃬𓍄𓋹𓀭/mb_flow_assert.mk))
|
|
|
|
|
$(eval $(call __mb-include,make/𓃬𓍄𓋹𓀭/mb_flow_macro80.mk))
|
|
|
|
|
$(eval $(call __mb-include,make/𓃬𓍄𓋹𓀭/mb_flow_nestor80.mk))
|
|
|
|
|
$(eval $(call __mb-include,make/𓃬𓍄𓋹𓀭/mb_flow_sdcc.mk))
|
|
|
|
|
$(eval $(call __mb-include,make/𓃬𓍄𓋹𓀭/mb_flow_clone.mk))
|
2024-07-18 09:28:57 +00:00
|
|
|
|
@@include-libs:: $(MB_@GRAPH_CHAIN)
|
|
|
|
|
MB_@GRAPH_CHAIN :=
|
2024-07-16 14:45:37 +00:00
|
|
|
|
$(eval $(call __mb-include,make/mb_env.mk))
|
|
|
|
|
$(eval $(call __mb-include,make/mb_flight.mk))
|
|
|
|
|
$(eval $(call __mb-include,make/ i18n/mb_i18n.mk))
|
2024-07-12 20:35:33 +00:00
|
|
|
|
ifneq ("$(MB_I18N)", "off")
|
2024-07-13 11:18:49 +00:00
|
|
|
|
$(if $(MB_I18N),$(if $(wildcard $(MB_@BASEPATH)make/ i18n/mb_i18n_$(MB_I18N).mk),,$(error Unsupported i18n language code: $(MB_I18N))))
|
2024-07-16 14:45:37 +00:00
|
|
|
|
$(eval $(call __mb-include,make/ i18n/mb_i18n_$(MB_I18N).mk))
|
2024-07-12 20:35:33 +00:00
|
|
|
|
endif
|
2024-07-18 09:28:57 +00:00
|
|
|
|
@include:: $(MB_@GRAPH_CHAIN)
|
|
|
|
|
MB_@GRAPH_CHAIN :=
|
2024-07-12 20:35:33 +00:00
|
|
|
|
|
|
|
|
|
# Glue phony targets to get internal @include tree (semi) correct (TODO: fix chain in: mb_flow_0module_setup)
|
2024-07-18 09:18:45 +00:00
|
|
|
|
.PHONY: @include @@include-root @@include-libs @@include-mods @@include-parent @@include-tree
|
2024-07-12 20:35:33 +00:00
|
|
|
|
@@include-parent:: @@include-mods
|
|
|
|
|
@include:: @@include-libs @@include-root
|
|
|
|
|
|
|
|
|
|
# Document our internal variables, now we have the functions loaded
|
2024-07-16 17:32:08 +00:00
|
|
|
|
$(MB_ᕽᕽᕽ )$(call mb-make-call,mb-doc-variable-rock,MB_@RECIPE,Recipe prefix to set and indent flow eval rules.)
|
|
|
|
|
$(MB_ᕽᕽᕽ )$(call mb-make-call,mb-doc-variable-rock,MB_@RECIPEPREFIX,Recipe prefix to restore to after flow eval rules.)
|
|
|
|
|
$(MB_ᕽᕽᕽ )$(call mb-make-call,mb-doc-variable-rock,MB_@BASEPATH,Path where msxbuild lib folder is located.)
|
|
|
|
|
$(MB_ᕽᕽᕽ )$(call mb-make-call,mb-doc-variable-rock,MB_@WORK,Shorthand to move to the work folder of module.)
|
2024-07-18 09:28:57 +00:00
|
|
|
|
$(MB_ᕽᕽᕽ )$(call mb-make-call,mb-doc-variable-rock,MB_@GRAPH_CHAIN,Helper to chain internal graph sections includes into groups.)
|
2024-07-12 20:35:33 +00:00
|
|
|
|
|
|
|
|
|
# Provider+doc easy single function start point for user
|
2024-07-16 14:45:37 +00:00
|
|
|
|
define mb-setup-default
|
2024-07-17 10:46:31 +00:00
|
|
|
|
$(MB_ᕽᕽᕽ )$(call mb-make-call,mb-make-check-arg2,$(0),$(1),$(2))
|
|
|
|
|
$(MB_ᕽᕽᕽ )$(call mb-make-call,mb-flow-doc-help)
|
|
|
|
|
$(MB_ᕽᕽᕽ )$(call mb-make-call,mb-flow-nx01-skywalker,$(2))
|
|
|
|
|
$(MB_ᕽᕽᕽ )$(call mb-make-call,mb-flow-proj-setup,$(1),@include)
|
|
|
|
|
$(MB_ᕽᕽᕽ )$(call mb-make-call,mb-flight-proj-flow-video,$(1))
|
2024-07-12 20:35:33 +00:00
|
|
|
|
endef
|
2024-07-16 17:32:08 +00:00
|
|
|
|
$(call mb-make-call,mb-doc-function,mb-setup-default,Setup default extenstions to configure dynamic project flow.,<bin-dir> <src-dir>)
|
2024-07-12 20:35:33 +00:00
|
|
|
|
|