Improve custom configuration support
This commit is contained in:
parent
753c46377b
commit
72b6d6ad43
|
@ -11,11 +11,11 @@
|
||||||
{
|
{
|
||||||
"label": "build",
|
"label": "build",
|
||||||
"type": "shell",
|
"type": "shell",
|
||||||
"windows": { // v re-export for WSL v re-export for WSL
|
"windows": { // v re-export for WSL v re-export for WSL
|
||||||
"command": "wsl make ${input:project}_${input:target} BUILD_PROFILE=${input:build profile} REGION=${input:region} ${input:test} PSX_LICENSE_PATH=$(wslpath ${env:PSX_LICENSE_PATH}) JABY_ENGINE_DIR=$(wslpath ${env:JABY_ENGINE_PATH})",
|
"command": "wsl make ${input:project}_${input:target} BUILD_PROFILE=${input:build profile} REGION=${input:region} CUSTOM_CONFIG=${input:custom config} PSX_LICENSE_PATH=$(wslpath ${env:PSX_LICENSE_PATH}) JABY_ENGINE_DIR=$(wslpath ${env:JABY_ENGINE_PATH})",
|
||||||
},
|
},
|
||||||
"linux": {
|
"linux": {
|
||||||
"command": "make ${input:project}_${input:target} BUILD_PROFILE=${input:build profile} REGION=${input:region}",
|
"command": "make ${input:project}_${input:target} BUILD_PROFILE=${input:build profile} REGION=${input:region} CUSTOM_CONFIG=${input:custom config}",
|
||||||
},
|
},
|
||||||
"group": {
|
"group": {
|
||||||
"kind": "build",
|
"kind": "build",
|
||||||
|
@ -69,9 +69,9 @@
|
||||||
"description": "Region profile to use"
|
"description": "Region profile to use"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "test",
|
"id": "custom config",
|
||||||
"type": "pickString",
|
"type": "pickString",
|
||||||
"options": ["", "CUSTOM_CONFIG=MyConfig"],
|
"options": ["", "MyConfig"],
|
||||||
"default": "",
|
"default": "",
|
||||||
"description": "Simple custom config test"
|
"description": "Simple custom config test"
|
||||||
},
|
},
|
||||||
|
|
|
@ -2,16 +2,9 @@
|
||||||
AUTO_OVERLAY_DIR = $(OUTPUT_DIR)/auto_overlay
|
AUTO_OVERLAY_DIR = $(OUTPUT_DIR)/auto_overlay
|
||||||
|
|
||||||
include $(AUTO_OVERLAY_DIR)/Overlays.mk
|
include $(AUTO_OVERLAY_DIR)/Overlays.mk
|
||||||
|
include $(JABY_ENGINE_DIR)/mkfile/common/CustomConfigHelper.mk
|
||||||
|
|
||||||
#We use the JabyEngine so we will include ourselves
|
JABY_ENGINE_LIB_DIR = $(JABY_ENGINE_DIR)/lib/PSX-$(BUILD_PROFILE)/$(CUSTOM_CONFIG)
|
||||||
ifdef CUSTOM_CONFIG
|
|
||||||
CCFLAGS += -I$(JABY_ENGINE_DIR)/config/$(CUSTOM_CONFIG) -imacros $(JABY_ENGINE_DIR)/config/$(CUSTOM_CONFIG)/jabyengine_custom_defines.hpp
|
|
||||||
# TODO: v can this be empty maybe??
|
|
||||||
JABY_ENGINE_LIB_DIR = $(JABY_ENGINE_DIR)/lib/PSX-$(BUILD_PROFILE)/$(CUSTOM_CONFIG)
|
|
||||||
else
|
|
||||||
JABY_ENGINE_LIB_DIR = $(JABY_ENGINE_DIR)/lib/PSX-$(BUILD_PROFILE)
|
|
||||||
endif
|
|
||||||
|
|
||||||
JABY_ENGINE_SUPPORT_LIB_DIR = $(JABY_ENGINE_DIR)/Support/lib/PSX-$(BUILD_PROFILE)
|
JABY_ENGINE_SUPPORT_LIB_DIR = $(JABY_ENGINE_DIR)/Support/lib/PSX-$(BUILD_PROFILE)
|
||||||
JABY_ENGINE_SUPPORT_LIBS = $(addprefix -l,$(SUPPORT_LIBS))
|
JABY_ENGINE_SUPPORT_LIBS = $(addprefix -l,$(SUPPORT_LIBS))
|
||||||
JABY_ENGINE_SUPPORT_DEPS = $(addsuffix .a,$(addprefix $(JABY_ENGINE_SUPPORT_LIB_DIR)/lib,$(SUPPORT_LIBS)))
|
JABY_ENGINE_SUPPORT_DEPS = $(addsuffix .a,$(addprefix $(JABY_ENGINE_SUPPORT_LIB_DIR)/lib,$(SUPPORT_LIBS)))
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
JABY_ENGINE_CONFIG_DIR = $(JABY_ENGINE_DIR)config
|
||||||
|
ifdef CUSTOM_CONFIG
|
||||||
|
# TODO: Use same header for -I and -imacros?
|
||||||
|
CCFLAGS += -I$(JABY_ENGINE_CONFIG_DIR)/$(CUSTOM_CONFIG) -imacros $(JABY_ENGINE_CONFIG_DIR)/$(CUSTOM_CONFIG)/jabyengine_custom_defines.hpp
|
||||||
|
endif
|
|
@ -19,17 +19,6 @@
|
||||||
{
|
{
|
||||||
"label": "make",
|
"label": "make",
|
||||||
"type": "shell",
|
"type": "shell",
|
||||||
"windows": {
|
|
||||||
"command": "wsl make ${input:target} BUILD_PROFILE=${input:build cfg} TV_FORMAT=${input:tv format}",
|
|
||||||
},
|
|
||||||
"linux": {
|
|
||||||
"command": "make ${input:target} BUILD_PROFILE=${input:build cfg} TV_FORMAT=${input:tv format}",
|
|
||||||
},
|
|
||||||
"group": "build"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "make custom config",
|
|
||||||
"type": "shell",
|
|
||||||
"windows": {
|
"windows": {
|
||||||
"command": "wsl make ${input:target} BUILD_PROFILE=${input:build cfg} TV_FORMAT=${input:tv format} CUSTOM_CONFIG=${input:custom config}",
|
"command": "wsl make ${input:target} BUILD_PROFILE=${input:build cfg} TV_FORMAT=${input:tv format} CUSTOM_CONFIG=${input:custom config}",
|
||||||
},
|
},
|
||||||
|
@ -42,10 +31,10 @@
|
||||||
"label": "combi make",
|
"label": "combi make",
|
||||||
"type": "shell",
|
"type": "shell",
|
||||||
"windows": {
|
"windows": {
|
||||||
"command": "wsl make -f CombiMake.mk ${input:target} BUILD_PROFILE=${input:build cfg}",
|
"command": "wsl make -f CombiMake.mk ${input:target} BUILD_PROFILE=${input:build cfg} CUSTOM_CONFIG=${input:custom config}",
|
||||||
},
|
},
|
||||||
"linux": {
|
"linux": {
|
||||||
"command": "make -f CombiMake.mk ${input:target} BUILD_PROFILE=${input:build cfg}",
|
"command": "make -f CombiMake.mk ${input:target} BUILD_PROFILE=${input:build cfg} CUSTOM_CONFIG=${input:custom config}",
|
||||||
},
|
},
|
||||||
"group": "build"
|
"group": "build"
|
||||||
},
|
},
|
||||||
|
@ -68,8 +57,8 @@
|
||||||
{
|
{
|
||||||
"id": "custom config",
|
"id": "custom config",
|
||||||
"type": "pickString",
|
"type": "pickString",
|
||||||
"options": ["MyConfig"],
|
"options": ["", "MyConfig"],
|
||||||
"default": "MyConfig",
|
"default": "",
|
||||||
"description": "The custom configuration to use for this build"
|
"description": "The custom configuration to use for this build"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -10,14 +10,8 @@ SPLASH_IMAGE_NTSC = src/BootLoader/splash_image_ntsc_boot.hpp
|
||||||
CCFLAGS += -Iinclude -I../../include -D__friends=public
|
CCFLAGS += -Iinclude -I../../include -D__friends=public
|
||||||
CCFLAGS += -save-temps=obj
|
CCFLAGS += -save-temps=obj
|
||||||
|
|
||||||
ifdef CUSTOM_CONFIG
|
include ../../mkfile/common/CustomConfigHelper.mk
|
||||||
#TODO: Custom config build var
|
CONFIG_NAME = $(PLATFORM)-$(BUILD_PROFILE)/$(CUSTOM_CONFIG)
|
||||||
CCFLAGS += -I../../config/$(CUSTOM_CONFIG) -imacros ../../config/$(CUSTOM_CONFIG)/jabyengine_custom_defines.hpp
|
|
||||||
#TODO: v Or here? v Do we want this here?
|
|
||||||
CONFIG_NAME = $(PLATFORM)-$(BUILD_PROFILE)/$(CUSTOM_CONFIG)
|
|
||||||
else
|
|
||||||
CONFIG_NAME = $(PLATFORM)-$(BUILD_PROFILE)
|
|
||||||
endif
|
|
||||||
|
|
||||||
include ../../mkfile/Wildcard.mk
|
include ../../mkfile/Wildcard.mk
|
||||||
SRCS = $(call rwildcard, src, c cpp s)
|
SRCS = $(call rwildcard, src, c cpp s)
|
||||||
|
|
Loading…
Reference in New Issue