Makefile.var revision 10922:e2081f502306
175374Sbp#
275374Sbp# CDDL HEADER START
375374Sbp#
475374Sbp# The contents of this file are subject to the terms of the
575374Sbp# Common Development and Distribution License (the "License").
675374Sbp# You may not use this file except in compliance with the License.
775374Sbp#
875374Sbp# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
975374Sbp# or http://www.opensolaris.org/os/licensing.
1075374Sbp# See the License for the specific language governing permissions
1175374Sbp# and limitations under the License.
1275374Sbp#
1375374Sbp# When distributing Covered Code, include this CDDL HEADER in each
1475374Sbp# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1575374Sbp# If applicable, add the following below this CDDL HEADER, with the
1675374Sbp# fields enclosed by brackets "[]" replaced with your own identifying
1775374Sbp# information: Portions Copyright [yyyy] [name of copyright owner]
1875374Sbp#
1975374Sbp# CDDL HEADER END
2075374Sbp#
2175374Sbp
2275374Sbp#
2375374Sbp# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
2475374Sbp# Use is subject to license terms.
2575374Sbp#
2675374Sbp
2775374Sbp# The link-editor related source files and Makefile files have at times been
2875374Sbp# unified across all presently maintained release gates.  However, some of the
2975374Sbp# compiler pre-processor flags and link-editor flags are different among the
3075374Sbp# releases.  This file is used to specify such flags. 
3175374Sbp# 
3275374Sbp# This file is included by ./Makefile.com, but may also be included directly in
3375374Sbp# the case where the utility is relying on the contents of ../../Makefile.com.
3475374Sbp# 
3575374Sbp# This file should be the only file which is different among the presently
3675374Sbp# maintained release workspaces, when the sources are unified.
3775374Sbp#
3875374Sbp# CPPFEATUREMACROS provides for selectively turning on/off features within the
3975374Sbp# various link-editor components.  Presently, none are set.
4075374Sbp#
4175374Sbp# Some source files need to use #ifdef to distinguish between the patch release,
4275374Sbp# and for the packages targeting to the pre-libc/libthread unified environment.
4375374Sbp# These values are available for CPPFLAGS:
4475374Sbp#	
4575374Sbp#	SGS_PRE_UNIFIED_PROCESS
4675374Sbp#
4775374Sbp#		is set if the target release is for pre-libc/libthread unified
4875374Sbp#		environment. This is used for rtld and crle.
4975374Sbp
5075374Sbp#
5175374Sbp# Common Macro definitions
5275374Sbp#
5375374SbpVAR_CPPFLAGS=
5475374SbpVAR_LINTFLAGS64=	-m64
5575374Sbp
5675374SbpVAR_PLAT_sparc=		sparc
5775374SbpVAR_PLAT_i386=		intel/ia32
5875374SbpVAR_PLAT_amd64=		intel/amd64
5975374Sbp
6075374SbpVAR_POUND_1=
6175374SbpVAR_POUND_2=		$(POUND_SIGN)
6275374Sbp
6375374Sbp#
6475374Sbp# VAR_AVLDIR - directory to find avl.c in.
6575374Sbp#
6675374Sbp# The avl.c file is under usr/src/common/avl in Solaris 10 (and later),
6775374Sbp# but in earlier releases it is not present (problem to be solved).
6875374Sbp#
6975374Sbp# The avl.h and avl_impl.h files are under usr/src/uts/common/sys in
7075374Sbp# Solaris 10 (and later). They are under usr/src/cmd/sgs/tools/common/sys
7175374Sbp# in Solaris 9 and earlier.
7275374Sbp#
7375374Sbp# For Solaris 9 and earlier releases, we will have our own copy of the
7475374Sbp# files avl.c, avl.h and avl_impl.h until these files are back ported into
7575374Sbp# the system.
7675374Sbp#
7775374SbpVAR_AVLDIR=		$(SRCBASE)/common/avl
7875374SbpVAR_AVLINCDIR=		-I $(SRCBASE)/uts/common
7975374Sbp
8075374Sbp#
8188741Sbp# VAR_DTRDIR - directory to find dtrace_data.c in.
8288741Sbp#
8375374Sbp# In Solaris 10 and earlier releases, dtrace_data.c was maintained as separate
8491022Sbp# files under sgs/rtld.  This file is now under usr/src/common/dtrace.
8575374Sbp#
8675374SbpVAR_DTRDIR=             $(SRCBASE)/common/dtrace
8775374Sbp
8875374Sbp#
8975374Sbp# VAR_SGSBINPROG
9075374Sbp#
9175374Sbp# For Solaris 10 and earlier releases, the SGS components were installed in
9275374Sbp# /usr/ccs/bin.  These components are now installed in /usr/bin with associated
9375374Sbp# symbolic links for compatibility. For previous behavior, set the VAR_SGSBIN*
9475374Sbp# variables to the appropriate ROOTCCSBIN* rule and set the VAR_SGSCCSLINK*
9575374Sbp# rules to null.
9675374Sbp#
9775374SbpVAR_SGSBIN=		$(ROOTBIN)
9875374SbpVAR_SGSBINPROG=		$(ROOTPROG)
9975374SbpVAR_SGSBIN64=		$(ROOTBIN64)
10075374SbpVAR_SGSBINPROG64=	$(ROOTPROG64)
10175374Sbp
10275374SbpVAR_SGSCCSLINK=		$(ROOTCCSBINLINK)
10375374SbpVAR_SGSCCSLINK64=	$(ROOTCCSBINLINK64)
10475374Sbp
10575374Sbp#
10675374Sbp# ld
10775374Sbp#
10875374SbpVAR_LD_NATIVE_LLDLIBS=
10975374SbpVAR_LD_LLDFLAGS=	'-R$$ORIGIN/../../lib'
11075374SbpVAR_LD_LLDFLAGS64 =	'-R$$ORIGIN/../../../lib/$(MACH64)'
11175374Sbp
11275374Sbp#
11375374Sbp# elfdump
11475374Sbp#
11575374SbpVAR_ELFDUMP_LLDFLAGS=	'-R$$ORIGIN/../../lib'
11675374SbpVAR_ELFDUMP_LLDFLAGS64 ='-R$$ORIGIN/../../../lib/$(MACH64)'
11775374Sbp
11888741Sbp#
11975374Sbp# elfedit
12075374Sbp#
12175374SbpVAR_ELFEDIT_LLDFLAGS=	'-R$$ORIGIN/../../lib'
12275374SbpVAR_ELFEDIT_LLDFLAGS64 ='-R$$ORIGIN/../../../lib/$(MACH64)'
12375374Sbp
12475374Sbp#
12575374Sbp# lddstub
12675374Sbp#
12775374SbpVAR_LDDSTUB_INTERP=	-I'$$ORIGIN/ld.so.1'
12875374Sbp
12975374Sbp#
13075374Sbp# libconv
13175374Sbp#
13275374SbpVAR_LIBCONV_CPPFLAGS=
13375374Sbp
13475374Sbp#
13575374Sbp# libelf
13675374Sbp#
13775374SbpVAR_LIBELF_LDLIBS=
13875374SbpVAR_LIBELF_ROOTDEMODIR_DIRMODE=	755
13975374Sbp
14075374Sbp#
14175374Sbp# libld
14275374Sbp#
14375374SbpVAR_LIBLD_CPPFLAGS=		$(VAR_COM_CPPFLAGS) \
14475374Sbp				$(VAR_AVLINCDIR)
14575374SbpVAR_LIBLD_64_ROOTFS_LIBDIR=	$(ROOT)/lib/$(MACH64)
14675374Sbp
14775374Sbp#
14875374Sbp# Tools
149118078Stjr#
15075374SbpVAR_TOOLS_CPPFLAGS=		$(VAR_AVLINCDIR)
15175374Sbp
15275374Sbp#
15375374Sbp# liblddbg
15475374Sbp#
15575374SbpVAR_LIBLDDBG_V9_ROOTFS_LIBDIR=	$(ROOT)/lib/$(MACH64)
15675374SbpVAR_LIBLDDBG_CPPFLAGS=-DDEMANGLE
15775374Sbp
15875374Sbp#
15975374Sbp# librtld_db
16075374Sbp#
16175374SbpVAR_LIBRTLD_DB_RDB_DEMO_LINTFLAGS64=	$(VAR_LINTFLAGS64)
16275374Sbp
16375374Sbp#
16475374Sbp# rtld
16575374Sbp#
16675374SbpVAR_RTLD_CPICLIB=	-L ../../../../lib/libc/$(MACH)
167102479SbdeVAR_RTLD_CPICLIB64=	-L ../../../../lib/libc/$(MACH64)
16875374SbpVAR_RTLD_SONAME=	/lib/ld.so.1
16975374SbpVAR_RTLD_V9_SONAME=	/lib/sparcv9/ld.so.1
17075374Sbp
17175374SbpVAR_RTLD_ETCDYNLIB=
17275374SbpVAR_RTLD_CPPFEATUREMACROS=
17375374SbpVAR_RTLD_CPPFLAGS=	$(VAR_AVLINCDIR)
17475374SbpVAR_RTLD_EXTRASUBDIRS=	mdbmod
17575374Sbp