1494N/A# -*- Makefile -*- rules commonly shared among X consolidation open source dirs
1610N/A# Copyright (c) 2002, 2016, Oracle
and/or its affiliates. All rights reserved.
1494N/A# Permission is hereby granted, free of charge, to any person obtaining a
1494N/A# copy of this software and associated documentation files (the "Software"),
1494N/A# to deal in the Software without restriction, including without limitation
1494N/A# the rights to use, copy, modify, merge, publish, distribute, sublicense,
1494N/A#
and/or sell copies of the Software, and to permit persons to whom the
1494N/A# Software is furnished to do so, subject to the following conditions:
1494N/A# The above copyright notice and this permission notice (including the next
1494N/A# paragraph) shall be included in all copies or substantial portions of the
1494N/A# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1494N/A# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1494N/A# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
1494N/A# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1494N/A# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
1494N/A# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
1494N/A# Which compiler to use to build module
1494N/AMODTYPE_COMPILER_DEFAULT = $(MODTYPE_COMPILER_SET:yes=$(POUND_SIGN))
1494N/A$(MODTYPE_COMPILER_DEFAULT) MODTYPE_COMPILER = $(DEFAULT_COMPILER)
1494N/AMODULE_COMPILER_DEFAULT = $(MODULE_COMPILER_SET:yes=$(POUND_SIGN))
1494N/A$(MODULE_COMPILER_DEFAULT) MODULE_COMPILER = $(MODTYPE_COMPILER)
1494N/A# Which make to use to build module
1494N/AMODTYPE_MAKE_DEFAULT = $(MODTYPE_MAKE_SET:yes=$(POUND_SIGN))
1494N/A$(MODTYPE_MAKE_DEFAULT) MODTYPE_MAKE = $(MAKE)
1494N/AMODULE_MAKE_DEFAULT = $(MODULE_MAKE_SET:yes=$(POUND_SIGN))
1494N/A$(MODULE_MAKE_DEFAULT) MODULE_MAKE = $(MODTYPE_MAKE)
1494N/AMODTYPE_PREFIX_DEFAULT = $(MODTYPE_PREFIX_SET:yes=$(POUND_SIGN))
1610N/A$(MODTYPE_PREFIX_DEFAULT) MODTYPE_PREFIX=/usr
1494N/AMODULE_PREFIX_DEFAULT = $(MODULE_PREFIX_SET:yes=$(POUND_SIGN))
1494N/A$(MODULE_PREFIX_DEFAULT) MODULE_PREFIX=$(MODTYPE_PREFIX)
1494N/A# Where to install documentation files
1494N/AMODTYPE_DOC_DIR_DEFAULT = $(MODTYPE_DOC_DIR_SET:yes=$(POUND_SIGN))
1610N/A$(MODTYPE_DOC_DIR_DEFAULT) MODTYPE_DOC_DIR=$(MODULE_DATA_DIR)/doc/$(MODULE_NAME)
1494N/AMODULE_DOC_DIR_DEFAULT = $(MODULE_DOC_DIR_SET:yes=$(POUND_SIGN))
1494N/A$(MODULE_DOC_DIR_DEFAULT) MODULE_DOC_DIR=$(MODTYPE_DOC_DIR)
1494N/A# Where to install pkgconfig files
1494N/AMODTYPE_PKGCONFIG_DIR_DEFAULT = $(MODTYPE_PKGCONFIG_DIR_SET:yes=$(POUND_SIGN))
1494N/A$(MODTYPE_PKGCONFIG_DIR_DEFAULT) MODTYPE_PKGCONFIG_DIR=$(PKGCONFIG_DIR)
1494N/AMODULE_PKGCONFIG_DIR_DEFAULT = $(MODULE_PKGCONFIG_DIR_SET:yes=$(POUND_SIGN))
1494N/A$(MODULE_PKGCONFIG_DIR_DEFAULT) MODULE_PKGCONFIG_DIR=$(MODTYPE_PKGCONFIG_DIR)
1494N/A# Package files will be delivered in
1494N/AMODTYPE_PKGHIER_DEFAULT = $(MODTYPE_PKGHIER_SET:yes=$(POUND_SIGN))
1494N/A$(MODTYPE_PKGHIER_DEFAULT) MODTYPE_PKGHIER=x11/$(MODTYPE)
1494N/AMODULE_PKGTAIL_DEFAULT = $(MODULE_PKGTAIL_SET:yes=$(POUND_SIGN))
1494N/A$(MODULE_PKGTAIL_DEFAULT) MODULE_PKGTAIL_CMD=print $(MODULE_NAME) | \
1494N/A$(MODULE_PKGTAIL_DEFAULT) MODULE_PKGTAIL=$(MODULE_PKGTAIL_CMD:sh)
1494N/AMODULE_PKGNAME_DEFAULT = $(MODULE_PKGNAME_SET:yes=$(POUND_SIGN))
1494N/A$(MODULE_PKGNAME_DEFAULT) MODULE_PKGNAME=$(MODTYPE_PKGHIER)/$(MODULE_PKGTAIL)
1494N/APKG_MANIFEST_DIR = $(PKG_SRC_DIR)/manifests
1494N/AMODULE_PKG_MANIFEST_NAME_CMD = print $(MODULE_PKGNAME) | tr '/' '-'
1494N/AMODULE_PKG_MANIFEST_NAME = $(MODULE_PKG_MANIFEST_NAME_CMD:sh)
1494N/AMODULE_PKG_MANIFEST = $(PKG_MANIFEST_DIR)/$(MODULE_PKG_MANIFEST_NAME).p5m
1494N/A# Package classification - must be a valid value recognized by pkg gui
1494N/AMODULE_PKGCLASS_DEFAULT = $(MODULE_PKGCLASS_SET:yes=$(POUND_SIGN))
1494N/A# Directory created by unpacking source, if not set in module makefile
1494N/ASOURCE_DIRNAME_DEFAULT = $(SOURCE_DIRNAME_SET:yes=$(POUND_SIGN))
1494N/A$(SOURCE_DIRNAME_DEFAULT) SOURCE_DIRNAME=$(MODULE_NAME)-$(MODULE_VERSION)
1494N/ABUILD_DIR_$(BUILD_TYPE) = build-$(BUILD_TYPE)
1494N/A# Special cases for 32-bit & 64-bit directory names to allow building
1494N/A# both architectures in the same tree (serially - building both in
1494N/A# parallel is likely to have race conditions)
1494N/ABUILD_DIR_32 = build-$(MACH32)
1494N/ABUILD_DIR_64 = build-$(MACH64)
1494N/ABUILD_DIR = $(BUILD_DIR_$(BUILD_TYPE))
1494N/A# Set default tarball if not set in module makefile
1494N/ASOURCE_TARBALL_NAME_DEFAULT = $(SOURCE_TARBALL_NAME_SET:yes=$(POUND_SIGN))
1494N/A$(SOURCE_TARBALL_NAME_DEFAULT) SOURCE_TARBALL_NAME=$(SOURCE_DIRNAME)
.tar.bz2 1494N/A# in a directory with the same name as what we use in our tree
1494N/ASOURCE_TARBALL_DIR_DEFAULT = $(SOURCE_TARBALL_DIR_SET:yes=$(POUND_SIGN))
1494N/A$(SOURCE_TARBALL_DIR_DEFAULT) SOURCE_TARBALL_DIR=$(MODTYPE)
1494N/A# Set default download location if not set in module makefile
1494N/ASOURCE_URL_DEFAULT = $(SOURCE_URL_SET:yes=$(POUND_SIGN))
1494N/A$(SOURCE_URL_DEFAULT) SOURCE_URL=$(SOURCE_URL_$(UPSTREAM_PROJECT))
1494N/A# Set default git repo location if not set in module makefile
1494N/AGIT_URL_DEFAULT = $(GIT_URL_SET:yes=$(POUND_SIGN))
1551N/A$(GIT_URL_DEFAULT) GIT_URL=$(GIT_URL_$(UPSTREAM_PROJECT))
1494N/A# Set default build type to 64-bit if not set in module makefile
1494N/ABUILD_TYPES_DEFAULT = $(BUILD_TYPES_SET:yes=$(POUND_SIGN))
1494N/A$(BUILD_TYPES_DEFAULT) BUILD_TYPES=64
1494N/ASOURCE_TARGETS_DEFAULT = $(SOURCE_TARGETS_SET:yes=$(POUND_SIGN))
1494N/A$(SOURCE_TARGETS_DEFAULT) SOURCE_TARGETS=$(UNPACK_TARGET) \
1494N/A $(MODTYPE_ADD_SOURCE_TARGETS) \
1494N/A $(MODULE_ADD_SOURCE_TARGETS)
1494N/ACONFIGURE_TARGETS_DEFAULT = $(CONFIGURE_TARGETS_SET:yes=$(POUND_SIGN))
1494N/A$(CONFIGURE_TARGETS_DEFAULT) CONFIGURE_TARGETS=default_configure \
1494N/A $(MODTYPE_ADD_CONFIGURE_TARGETS) \
1494N/A $(MODULE_ADD_CONFIGURE_TARGETS)
1494N/ABUILD_TARGETS_DEFAULT = $(BUILD_TARGETS_SET:yes=$(POUND_SIGN))
1494N/A$(BUILD_TARGETS_DEFAULT) BUILD_TARGETS=default_build \
1494N/A $(MODTYPE_ADD_BUILD_TARGETS) \
1494N/A $(MODULE_ADD_BUILD_TARGETS)
1494N/AINSTALL_TARGETS_DEFAULT = $(INSTALL_TARGETS_SET:yes=$(POUND_SIGN))
1494N/A$(INSTALL_TARGETS_DEFAULT) INSTALL_TARGETS=default_install \
1494N/A $(MODTYPE_ADD_INSTALL_TARGETS) \
1494N/A $(MODULE_ADD_INSTALL_TARGETS)
1494N/A# Additional flags to pass to make in 32-bit & 64-bit builds
1494N/ABUILD_32_FLAGS= ARCH_FLAGS="$(ARCH32_FLAGS)" \
1494N/A $(MODTYPE_BUILD_32_FLAGS) $(MODULE_BUILD_32_FLAGS)
1494N/ABUILD_64_FLAGS= ARCH_FLAGS="$(ARCH64_FLAGS)" \
1494N/A $(MODTYPE_BUILD_64_FLAGS) $(MODULE_BUILD_64_FLAGS)
1494N/A# Rules to make build logs quieter by default, verbose with V=1, like automake
1494N/AMAKE_QUIET_V_ = $(MAKE_QUIET_V_0)
1494N/AMAKE_QUIET = $(MAKE_QUIET_V_$(V))