[DEV] extend the possible Makefile for user
This commit is contained in:
parent
fceecb4db2
commit
2837a00f76
20
Makefile.mk
20
Makefile.mk
@ -47,7 +47,13 @@ include $(BUILD_SYSTEM)/defs.mk
|
|||||||
include $(BUILD_SYSTEM)/check-project-variable.mk
|
include $(BUILD_SYSTEM)/check-project-variable.mk
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
### Platform specificity : ###
|
## Platform specificity :
|
||||||
|
## - Linux
|
||||||
|
## - Windows
|
||||||
|
## - MacOs
|
||||||
|
## - IOs
|
||||||
|
## - Android
|
||||||
|
## - ...
|
||||||
###############################################################################
|
###############################################################################
|
||||||
SUPPORTED_PLATFORM=Linux Windows MacOs IOs Android
|
SUPPORTED_PLATFORM=Linux Windows MacOs IOs Android
|
||||||
# By default we build for the current platform
|
# By default we build for the current platform
|
||||||
@ -61,7 +67,10 @@ PROJECT_PATH=$(shell pwd)
|
|||||||
PROJECT_MODULE=$(call fullpath,$(PROJECT_PATH)/../)
|
PROJECT_MODULE=$(call fullpath,$(PROJECT_PATH)/../)
|
||||||
|
|
||||||
ifeq ($(filter $(PLATFORM), $(SUPPORTED_PLATFORM)), )
|
ifeq ($(filter $(PLATFORM), $(SUPPORTED_PLATFORM)), )
|
||||||
$(error you must specify a corect platform : make PLATFORM=[$(SUPPORTED_PLATFORM)])
|
OTHER_BORAD=true
|
||||||
|
ifeq ("$(shell ls ./Makefile.$(PLATFORM).mk)","")
|
||||||
|
$(error you must specify a corect platform : make PLATFORM=[$(SUPPORTED_PLATFORM) ...])
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# define the target OS of this system
|
# define the target OS of this system
|
||||||
@ -79,5 +88,8 @@ else
|
|||||||
BUILD_DIRECTORY_MODE := release
|
BUILD_DIRECTORY_MODE := release
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ("$(OTHER_BORAD)","true")
|
||||||
include $(BUILD_SYSTEM_BASE)/Makefile.$(PLATFORM).mk
|
include ./Makefile.$(PLATFORM).mk
|
||||||
|
else
|
||||||
|
include $(BUILD_SYSTEM_BASE)/Makefile.$(PLATFORM).mk
|
||||||
|
endif
|
||||||
|
@ -225,5 +225,5 @@ $(shell mkdir -p $(CONFIG_GLOBAL_FOLDER))
|
|||||||
-include $(CONFIG_GLOBAL_FILE)
|
-include $(CONFIG_GLOBAL_FILE)
|
||||||
|
|
||||||
$(CONFIG_GLOBAL_FILE):
|
$(CONFIG_GLOBAL_FILE):
|
||||||
@$(error "need to generate config : make ... config")
|
@$(error "need to generate config : make PLATFORM=$(PLATFORM) config")
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user