Arquivos
Brian Swetland 16656ae09a [build] flatten the build
Previously we treated kernel/, system/, and third_party/ as
overlays on a shared namespace.  This required the concept
of "canonical" module names, and a lot of complexity to ensure
that things didn't collide and the build worked.

This change gets rid of that, no longer passes -I to make,
so that include directives from our *.mk files do not magically
wildcard across various paths, etc.

The most user-visible change is that everywhere where a module
name is specified (MODULE_DEPS, MODULE_LIBS, etc), full module
names like kernel/lib/io or system/ulib/mxio must be used instead
of previously-allowed "short" names like lib/io and ulib/mxio.

The build output still has a similar shape, but the first segment
of the module path (kernel/, system/, or third_party/) is no
longer elided under $(BUILDDIR)

Change-Id: I525aba1da1c86eb7a86007bddc669f7eeebfedd5
2017-04-09 11:07:54 -07:00

37 linhas
1.2 KiB
Makefile

# 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 := .
BUILDROOT ?= .
DEFAULT_PROJECT ?= magenta-pc-x86-64
TOOLCHAIN_PREFIX ?=
ENABLE_BUILD_SYSROOT ?= true
# 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.
export LKMAKEROOT
export BUILDROOT
export BUILDSYSROOT
export DEFAULT_PROJECT
export TOOLCHAIN_PREFIX
export ENABLE_BUILD_SYSROOT
export ENABLE_BUILD_LISTFILES
# 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 make/engine.mk $(MAKECMDGOALS)
.PHONY: _top