forked from niftich/magenta
-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
42 lines (35 loc) · 1.36 KB
/
makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# Copyright 2016 The Fuchsia Authors
# Copyright (c) 2008-2015 Travis Geiselbrecht
#
# Use of this source code is governed by a MIT-style
# license that can be found in the LICENSE file or at
# https://opensource.org/licenses/MIT
LKMAKEROOT := .
LKROOT := kernel
LKINC := system third_party
BUILDROOT ?= .
DEFAULT_PROJECT ?= magenta-pc-x86-64
TOOLCHAIN_PREFIX ?=
ENABLE_BUILD_SYSROOT ?= false
# if true, $BUILDDIR/sysroot/{lib,include,...} will be populated with
# public libraries, headers, and other "build artifacts" necessary
# for a toolchain to compile binaries for Magenta.
ENABLE_BUILD_LISTFILES ?= false
# If true, various verbose listings (*.lst, *.sym, *,dump, etc) will
# be generated for the kernel and userspace binaries. These can be
# useful for debugging, but are large and can slow the build some.
# check if LKROOT is already a part of LKINC list and add it only if it is not
ifneq ($(findstring $(LKROOT),$(LKINC)), $(LKROOT))
LKINC := $(LKROOT) $(LKINC)
endif
export LKMAKEROOT
export LKROOT
export LKINC
export BUILDROOT
export DEFAULT_PROJECT
export TOOLCHAIN_PREFIX
# vaneer makefile that calls into the engine with lk as the build root
# if we're the top level invocation, call ourselves with additional args
$(MAKECMDGOALS) _top:
@$(MAKE) -C $(LKMAKEROOT) --no-print-directory -rR -f $(LKROOT)/engine.mk $(addprefix -I,$(LKINC)) $(MAKECMDGOALS)
.PHONY: _top