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