Makefile.init revision 1659
1409N/A# -*- Makefile -*- rules commonly shared among X consolidation open source dirs
1409N/A# Makefile.init has definitions that are needed before the module/modtype rules
1409N/A#
1607N/A# Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.
1409N/A#
1409N/A# Permission is hereby granted, free of charge, to any person obtaining a
1409N/A# copy of this software and associated documentation files (the "Software"),
1409N/A# to deal in the Software without restriction, including without limitation
1409N/A# the rights to use, copy, modify, merge, publish, distribute, sublicense,
1409N/A# and/or sell copies of the Software, and to permit persons to whom the
1409N/A# Software is furnished to do so, subject to the following conditions:
1409N/A#
1409N/A# The above copyright notice and this permission notice (including the next
1409N/A# paragraph) shall be included in all copies or substantial portions of the
1409N/A# Software.
1409N/A#
1409N/A# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1409N/A# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1409N/A# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
1409N/A# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1409N/A# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
1409N/A# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
1409N/A# DEALINGS IN THE SOFTWARE.
1409N/A#
1409N/A#
1409N/A
1409N/A# Use ksh93 for shell commands in Makefiles so that builds are the same
1409N/A# on Nevada (where /bin/sh is still ancient Bourne shell) and Indiana
1409N/A# (where /bin/sh is ksh93)
1409N/ASHELL=/usr/bin/ksh93
1409N/A
1409N/A# Borrowed from Solaris OS/Net makefile.master:
1409N/A# The declaration POUND_SIGN is always '#'. This is needed to get around the
1409N/A# make feature that '#' is always a comment delimiter, even when escaped or
1409N/A# quoted. We use this macro expansion method to get POUND_SIGN rather than
1409N/A# always breaking out a shell because the general case can cause a noticable
1409N/A# slowdown in build times when so many Makefiles include Makefile.init.
1409N/A#
1409N/APRE_POUND= pre\#
1409N/APOUND_SIGN= $(PRE_POUND:pre\%=%)
1409N/A
1409N/A# Set default build target to all
1409N/Adefault: all
1409N/A
1409N/A# The infrastructure in the main tree requires Solaris make
1409N/A$(error You must use Solaris make, not GNU make in this build - make sure /usr/ccs/bin or /usr/bin is ahead of /usr/gnu/bin in $$PATH)
1409N/A
1409N/A### Build options
1409N/A
1409N/A# Different builders want different settings for various options such
1409N/A# as branding or download sites. The top-level "make setup" command
1409N/A# sets the Makefile.options link to point to a included Makefile to
1409N/A# set these up.
1409N/A
1533N/A$(TOP)/open-src/common/Makefile.options:
1533N/A cd $(TOP) ; $(MAKE) $(MAKEFLAGS) setup
1533N/A
1409N/Ainclude "Makefile.options"
1409N/A
1409N/A### Machine architecture macros
1409N/A
1409N/A# MACH will be either "sparc" or "i386"
1409N/AMACH=$(TARGET_ARCH:-%=%)
1409N/A
1409N/AMACH32_sparc = sparc
1409N/AMACH64_sparc = sparcv9
1409N/AMACH32_i386 = i386
1409N/AMACH64_i386 = amd64
1409N/A
1409N/AMACH32= $(MACH32_$(MACH))
1409N/AMACH64= $(MACH64_$(MACH))
1409N/A
1409N/A# Architecture subdirectories
1409N/A
1493N/ASUBDIR32_sparc = sparcv7
1409N/ASUBDIR64_sparc = sparcv9
1409N/ASUBDIR32_i386 = i86
1409N/ASUBDIR64_i386 = amd64
1409N/A
1409N/ASUBDIR32 = $(SUBDIR32_$(MACH))
1409N/ASUBDIR64 = $(SUBDIR64_$(MACH))
1409N/A
1409N/ALIBSUBDIR = $(LIBSUBDIR_$(BUILD_TYPE))
1409N/ALIBSUBDIR_32 = # None
1409N/ALIBSUBDIR_64 = /$(SUBDIR64)
1409N/AARCHLIBSUBDIR = $(LIBSUBDIR)
1409N/A
1409N/A### Default compiler & options
1409N/A
1422N/A# Our default compiler is Solaris Studio, but if you want to default to GNU
1409N/A# compilers, you can change this here - some modules with specific
1409N/A# requirements override this in their makefiles with MODULE_COMPILER.
1409N/ADEFAULT_COMPILER = suncc
1409N/A
1409N/A# Flags used by either compiler in debug builds
1409N/ADEBUG_FLAGS_common = -g $(MODTYPE_DEBUG_FLAGS) $(MODULE_DEBUG_FLAGS)
1409N/A
1422N/A## Solaris Studio compilers
1409N/ACC_suncc = cc
1409N/ACXX_suncc = CC
1409N/AOPT_FLAGS_suncc = -xO4 -xbuiltin=%none -xlibmil -xprefetch -xdepend
1422N/AOPT_FLAGS_suncc += -xspace -W0,-xglobalstatic
1409N/ADEBUG_FLAGS_suncc = $(DEBUG_FLAGS_common)
1409N/A$(BUILD_DEBUG:yes=) DEBUG_OR_OPT_FLAGS_suncc = $(DEBUG_FLAGS_suncc)
1409N/A$(BUILD_DEBUG:yes=$(POUND_SIGN)) DEBUG_OR_OPT_FLAGS_suncc = $(OPT_FLAGS_suncc)
1409N/A
1409N/ACFLAGS_suncc = $(DEBUG_OR_OPT_FLAGS_suncc)
1515N/ACFLAGS_suncc += -v -fd -features=extensions,conststrings
1409N/ACXXFLAGS_suncc = $(DEBUG_OR_OPT_FLAGS_suncc)
1409N/ACXXFLAGS_suncc += +w2 -norunpath -features=extensions
1409N/A
1409N/A# -D__<arch>__ flags are to match gcc definitions that are used in much
1409N/A# of the upstream open source code base
1409N/AARCH_FLAGS_sparc_suncc = -xarch=sparc -D__sparc__
1409N/AARCH32_FLAGS_sparc_suncc = -m32
1409N/AARCH64_FLAGS_sparc_suncc = -m64
1409N/A
1409N/A# -xregs=no%frameptr is required on x86 when compiling at -xO4 or higher to
1409N/A# avoid losing stack frame pointers so you can't get stack traces or debug
1409N/AARCH_FLAGS_i386_suncc = -xregs=no%frameptr
1409N/AARCH32_FLAGS_i386_suncc = -m32 -xarch=sse2 -D__i386__
1409N/AARCH64_FLAGS_i386_suncc = -m64 -xarch=sse2 -D__amd64__
1409N/A
1409N/A# SPARC ABI requires system libraries not use application registers
1422N/AARCH_LIB_FLAGS_sparc_suncc = -xregs=no%appl
1409N/AARCH_LIB_FLAGS_i386_suncc =
1409N/A
1607N/A# Flags to specify which language version to support, default to C11/C++11
1607N/AC_VERSION_FLAGS_suncc = -std=c11 -xlang=c11
1607N/ACXX_VERSION_FLAGS_suncc = -std=c++11 -xlang=c99
1607N/A
1409N/A## GNU Compilers
1659N/AGCC_VERSION = 5
1416N/AGCC = /usr/gcc/$(GCC_VERSION)/bin/gcc
1416N/AGXX = /usr/gcc/$(GCC_VERSION)/bin/g++
1409N/ACC_gcc = $(GCC)
1409N/ACXX_gcc = $(GXX)
1409N/AOPT_FLAGS_gcc = -O3
1409N/ADEBUG_FLAGS_gcc = $(DEBUG_FLAGS_common)
1409N/A$(BUILD_DEBUG:yes=) DEBUG_OR_OPT_FLAGS_gcc = $(DEBUG_FLAGS_gcc)
1409N/A$(BUILD_DEBUG:yes=$(POUND_SIGN)) DEBUG_OR_OPT_FLAGS_gcc = $(OPT_FLAGS_gcc)
1409N/AWARNFLAGS_gcc = -Wall -Wno-unknown-pragmas
1409N/ACFLAGS_gcc = $(DEBUG_OR_OPT_FLAGS_gcc) \
1409N/A -fno-omit-frame-pointer $(WARNFLAGS_gcc)
1409N/ACXXFLAGS_gcc = $(DEBUG_OR_OPT_FLAGS_gcc) \
1409N/A -fno-omit-frame-pointer $(WARNFLAGS_gcc)
1409N/A
1409N/AARCH32_FLAGS_sparc_gcc = -mcpu=ultrasparc -m32
1409N/AARCH64_FLAGS_sparc_gcc = -mcpu=ultrasparc -m64
1409N/AARCH32_FLAGS_i386_gcc = -march=pentium4 -m32
1409N/AARCH64_FLAGS_i386_gcc = -march=opteron -m64
1409N/A
1409N/A# SPARC ABI requires system libraries not use application registers
1409N/AARCH_LIB_FLAGS_sparc_gcc = -mno-app-regs
1409N/AARCH_LIB_FLAGS_i386_gcc =
1409N/A
1607N/A# Default to C11 plus GNU extensions, since we primarily use gcc for code
1607N/A# that requires the GNU extensions.
1607N/AC_VERSION_FLAGS_gcc = -std=gnu11
1607N/ACXX_VERSION_FLAGS_gcc = -std=gnu++11
1607N/A
1409N/A## Parfait wrappers
1409N/ACC_suncc_parfait = parfait-cc
1409N/ACXX_suncc_parfait = parfait-CC
1409N/ACC_gcc_parfait = parfait-gcc
1409N/ACXX_gcc_parfait = parfait-g++
1409N/AAR_parfait = parfait-ar
1409N/AAS_parfait = parfait-as
1494N/ALD_parfait = parfait-ld
1409N/A
1409N/A# If USE_PARFAIT is yes, use _parfait variants
1409N/APARFAIT_1 = $(USE_PARFAIT:no=)
1409N/APARFAIT_2 = $(PARFAIT_1:yes=$(POUND_SIGN))
1409N/A$(PARFAIT_2) WITH_PARFAIT=$(POUND_SIGN)
1409N/A$(WITH_PARFAIT) WITHOUT_PARFAIT=$(POUND_SIGN)
1409N/A
1409N/A$(WITH_PARFAIT) CHOSEN_COMPILER=$(MODULE_COMPILER)_parfait
1409N/A$(WITHOUT_PARFAIT) CHOSEN_COMPILER=$(MODULE_COMPILER)
1409N/A$(WITH_PARFAIT) AR=$(AR_parfait)
1409N/A$(WITHOUT_PARFAIT) AR=/usr/bin/ar
1409N/A$(WITH_PARFAIT) AS=$(AS_parfait)
1409N/A$(WITHOUT_PARFAIT) AS=/usr/bin/as
1494N/A$(WITH_PARFAIT) LD=$(LD_parfait)
1494N/A$(WITHOUT_PARFAIT) LD=/usr/bin/ld
1409N/A
1422N/A# Additional environment variables needed to build with parfait
1422N/APARFAIT_ENV_gcc = PARFAIT_NATIVEGCC="$(GCC)"
1422N/APARFAIT_ENV_gcc += PARFAIT_NATIVEGXX="$(GXX)"
1422N/APARFAIT_ENV = $(PARFAIT_ENV_$(MODULE_COMPILER))
1607N/A# Output shorter error messages when parfait-wrapped compilers fail,
1607N/A# unless building with V=1 to be more verbose
1607N/APARFAIT_QUIET_ENV_V_1 = # parfait is noisy unless you tell it to be quiet
1607N/APARFAIT_QUIET_ENV_V_0 = PARFAIT_WRAPPER_QUIETNATIVE=1
1607N/APARFAIT_QUIET_ENV_V_ = $(PARFAIT_QUIET_ENV_V_0)
1607N/APARFAIT_QUIET_ENV = $(PARFAIT_QUIET_ENV_V_$(V))
1607N/APARFAIT_ENV += $(PARFAIT_QUIET_ENV)
1607N/A
1607N/A# Allow modules to override default language choices
1607N/AC_VERSION_DEFAULT = $(C_VERSION_FLAGS_SET:yes=$(POUND_SIGN))
1607N/A$(C_VERSION_DEFAULT) C_VERSION_FLAGS = $(C_VERSION_FLAGS_$(MODULE_COMPILER))
1607N/ACXX_VERSION_DEFAULT = $(CXX_VERSION_FLAGS_SET:yes=$(POUND_SIGN))
1607N/A$(CXX_VERSION_DEFAULT) CXX_VERSION_FLAGS = $(CXX_VERSION_FLAGS_$(MODULE_COMPILER))
1607N/A
1422N/A
1409N/A## Set common variables based on above rules
1607N/A# Architecture & version flags affect how compiler links to C & C++ runtimes
1607N/A# so need to be included in $(CC) and $(CXX) when passed to configure to make
1607N/A# sure configure tests are run against the right versions.
1409N/ACC = $(CC_$(CHOSEN_COMPILER))
1607N/ACC += $(ARCH_FLAGS) $(C_VERSION_FLAGS)
1409N/ACXX = $(CXX_$(CHOSEN_COMPILER))
1607N/ACXX += $(ARCH_FLAGS) $(CXX_VERSION_FLAGS)
1409N/ACFLAGS = $(CFLAGS_$(MODULE_COMPILER)) $(ARCH_FLAGS)
1607N/ACFLAGS += $(C_VERSION_FLAGS)
1409N/ACXXFLAGS = $(CXXFLAGS_$(MODULE_COMPILER)) $(ARCH_FLAGS)
1607N/ACXXFLAGS += $(CXX_VERSION_FLAGS)
1409N/AARCH32_FLAGS = $(ARCH32_FLAGS_$(MACH)_$(MODULE_COMPILER))
1409N/AARCH32_FLAGS += $(ARCH_FLAGS_$(MACH)_$(MODULE_COMPILER))
1409N/AARCH64_FLAGS = $(ARCH64_FLAGS_$(MACH)_$(MODULE_COMPILER))
1409N/AARCH64_FLAGS += $(ARCH_FLAGS_$(MACH)_$(MODULE_COMPILER))
1409N/AARCH_LIB_FLAGS = $(ARCH_LIB_FLAGS_$(MACH)_$(MODULE_COMPILER))
1409N/A
1409N/A# Flags for specific binary types
1425N/ALIB_CPPFLAGS = $(CPPFLAGS)
1409N/ALIB_CFLAGS = $(CFLAGS) $(ARCH_LIB_FLAGS)
1409N/ALIB_CXXFLAGS = $(CXXFLAGS) $(ARCH_LIB_FLAGS)
1425N/APROG_CPPFLAGS = $(CPPFLAGS) -DFD_SETSIZE=$(FD_SETSIZE)
1409N/APROG_CFLAGS = $(CFLAGS)
1409N/APROG_CXXFLAGS = $(CXXFLAGS)
1409N/A
1409N/A# Default FD_SETSIZE - 1024 was the 32-bit default and was big enough
1409N/A# <sys/select.h> makes the 64-bit default be 65536 which is way too big,
1409N/A# and eats a lot of memory for fd_sets and cpu doing operations on them
1409N/AFD_SETSIZE_DEFAULT = $(FD_SETSIZE_SET:yes=$(POUND_SIGN))
1409N/A$(FD_SETSIZE_DEFAULT) FD_SETSIZE = 1024
1409N/A
1409N/A### Linker flags
1409N/A
1409N/A# Linker mapfiles to link with for better performance & security
1409N/A# SPARC architecture requires PLT section in .data be executable, so
1409N/A# we can only make .bss, not all of .data no-exec on SPARC
1409N/AMAPFILE_NOEXBSS = -M /usr/lib/ld/map.noexbss
1409N/AMAPFILE_NOEXDATA_sparc = $(MAPFILE_NOEXBSS)
1409N/AMAPFILE_NOEXDATA_i386 = -M /usr/lib/ld/map.noexdata
1409N/AMAPFILE_NOEXDATA = $(MAPFILE_NOEXDATA_$(MACH))
1409N/AMAPFILE_PAGEALIGN = -M /usr/lib/ld/map.pagealign
1409N/AMAPFILE_HEAPALIGN = -M /usr/lib/ld/map.bssalign
1409N/A
1409N/AMAPFILES_FOR_ALL = $(MAPFILE_PAGEALIGN) $(MAPFILE_NOEXDATA)
1477N/AMAPFILES_FOR_PROGS = $(MAPFILE_HEAPALIGN) $(MAPFILE_NOEXBSS)
1409N/A
1477N/A# Security Extensions file tagging.
1477N/A#
1477N/A# Security Extensions can be explicitly controlled at the binary level via
1477N/A# tagging. Binaries built with -z <extension>=enable will have the extension
1477N/A# enabled in the 'tagged-files' model, while binaries built with
1477N/A# -z <extension>=disable will have it disabled regardless of the model.
1477N/A#
1477N/A# Currently supported extensions are:
1477N/A# -z aslr Address Space Layout Randomization
1477N/A# -z nxstack Non-executable Stack
1477N/A# -z nxheap Non-executable Heap
1477N/A#
1477N/A# -z aslr|nxstack|nxheap are only valid when linking executables.
1477N/A
1477N/AZASLR_ENABLE= -z aslr=enable
1477N/AZASLR_DISABLE= -z aslr=disable
1477N/AZASLR= $(ZASLR_ENABLE)
1477N/A
1477N/AZNXSTACK_ENABLE= -z nxstack=enable
1477N/AZNXSTACK_DISABLE= -z nxstack=disable
1477N/AZNXSTACK= $(ZNXSTACK_ENABLE)
1477N/A
1477N/AZNXHEAP_ENABLE= -z nxheap=enable
1477N/AZNXHEAP_DISABLE= -z nxheap=disable
1477N/AZNXHEAP= $(ZNXHEAP_ENABLE)
1409N/A
1425N/A# Flags to discard at link time unnecessary dependencies, .o files or
1425N/A# ELF sections that upstream may have included that we don't use.
1425N/AZDISCARD_UNUSED_DEP = -zdiscard-unused=dependencies
1425N/AZDISCARD_UNUSED_FIL = -zdiscard-unused=files
1425N/AZDISCARD_UNUSED_SEC = -zdiscard-unused=sections
1425N/A
1409N/A# Common flags for all binaries
1425N/ADEFAULT_LD_OPTIONS = -z lazyload -B direct -z guidance
1425N/ADEFAULT_LD_OPTIONS += $(MAPFILES_FOR_ALL)
1610N/ADEFAULT_LD_OPTIONS += -L$(PROTODIR)/usr/lib$(LIBSUBDIR)
1409N/A
1409N/A# Strip debug info out of non-debug builds
1425N/A$(BUILD_DEBUG:yes=$(POUND_SIGN)) DEFAULT_LD_OPTIONS += -z strip-class=debug
1409N/A
1425N/A# gcc often links with libgcc.a and/or libgcc_s.so whether it's needed or not
1425N/ADEFAULT_LD_OPTIONS_gcc = $(ZDISCARD_UNUSED_DEP) $(ZDISCARD_UNUSED_FIL)
1409N/A
1425N/ADEFAULT_LD_OPTIONS += $(DEFAULT_LD_OPTIONS_$(MODULE_COMPILER))
1409N/A
1425N/A# Ensure required flags for .so's are applied, despite libtool interference
1425N/ADEFAULT_LD_SHARED_OPTIONS = -z text -z defs
1409N/A
1425N/A# Ensure we do ASLR tagging & mark stacks/heaps non-executable on programs
1477N/ADEFAULT_LD_EXEC_OPTIONS = $(ZASLR) $(ZNXHEAP) $(ZNXSTACK) $(MAPFILES_FOR_PROGS)
1409N/A
1409N/A## Commonly added options
1409N/A
1409N/A# Link with X server private libraries like libXfont & libfontenc
1409N/AX11_SERVERLIBS_LDFLAGS= -L$(PROTODIR)$(X11_SERVERLIBS_DIR)$(ARCHLIBSUBDIR) \
1409N/A -R$(X11_SERVERLIBS_DIR)$(ARCHLIBSUBDIR)
1409N/A
1409N/A
1409N/A### Directory paths
1409N/A
1409N/A# Proto directory to install into for packaging
1409N/APROTOTOP=$(TOP)/proto
1409N/APROTODIR=$(PROTOTOP)/root_$(MACH)
1494N/APROTODIR_DEBUG=$(PROTOTOP)/root_$(MACH)-debug
1409N/APROTOMETA=$(PROTOTOP)/metadata_$(MACH)
1409N/A
1610N/A# Standard paths for modules to install into, relative to $(MODULE_PREFIX)
1610N/A# See also MODULE_DOC_DIR & MODULE_PKGCONFIG_DIR in Makefile.defs
1610N/AMODULE_BIN_DIR = $(MODULE_PREFIX)/bin
1610N/AMODULE_INCLUDES_DIR = $(MODULE_PREFIX)/include
1610N/AMODULE_LIB_DIR = $(MODULE_PREFIX)/lib
1610N/AMODULE_FULLARCH_LIB_DIR = $(MODULE_LIB_DIR)$(MODULE_ADD_LIB_SUBDIR)$(ARCHLIBSUBDIR)
1610N/AMODULE_DATA_DIR = $(MODULE_PREFIX)/share
1610N/AMODULE_LOCALE_DIR = $(MODULE_PREFIX)/share/locale
1610N/AMODULE_LC_MESSAGES_DIR = $(MODULE_LOCALE_DIR)/C/LC_MESSAGES
1610N/AMODULE_MAN_DIR = $(MODULE_PREFIX)/share/man
1610N/AMODULE_SBIN_DIR = $(MODULE_PREFIX)/sbin
1409N/A
1610N/A# System-wide standard paths that don't differ depending on $(MODULE_PREFIX)
1610N/ASMF_MANIFEST_DIR = /lib/svc/manifest
1610N/AX11_SMF_MANIFEST_DIR = $(SMF_MANIFEST_DIR)/application/x11
1610N/ASMF_METHOD_DIR = /lib/svc/method
1610N/ASHARE_FONT_DIR = /usr/share/fonts
1610N/ATRUETYPE_FONT_DIR = $(SHARE_FONT_DIR)/TrueType
1610N/AX11_FONT_DIR = $(SHARE_FONT_DIR)/X11
1610N/AX11_FONT_CATALOGUE = /etc/X11/fontpath.d
1610N/AX11_ACLOCAL_DIR = /usr/share/aclocal
1610N/AX11_BIN_DIR = /usr/bin
1610N/AX11_DOC_DIR = /usr/share/doc/X11
1610N/AX11_INCLUDES_DIR = /usr/include
1610N/AX11_LIB_DIR = /usr/lib
1610N/AX11_SGML_DIR = /usr/share/sgml/X11
1610N/AX11_X11LIB_DIR = $(X11_LIB_DIR)/X11
1610N/AXORG_SDK_INCLUDES_DIR = $(X11_INCLUDES_DIR)/xorg
1409N/A
1409N/A# Subdirectory of /usr/lib for X server private libraries
1610N/AX11_SERVERLIBS_SUBDIR = /xorg
1610N/AX11_SERVERLIBS_DIR = $(X11_LIB_DIR)$(X11_SERVERLIBS_SUBDIR)
1409N/A
1409N/A# Subdirectory of /usr/lib for X server loadable modules
1610N/AX11_SERVERMODS_SUBDIR = /xorg/modules
1610N/AX11_SERVERMODS_DIR = $(X11_LIB_DIR)$(X11_SERVERMODS_SUBDIR)
1610N/AMESA_XSERVERMODS_DIR = /usr/lib/mesa/modules
1409N/A
1409N/A# PKGCONFIG_DIR is constructed of _prefix + ARCHLIBSUBDIR + _suffix
1409N/APKGCONFIG_DIR_prefix=/usr/lib
1409N/APKGCONFIG_DIR_suffix=/pkgconfig
1409N/APKGCONFIG_DIR=$(PKGCONFIG_DIR_prefix)$(ARCHLIBSUBDIR)$(PKGCONFIG_DIR_suffix)
1409N/APKGCONFIG_DIR_32=$(PKGCONFIG_DIR_prefix)$(PKGCONFIG_DIR_suffix)
1409N/APKGCONFIG_DIR_64=$(PKGCONFIG_DIR_prefix)/$(SUBDIR64)$(PKGCONFIG_DIR_suffix)
1409N/APKGCONFIG_DIR_SHARE=/usr/share$(PKGCONFIG_DIR_suffix)
1409N/A
1409N/A# System-wide directory for packaged release notes
1409N/ARELNOTES_DIR=/usr/share/doc/release-notes
1409N/A
1409N/A# Directory used for installing tools used during build but not
1409N/A# delivered in packages
1409N/ATOOLS_DIR=$(PROTOTOP)/tools_$(MACH)
1409N/A
1409N/A# Work around _TIME, _DATE, embedded date chatter in component builds
1409N/A# to use, set TIME_CONSTANT in the component Makefile and add $(CONSTANT_TIME)
1409N/A# to the appropriate MODULE_CONFIG_ENV/MODULE_BUILD_ENV/MODULE_INSTALL_ENV
1409N/ACONSTANT_TIME = LD_PRELOAD_32=$(TOOLS_DIR)/time-$(MACH32).so
1409N/ACONSTANT_TIME += LD_PRELOAD_64=$(TOOLS_DIR)/time-$(MACH64).so
1409N/ACONSTANT_TIME += TIME_CONSTANT=$(TIME_CONSTANT)
1409N/A
1409N/A### Other tools needed to build
1409N/A
1409N/A## Python tools & paths
1409N/A# When changing PYTHON_VERSION, check that PYTHON_PKG_VERSION &
1409N/A# PYTHON_PATH_VERSION are still set correctly in pkg/Makefile
1462N/APYTHON_VERSION=3.4
1409N/APYTHON=/usr/bin/python$(PYTHON_VERSION)
1409N/APYTHON_PATH=$(PROTODIR)/usr/lib/python$(PYTHON_VERSION)/vendor-packages:$(PROTODIR)/usr/lib/python$(PYTHON_VERSION)/site-packages:/usr/lib/python$(PYTHON_VERSION)/vendor-packages:/usr/lib/python$(PYTHON_VERSION)/site-packages
1409N/A# We want our python modules installed to vendor-packages, not site-packages
1409N/APYTHON_VENDOR_DIR = /usr/lib/python$(PYTHON_VERSION)/vendor-packages
1409N/A
1409N/A## Perl tools & paths
1409N/A# When changing PERL_VERSION, check that PERL_PKG_VERSION is
1409N/A# still set correctly in pkg/Makefile
1628N/APERL_VERSION = 5.22
1409N/APERL = /usr/perl5/$(PERL_VERSION)/bin/perl
1418N/A# perl -p/-n commands treat missing files as warnings, not fatal errors
1418N/A# Adding the following raises them to errors so that make detects a problem
1418N/APERL_MISSING_FILES_ERROR = -e 'BEGIN {$$SIG{__WARN__} = sub { die $$_[0] };}'
1409N/A
1409N/A# Script used to install files in proto area
1409N/AINSTALL_SCRIPT=$(TOP)/open-src/common/install-sh -c
1409N/A
1409N/A# Some modules (such as FreeType 2) require GNU make
1409N/AGNUMAKE = gmake
1409N/A
1409N/A# Pick a version of GNU automake, since Solaris includes multiple ones
1549N/AAUTOMAKE_VERSION=1.15
1409N/A
1409N/A# Directory to find tools used during build, even when installing to a
1409N/A# temporary dest dir, such as during 'make manifest'
1610N/APROTOTOOLSDIR = $(PROTODIR)
1610N/APROTOTOOLS_BIN_DIR = $(PROTODIR)/usr/bin
1409N/A
1409N/A# Some modules use lndir to merge in sources from Sun specific directories
1610N/ALNDIR = $(PROTOTOOLS_BIN_DIR)/lndir
1409N/A
1409N/A# Commands to run font utilities from proto area
1610N/AMKFONTSCALE = $(PROTOTOOLS_BIN_DIR)/mkfontscale
1610N/AINSTALLALIAS = $(PROTOTOOLSDIR)$(X11_X11LIB_DIR)/installalias
1610N/AFC_QUERY = $(PROTOTOOLS_BIN_DIR)/fc-query
1610N/AFC_SCAN = $(PROTOTOOLS_BIN_DIR)/fc-scan
1479N/A# mkfontdir is just a shell wrapper around /usr/bin/mkfontscale, so we call
1479N/A# it directly here, instead of futzing with command paths in the script
1479N/AMKFONTDIR=$(MKFONTSCALE) -b -s -l
1409N/A
1409N/A# Script fragment to start echoing commands in shell sequences in make rules
1409N/A# Sets PS4 to "" so output isn't prepended with "+ " and looks like normal
1409N/A# make output
1409N/ASTART_CMD_ECHO = PS4="" ; set -x
1409N/A
1409N/A### Sources, in-tree and upstream
1409N/A
1409N/ATARBALLDIR=$(TOP)/open-src/tarballs
1416N/AWGET=/usr/bin/wget --no-check-certificate
1409N/AGIT=git
1409N/A
1409N/A# If you need to use a closer mirror for X.Org or SourceForge, override
1409N/A# these in your Makefile.options file
1409N/AXRU_DEFAULT = $(XORG_RELEASES_URL_SET:yes=$(POUND_SIGN))
1409N/A$(XRU_DEFAULT) XORG_RELEASES_URL=http://www.x.org/releases/individual
1409N/ASFU_DEFAULT = $(SF_DOWNLOADS_URL_SET:yes=$(POUND_SIGN))
1409N/A$(SFU_DEFAULT) SF_DOWNLOADS_URL=http://downloads.sourceforge.net/project
1409N/A
1409N/A# Git repositories hosted on freedesktop.org (X.Org, Mesa, pixman, etc.)
1409N/AFDO_GIT_DEFAULT = $(FDO_GIT_URL_SET:yes=$(POUND_SIGN))
1409N/A$(FDO_GIT_DEFAULT) FDO_GIT_URL=http://anongit.freedesktop.org/git
1409N/AXORG_GIT_DEFAULT = $(XORG_GIT_URL_SET:yes=$(POUND_SIGN))
1409N/A$(XORG_GIT_DEFAULT) XORG_GIT_URL=$(FDO_GIT_URL)/xorg
1409N/A
1409N/A# Target created when sources are unpacked
1409N/AUNPACK_FILE = .unpack_done
1409N/AUNPACK_TARGET = $(SOURCE_DIR)/$(UNPACK_FILE)
1409N/A
1409N/A# Most module versions are in the individual makefiles, but the Xserver is
1409N/A# referenced in multiple places, so it's kept here for easy sharing.
1409N/A#
1409N/A# Current Xorg server source tarball to use sources from:
1634N/AXORGSERVER_VERS=1.18.3
1409N/A# Minimum Xorg server version that we expect to be ABI compatible with.
1409N/A# Usually .99 of the previous minor release series, as that's the convention
1409N/A# for the development snapshots of the next release series.
1634N/AMIN_XSERVER_VERS=1.17.99
1409N/A# Next highest Xorg server version that we expect to be ABI incompatible with.
1409N/A# Usually .99 of the current release series, as Xorg tends to break ABI's
1409N/A# in each minor release train (1.8, 1.9, etc.)
1634N/ANEXT_XSERVER_VERS=1.19.99
1409N/A
1409N/A# Version of pkgfmt output rules to apply
1409N/APKGFMT_OUTPUT=v2
1409N/APKGFMT= PKGFMT_OUTPUT=$(PKGFMT_OUTPUT) /usr/bin/pkgfmt
1409N/A
1409N/A### Misc rules
1409N/A
1409N/A# For use in debugging or calling from scripts like the code review helper
1409N/A# Use such as: make print_make_vars VARS="MODTYPE MODULE_NAME"
1409N/A# or: make print_make_vars BUILD_TYPE=32 VARS=SOURCE_DIR
1409N/Aprint_make_var-%:
1409N/A @print -n ' $(@:print_make_var-%=%)="$($(@:print_make_var-%=%))"'
1409N/A
1409N/Aprint_make_vars: $(VARS:%=print_make_var-%)
1409N/A @print '\n'