blob: b64d84581dcc4786c32e2f619240310effff6e20 [file] [log] [blame]
# Copyright (c) 2015 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 for eigen, a C++ linear algebra library
include pre.mak
PackageName := eigen
PackageExtension := tar.bz2
PackageSeparator := -
PackagePatchArgs := -p1
PackageArchive := $(PackageName).$(PackageExtension)
PackageSourceDir := $(PackageName)$(PackageSeparator)$(PackageVersion)
PackageBuildMakefile = $(call GenerateBuildPaths,Makefile)
LicenseSourceFile := $(PackageSourceDir)/COPYING.MPL2
CleanPaths += $(PackageLicenseFile)
SOURCEDIRS = $(PackageSourceDir)
$(PackageSourceDir)_RULE_TARGET = $(BuildDirectory)/configure
all: $(PackageDefaultGoal)
# Generate the package license contents.
$(LicenseSourceFile): $(BuildDirectory)/source
$(PackageLicenseFile): $(LicenseSourceFile)
# Extract the source from the archive and apply patches, if any.
$(PackageSourceDir): $(PackageArchive) $(PackagePatchPaths)
# Prepare the sources.
$(BuildDirectory)/source: | $(PackageSourceDir)
$(Verbose)touch $@
# Patch the sources, if necessary.
$(BuildDirectory)/patch: $(BuildDirectory)/source
$(Verbose)touch $@
$(BuildDirectory)/configure: $(BuildDirectory)/source
$(Verbose)touch $@
ResultHeaderPath = $(ResultDirectory)/include
SourceHeaderPathEigen = $(PackageSourceDir)/Eigen
SourceHeaderPathUnsupported = $(PackageSourceDir)/unsupported
$(BuildDirectory)/copyEigen: $(BuildDirectory)/configure | $(ResultHeaderPath)
$(Verbose)cp -Rf $(SourceHeaderPathEigen) $(ResultHeaderPath)
$(Verbose)touch $@
$(BuildDirectory)/copyUnsupported: $(BuildDirectory)/configure | $(ResultHeaderPath)
$(Verbose)cp -Rf $(SourceHeaderPathUnsupported) $(ResultHeaderPath)
$(Verbose)touch $@
$(BuildDirectory)/stage: $(BuildDirectory)/copyEigen $(BuildDirectory)/copyUnsupported | $(ResultDirectory)
$(Verbose)touch $@
.PHONY: stage
stage: $(BuildDirectory)/stage
$(Verbose)$(RM) $(RMFLAGS) -r $(PackageSourceDir)
$(Verbose)$(RM) $(RMFLAGS) -r $(BuildDirectory)
$(Verbose)$(RM) $(RMFLAGS) -r $(ResultDirectory)
include post.mak