shared-macros.mk revision 43
163N/A#
163N/A# CDDL HEADER START
163N/A#
163N/A# The contents of this file are subject to the terms of the
163N/A# Common Development and Distribution License (the "License").
163N/A# You may not use this file except in compliance with the License.
163N/A#
163N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
163N/A# or http://www.opensolaris.org/os/licensing.
163N/A# See the License for the specific language governing permissions
163N/A# and limitations under the License.
163N/A#
163N/A# When distributing Covered Code, include this CDDL HEADER in each
163N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
163N/A# If applicable, add the following below this CDDL HEADER, with the
163N/A# fields enclosed by brackets "[]" replaced with your own identifying
163N/A# information: Portions Copyright [yyyy] [name of copyright owner]
163N/A#
163N/A# CDDL HEADER END
163N/A#
163N/A# Copyright (c) 2010, Oracle and/or it's affiliates. All rights reserved.
163N/A#
163N/A
163N/APATH=/usr/bin:/usr/gnu/bin
163N/A
163N/ACONSOLIDATION = userland
163N/APUBLISHER = $(CONSOLIDATION)-build
163N/A
163N/AIS_GLOBAL_ZONE = $(shell /usr/sbin/zoneadm list | grep -c global)
211N/AROOT = /
636N/A
636N/A# get the most recent build number from the last mercurial tag
211N/ALAST_HG_TAG = $(shell hg tags -q | head -2 | tail -1)
211N/ALAST_BUILD_NUM = $(LAST_HG_TAG:build-%=%)
636N/A
618N/AOS_VERSION = $(shell uname -r)
163N/ASOLARIS_VERSION = $(OS_VERSION:5.%=2.%)
163N/ABUILD_NUM = 0.$(shell expr $(LAST_BUILD_NUM) + 1)
163N/ABUILD_VERSION = $(OS_VERSION)-$(BUILD_NUM)
163N/A
163N/A
211N/ACOMPILER = studio
163N/ABITS = 32
163N/APYTHON_VERSION = 2.6
163N/APYTHON_VERSIONS = 2.4 2.6
163N/A
163N/AWS_LOGS = $(WS_TOP)/logs
163N/AWS_REPO = $(WS_TOP)/repo
163N/AWS_TOOLS = $(WS_TOP)/tools
163N/AWS_MAKE_RULES = $(WS_TOP)/make-rules
163N/AWS_COMPONENTS = $(WS_TOP)/components
163N/A
163N/ABASS_O_MATIC = $(WS_TOOLS)/bass-o-matic
163N/A
163N/APKG_REPO = file:$(WS_REPO)
163N/APROTO_DIR = $(shell pwd)/$(COMPONENT_SRC)/installed-prototype-$(MACH)
163N/A
163N/ASFWBIN = /usr/sfw/bin
163N/ASFWLIB = /usr/sfw/lib
163N/APROTOSFWBIN = $(PROTO_DIR)/$(SFWBIN)
163N/APROTOSFWLIB = $(PROTO_DIR)/$(SFWLIB)
163N/A
163N/A# work around _TIME, _DATE, embedded date chatter in component builds
163N/A# to use, set TIME_CONSTANT in the component Makefile and add $(CONSTANT_TIME)
163N/A# to the appropriate {CONFIGURE|BUILD|INSTALL}_ENV
163N/ACONSTANT_TIME = LD_PRELOAD_32=$(WS_TOOLS)/time-$(MACH32).so
163N/ACONSTANT_TIME += LD_PRELOAD_64=$(WS_TOOLS)/time-$(MACH64).so
163N/ACONSTANT_TIME += TIME_CONSTANT=$(TIME_CONSTANT)
163N/A
163N/A# set MACH from uname -p to either sparc or i386
163N/AMACH = $(shell uname -p)
163N/A
211N/A# set MACH32 from MACH to either sparcv7 or i86
163N/AMACH32_1 = $(MACH:sparc=sparcv7)
163N/AMACH32 = $(MACH32_1:i386=i86)
163N/A
163N/A# set MACH64 from MACH to either sparcv9 or amd64
163N/AMACH64_1 = $(MACH:sparc=sparcv9)
211N/AMACH64 = $(MACH64_1:i386=amd64)
163N/A
163N/ABUILD_32 = $(COMPONENT_SRC)/build-$(MACH32)/.built
163N/ABUILD_64 = $(COMPONENT_SRC)/build-$(MACH64)/.built
163N/ABUILD_32_and_64 = $(BUILD_32) $(BUILD_64)
163N/A
163N/AINSTALL_32 = $(COMPONENT_SRC)/build-$(MACH32)/.installed
163N/AINSTALL_64 = $(COMPONENT_SRC)/build-$(MACH64)/.installed
163N/AINSTALL_32_and_64 = $(INSTALL_32) $(INSTALL_64)
163N/A
211N/A# BUILD_TOOLS is the root of all tools not normally installed on the system.
211N/ABUILD_TOOLS = /ws/onnv-tools
163N/A
163N/ASPRO_ROOT = $(BUILD_TOOLS)/SUNWspro
163N/ASPRO_VROOT = $(SPRO_ROOT)/sunstudio12.1
163N/A
163N/AGCC_ROOT = /usr/gnu
163N/A
181N/ACC.studio.32 = $(SPRO_VROOT)/bin/cc -m32
163N/ACCC.studio.32 = $(SPRO_VROOT)/bin/CC -m32
163N/A
163N/ACC.studio.64 = $(SPRO_VROOT)/bin/cc -m64
163N/ACCC.studio.64 = $(SPRO_VROOT)/bin/CC -m64
CC.gcc.32 = $(GCC_ROOT)/bin/cc -m32
CCC.gcc.32 = $(GCC_ROOT)/bin/CC -m32
CC.gcc.64 = $(GCC_ROOT)/bin/cc -m64
CCC.gcc.64 = $(GCC_ROOT)/bin/CC -m64
CC = $(CC.$(COMPILER).$(BITS))
CCC = $(CCC.$(COMPILER).$(BITS))
LD = /usr/bin/ld
PYTHON.2.4.32 = /usr/bin/python2.4
PYTHON.2.4.64 = /usr/bin/amd64/python2.4
PYTHON.2.6.32 = /usr/bin/python2.6
PYTHON.2.6.64 = /usr/bin/amd64/python2.6
PYTHON.32 = $(PYTHON.$(PYTHON_VERSION).$(BITS))
PYTHON.64 = $(PYTHON.$(PYTHON_VERSION).$(BITS))
GMAKE = /usr/gnu/bin/make
GPATCH = /usr/gnu/bin/patch
GPATCH_FLAGS = -p1 -b
PKGSEND = /usr/bin/pkgsend
TOUCH = /usr/bin/touch
MKDIR = /bin/mkdir -p
RM = /bin/rm -f
CP = /bin/cp -f
LN = /bin/ln
SYMLINK = /bin/ln -s
ENV = /usr/bin/env
INSTALL = /usr/bin/ginstall