shared-macros.mk revision 29
2N/A#
2N/A# CDDL HEADER START
2N/A#
2N/A# The contents of this file are subject to the terms of the
2N/A# Common Development and Distribution License (the "License").
2N/A# You may not use this file except in compliance with the License.
2N/A#
2N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2N/A# or http://www.opensolaris.org/os/licensing.
2N/A# See the License for the specific language governing permissions
2N/A# and limitations under the License.
2N/A#
2N/A# When distributing Covered Code, include this CDDL HEADER in each
2N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2N/A# If applicable, add the following below this CDDL HEADER, with the
2N/A# fields enclosed by brackets "[]" replaced with your own identifying
2N/A# information: Portions Copyright [yyyy] [name of copyright owner]
2N/A#
2N/A# CDDL HEADER END
2N/A#
2N/A# Copyright (c) 2010, Oracle and/or it's affiliates. All rights reserved.
2N/A#
2N/A
2N/ACONSOLIDATION = userland
2N/APUBLISHER = $(CONSOLIDATION)-build
26N/A
29N/A# get the most recent build number from the last mercurial tag
29N/ALAST_HG_TAG = $(shell hg tags -q | head -2 | tail -1)
29N/ALAST_BUILD_NUM = $(LAST_HG_TAG:build-%=%)
29N/A
26N/AOS_VERSION = $(shell uname -r)
26N/ASOLARIS_VERSION = $(OS_VERSION:5.%=2.%)
29N/ABUILD_NUM = 0.$(shell expr $(LAST_BUILD_NUM) + 1)
26N/ABUILD_VERSION = $(OS_VERSION)-$(BUILD_NUM)
2N/A
2N/ACOMPILER = studio
6N/ABITS = 32
2N/APYTHON_VERSION = 2.6
2N/A
2N/ATOOLS = $(WS_TOP)/tools
2N/AWS_LOGS = $(WS_TOP)/logs
2N/AMAKE_RULES = $(WS_TOP)/components/make-rules
2N/A
2N/APKG_REPO = file://$(WS_TOP)/repo
12N/APROTO_DIR = $(shell pwd)/$(COMPONENT_SRC)/installed-prototype-$(MACH)
2N/A
16N/A# work around _TIME, _DATE, embedded date chatter in component builds
16N/A# to use, set TIME_CONSTANT in the component Makefile and add $(CONSTANT_TIME)
16N/A# to the appropriate {CONFIGURE|BUILD|INSTALL}_ENV
16N/ACONSTANT_TIME = LD_PRELOAD_32=$(TOOLS)/time-$(MACH32).so
16N/ACONSTANT_TIME += LD_PRELOAD_64=$(TOOLS)/time-$(MACH64).so
16N/ACONSTANT_TIME += TIME_CONSTANT=$(TIME_CONSTANT)
6N/A
12N/A# set MACH from uname -p to either sparc or i386
12N/AMACH = $(shell uname -p)
12N/A
12N/A# set MACH32 from MACH to either sparcv7 or i86
12N/AMACH32_1 = $(MACH:sparc=sparcv7)
12N/AMACH32 = $(MACH32_1:i386=i86)
12N/A
12N/A# set MACH64 from MACH to either sparcv9 or amd64
12N/AMACH64_1 = $(MACH:sparc=sparcv9)
12N/AMACH64 = $(MACH64_1:i386=amd64)
12N/A
12N/ABUILD_32 = $(COMPONENT_SRC)/build-$(MACH32)/.built
12N/ABUILD_64 = $(COMPONENT_SRC)/build-$(MACH64)/.built
12N/ABUILD_32_and_64 = $(BUILD_32) $(BUILD_64)
12N/A
12N/AINSTALL_32 = $(COMPONENT_SRC)/build-$(MACH32)/.installed
12N/AINSTALL_64 = $(COMPONENT_SRC)/build-$(MACH64)/.installed
12N/AINSTALL_32_and_64 = $(INSTALL_32) $(INSTALL_64)
2N/A
2N/ASPRO_ROOT = /opt/sunstudio12.1
2N/AGCC_ROOT = /usr/gnu
2N/A
2N/ACC.studio.32 = $(SPRO_ROOT)/bin/cc -m32
2N/ACCC.studio.32 = $(SPRO_ROOT)/bin/CC -m32
2N/A
2N/ACC.studio.64 = $(SPRO_ROOT)/bin/cc -m64
2N/ACCC.studio.64 = $(SPRO_ROOT)/bin/CC -m64
2N/A
2N/ACC.gcc.32 = $(GCC_ROOT)/bin/cc -m32
2N/ACCC.gcc.32 = $(GCC_ROOT)/bin/CC -m32
2N/A
2N/ACC.gcc.64 = $(GCC_ROOT)/bin/cc -m64
2N/ACCC.gcc.64 = $(GCC_ROOT)/bin/CC -m64
2N/A
2N/ACC = $(CC.$(COMPILER).$(BITS))
2N/ACCC = $(CCC.$(COMPILER).$(BITS))
2N/A
16N/ALD = /usr/bin/ld
16N/A
2N/APYTHON.2.4.32 = /usr/bin/python2.4
2N/APYTHON.2.4.64 = /usr/bin/amd64/python2.4
2N/A
2N/APYTHON.2.6.32 = /usr/bin/python2.6
2N/APYTHON.2.6.64 = /usr/bin/amd64/python2.6
2N/A
2N/APYTHON.32 = $(PYTHON.$(PYTHON_VERSION).$(BITS))
2N/APYTHON.64 = $(PYTHON.$(PYTHON_VERSION).$(BITS))
2N/A
2N/AGMAKE = /usr/gnu/bin/make
2N/AGPATCH = /usr/gnu/bin/patch
2N/AGPATCH_FLAGS = -p1 -b
2N/A
2N/APKGSEND = /usr/bin/pkgsend
2N/A
2N/ATOUCH = /usr/bin/touch
2N/AMKDIR = /bin/mkdir -p
2N/ARM = /bin/rm -f
7N/ACP = /bin/cp -f
16N/AENV = /usr/bin/env