blob: 1805d9e3785f5c593622af56b63f23666294d5a5 [file] [edit]
#
# Copyright (c) 2013 Nest Labs, Inc.
# All rights reserved.
#
# This document is the property of Nest. It is considered
# confidential and proprietary information.
#
# This document may not be reproduced or transmitted in any form,
# in whole or in part, without the express written permission of
# Nest.
#
# Description:
# This file is the make file for various NetBSD user- and
# kernel-space sources.
#
BuildConfigSpecialized := No
BuildProductSpecialized := No
.DEFAULT_GOAL := all
include pre.mak
PackageRoot := .
PackageName := netbsd
PackagePatchArgs := -p1
PackageSourceDir := $(PackageRoot)/$(PackageName)
NetBSDMakefile := $(PackageName).mak
LicenseSourceFile := $(PackageSourceDir)/COPYRIGHT
CleanPaths += $(PackageLicenseFile)
export PackageSourceDir
export PackageName
all: $(PackageDefaultGoal)
# Generate the package license contents.
$(LicenseSourceFile): source
$(PackageLicenseFile): $(LicenseSourceFile)
$(copy-result)
# We are building this package from version-controlled source, so
# there is nothing to do for this target goal.
$(PackageSourceDir):
# Prepare the sources.
.PHONY: source
source: | $(PackageSourceDir)
# Patch the sources, if necessary.
.PHONY: patch
patch: source
# Configure the source for building.
.PHONY: configure
configure: patch
# Build the source.
#
# Because we've just cherry-picked select NetBSD sources and those
# does not have any make or build infrastructure of their own, we
# delegate the entirety of making NetBSD to another adjunct make file
# of our own.
.PHONY: build
build: configure
$(Verbose)$(MAKE) -f $(NetBSDMakefile) all
# Stage the build to a temporary installation area.
#
# There's nothing to do as the adjunct make file handles everything.
.PHONY: stage
stage: build
clean:
$(Verbose)$(MAKE) -s -f $(NetBSDMakefile) $(@)
include post.mak