blob: d7d7416f41ff12c265fe1fbf33d97446421a36c7 [file] [log] [blame]
#
# Copyright (c) 2010-2011 Nest, 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 tzcode and tzdata, executables and
# data required for the implementation of standard local time
# for many representative locations around the globe.
#
BuildConfigSpecialized := No
BuildProductSpecialized := No
include pre.mak
SubMakefiles := tzcode.mak \
tzdata.mak
# Override the build directory so that the three make files that make
# up this collective package all build in the same directory.
BuildDirectory := $(call GenerateConditionalBuildQualifiedDirectory,$(BuildBaseDirectory))
all: $(PackageDefaultGoal)
# Prepare the sources. While there's nothing to do here, we need to
# recurse through the sub-make files.
.PHONY: source
source: recursive
# Patch the sources, if necessary (nothing to do, this is handled by
# the sub-make files).
.PHONY: patch
patch: source
# Configure the source for building (nothing to do, this is handled by
# the sub-make files).
.PHONY: configure
configure: source
# Build the source.
#
# We have to unset MAKEFLAGS since they confuse the package build otherwise.
.PHONY: build
build: configure | $(ResultDirectory)
$(Verbose)unset MAKEFLAGS && \
$(MAKE) -C $(BuildDirectory) \
TOPDIR=$(ResultDirectory) \
all
# Stage the build to a temporary installation area.
.PHONY: stage
stage: stage-default stage-header
# We have to unset MAKEFLAGS since they confuse the package build otherwise.
.PHONY: stage-default
stage-default: build | $(ResultDirectory)
$(Verbose)unset MAKEFLAGS && \
$(MAKE) -C $(BuildDirectory) \
TOPDIR=$(ResultDirectory) \
install
# Other packages depend on the header, tzfile.h. Manually and
# explicitly stage this in the results directory so they can find it.
.PHONY: stage-header
stage-header: build | $(ResultDirectory)
$(Verbose)install -d $(call GenerateResultPaths,,usr/include)
$(Verbose)install $(BuildDirectory)/tzfile.h $(call GenerateResultPaths,,usr/include/tzfile.h)
clean:
$(Verbose)$(RM) $(RMFLAGS) -r $(ResultDirectory)
include post.mak