1# Copyright 2016 The Fuchsia Authors
2# Copyright (c) 2008-2015 Travis Geiselbrecht
3#
4# Use of this source code is governed by a MIT-style
5# license that can be found in the LICENSE file or at
6# https://opensource.org/licenses/MIT
7
8LKMAKEROOT := .
9BUILDROOT ?= .
10DEFAULT_PROJECT ?= x64
11TOOLCHAIN_PREFIX ?=
12
13ENABLE_BUILD_SYSROOT ?= true
14# if true, $BUILDDIR/sysroot/{lib,include,...} will be populated with
15# public libraries, headers, and other "build artifacts" necessary
16# for a toolchain to compile binaries for Zircon.
17
18ENABLE_BUILD_LISTFILES ?= false
19# If true, various verbose listings (*.lst, *.sym, *,dump, etc) will
20# be generated for the kernel and userspace binaries.  These can be
21# useful for debugging, but are large and can slow the build some.
22
23export LKMAKEROOT
24export BUILDROOT
25export BUILDSYSROOT
26export DEFAULT_PROJECT
27export TOOLCHAIN_PREFIX
28export ENABLE_BUILD_SYSROOT
29export ENABLE_BUILD_LISTFILES
30
31# veneer makefile that calls into the engine with lk as the build root
32# if we're the top level invocation, call ourselves with additional args
33.PHONY: _top $(MAKECMDGOALS)
34$(MAKECMDGOALS) _top:
35	@$(MAKE) -C $(LKMAKEROOT) --no-print-directory -rR -f make/engine.mk $(MAKECMDGOALS)
36