[make] allow passing a default project to build if none specified and set the build output root

Change-Id: I5241108517be250535329513996c844f68073564
This commit is contained in:
Travis Geiselbrecht
2014-08-08 16:25:59 -07:00
parent fc898a85d6
commit 0780dc8782
2 changed files with 16 additions and 2 deletions

View File

@@ -2,7 +2,7 @@ LOCAL_MAKEFILE:=$(MAKEFILE_LIST)
ifeq ($(MAKECMDGOALS),spotless)
spotless:
rm -rf build-*
rm -rf -- build-*
else
ifndef LKROOT
@@ -32,8 +32,13 @@ endif
ifeq ($(do-nothing),)
ifeq ($(PROJECT),)
ifneq ($(DEFAULT_PROJECT),)
PROJECT := $(DEFAULT_PROJECT)
else
$(error No project specified. Use "make projectname" or put "PROJECT := projectname" in local.mk)
endif
endif
DEBUG ?= 2