kbuild: support arbitrary dir for Makefile.app

The location of Makefile.app can now be specified via MAKEFILE_APP_DIR
instead of implicitly being searched for in the project directory.

Change-Id: Ib86bf25e210d9c3749c5811b6e36376f59e3cd32
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
This commit is contained in:
Benjamin Walsh 2016-02-10 14:36:39 -05:00 committed by Gerrit Code Review
commit 76c76a1977

View file

@ -521,8 +521,16 @@ scripts: scripts_basic include/config/auto.conf include/config/tristate.conf
core-y := lib/ kernel/ misc/ net/ boards/ arch/
drivers-y := drivers/
ifneq ($(strip $(MAKEFILE_APP_DIR)),)
MAKEFILE_APP := $(realpath $(MAKEFILE_APP_DIR)/Makefile.app)
endif
ifneq ($(strip $(PROJECT)),)
ifneq ($(strip $(MAKEFILE_APP)), )
include $(MAKEFILE_APP)
else
-include $(PROJECT)/Makefile.app
endif
ifneq ($(strip $(KBUILD_ZEPHYR_APP)),)
export KBUILD_ZEPHYR_APP
endif