corba/make/common/Defs-solaris.gmk
author mikejwre
Thu, 03 Dec 2009 12:52:46 -0800
changeset 4400 6f7b7cb74a72
parent 4 02bb8761fcce
child 5555 b2b5ed3f0d0d
permissions -rw-r--r--
Added tag jdk7-b77 for changeset a9713976af74

#
# Copyright 1995-2007 Sun Microsystems, Inc.  All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation.  Sun designates this
# particular file as subject to the "Classpath" exception as provided
# by Sun in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
# CA 95054 USA or visit www.sun.com if you need additional information or
# have any questions.
#

#
# Makefile to specify compiler flags for programs and libraries
# targeted to Solaris.  Should not contain any rules.
#

# Warning: the following variables are overridden by Defs.gmk. Set
# values will be silently ignored:
#   CFLAGS        (set $(OTHER_CFLAGS) instead)
#   CPPFLAGS      (set $(OTHER_CPPFLAGS) instead)
#   CXXFLAGS      (set $(OTHER_CXXFLAGS) instead)
#   LDFLAGS       (set $(OTHER_LDFAGS) instead)
#   LDLIBS        (set $(EXTRA_LIBS) instead)
#   LDLIBS_COMMON (set $(EXTRA_LIBS) instead)
#   LINTFLAGS     (set $(OTHER_LINTFLAGS) instead)

# Get shared JDK settings
include $(BUILDDIR)/common/shared/Defs.gmk

ifndef PLATFORM_SRC
PLATFORM_SRC = $(TOPDIR)/src/solaris
endif # PLATFORM_SRC

# platform specific include files
PLATFORM_INCLUDE_NAME = $(PLATFORM)
PLATFORM_INCLUDE      = $(INCLUDEDIR)/$(PLATFORM_INCLUDE_NAME)

# suffix used for make dependencies files
DEPEND_SUFFIX = d
# suffix used for lint files
LINT_SUFFIX = ln
# The suffix applied to the library name for FDLIBM
FDDLIBM_SUFFIX = a
# The suffix applied to scripts (.bat for windows, nothing for unix)
SCRIPT_SUFFIX =
# CC compiler object code output directive flag value
CC_OBJECT_OUTPUT_FLAG = -o #trailing blank required!
CC_PROGRAM_OUTPUT_FLAG = -o #trailing blank required!

#
# Default HPI libraries. Build will build only native unless
# overriden at the make command line. This makes it convenient for
# people doing, say, a pthreads port -- they can create a posix
# directory here, and say "gnumake HPIS=posix" at the top
# level.
#
HPIS = native

#
# Java default optimization (-x04/-O2) etc.  Applies to the VM.
#
ifeq ($(PRODUCT), java)
    _OPT = $(CC_HIGHER_OPT)
else
    _OPT = $(CC_LOWER_OPT)
    CPPFLAGS_DBG    += -DLOGGING -DDBINFO
endif

#
# If -Xa is in CFLAGS_COMMON it will end up ahead of $(POPT) for the
# optimized build, and that ordering of the flags completely freaks
# out cc.  Hence, -Xa is instead in each CFLAGS variant.
#
# The more unusual options to the Sun C compiler:
#	-v		Stricter type checking, more error checking
#			(To turn ALL warnings into fatals, use -errwarn=%all)
#	-xstrconst	Place string literals and constants in read-only area
#			(means you can't write on your string literals)
#	-xs		Force debug information (stabs) into the .so or a.out
#			(makes the library/executable debuggable without the
#			.o files needing to be around, but at a space cost)
#	-g & -O		If you add the -g option to the optimized compiles
#			you will get better stack retraces, the code is
#			still optimized. This includes a space cost too.
#       -xc99=%none     Do NOT allow for c99 extensions to be used.
#                       e.g. declarations must precede statements
#       -xCC            Allow the C++ style of comments in C: //
#                       Required with many of the source files.
#       -mt             Assume multi-threaded (important)
#

#
# Debug flag for C and C++ compiler
#
CFLAGS_DEBUG_OPTION=-g
CXXFLAGS_DEBUG_OPTION=-g

# Turn off -g if we are doing tcov build
ifdef TCOV_BUILD
  CFLAGS_DEBUG_OPTION=
  CXXFLAGS_DEBUG_OPTION=
endif

# FASTDEBUG: Optimize the -g builds, gives us a faster debug java
#        If true adds -O to the debug compiles. This allows for any assert
#        tests to remain and debug checking. The resulting code is faster
#        but less debuggable.  Stack traces are still valid, although only
#        approximate line numbers are given. Printing of local variables
#        during a debugging session is not possible, but stepping and
#        printing of global or static variables should be possible.
#        Performance/size of files should be about the same, maybe smaller.
#
ifeq ($(FASTDEBUG), true)
  CC_FASTDEBUG_OPT       = $(CC_LOWER_OPT)
  CFLAGS_DEBUG_OPTION    = -g   $(CC_FASTDEBUG_OPT)
  CXXFLAGS_DEBUG_OPTION  = -g0  $(CC_FASTDEBUG_OPT)
endif

CFLAGS_COMMON   = -v -mt -L$(OBJDIR) -xc99=%none
CFLAGS_COMMON  += -xCC
CFLAGS_COMMON  += -errshort=tags
CFLAGS_OPT      = $(POPT)
CFLAGS_DBG      = $(CFLAGS_DEBUG_OPTION)
CFLAGS_COMMON  +=  -Xa $(CFLAGS_REQUIRED)

# Assume MT behavior all the time (important)
CXXFLAGS_COMMON  = -mt

# Assume no C++ exceptions are used
CXXFLAGS_COMMON += -features=no%except -DCC_NOEX

# For C++, these options tell it to assume nothing about locating libraries
#    either at compile time, or at runtime. Use of these options will likely
#    require the use of -L and -R options to indicate where libraries will
#    be found at compile time (-L) and at runtime (-R).
#    The /usr/lib location comes for free, so no need to specify that one.
#    Note: C is much simplier and there is no need for these options. This
#          is mostly needed to avoid dependencies on libraries in the
#          Compiler install area, also see LIBCXX and LIBM.
CXXFLAGS_COMMON += -norunpath -xnolib

#
# Treat compiler warnings as errors, if requested
#
ifeq ($(COMPILER_WARNINGS_FATAL),true)
  CFLAGS_COMMON += -errwarn=%all
  CXXFLAGS_COMMON += -errwarn=%all
endif

CXXFLAGS_OPT	= $(POPT)
CXXFLAGS_DBG	= $(CXXFLAGS_DEBUG_OPTION)
CXXFLAGS_COMMON += $(CFLAGS_REQUIRED)

# Add -xstrconst to the library compiles. This forces all string
#  literals into the read-only data section, which prevents them from
#  being written to and increases the runtime pages shared on the system.
#
ifdef LIBRARY
  CFLAGS_COMMON +=-xstrconst
endif

# Source browser database
#
# COMPILE_WITH_SB    
#        If defined adds -xsb to compiles and creates a
#        source browsing database during compilation.
#
ifdef COMPILE_WITH_SB
  ifeq ($(LIBRARY), java)
    CFLAGS_DBG +=   -xsb
  endif
endif

# Lint Flags:
#	-Xa			ANSI C plus K&R, favor ANSI rules
#       -Xarch=XXX		Same as 'cc -xarch=XXX'
#	-fd			report on old style func defs
#	-errchk=structarg	report on 64bit struct args by value
#	-errchk=longptr64	report on 64bit to 32bit issues (ignores casts)
#	-errchk=parentheses	report on suggested use of extra parens
#	-v 			suppress unused args
#	-x			suppress unused externs
#	-u			suppress extern func/vars used/defined
#	-errfmt=simple		use one line errors with position info

LINTFLAGS_COMMON  = -Xa
LINTFLAGS_COMMON += -fd 
LINTFLAGS_COMMON += -errchk=structarg,longptr64,parentheses
LINTFLAGS_COMMON += -v
LINTFLAGS_COMMON += -x 
LINTFLAGS_COMMON += -u
LINTFLAGS_COMMON += -errfmt=simple 
LINTFLAGS_OPT   = 
LINTFLAGS_DBG   =

# The -W0,-noglobal tells the compiler to NOT generate mangled global
#    ELF data symbols for file local static data.
#    This can break fix&continue, but we'd rather do the same compilations
#    for deliverable bits as we do for non-deliverable bits
#    Tell the compilers to never generate globalized names, all the time.
CFLAGS_COMMON += -W0,-noglobal

# Arch specific settings (determines type of .o files and instruction set)
ifeq ($(ARCH_FAMILY), sparc)
  ifdef VIS_NEEDED
    XARCH_VALUE/32=v8plusa
    XARCH_VALUE/64=v9a
  else 
    # Someday this should change to improve optimization on UltraSPARC
    #    and abandon the old v8-only machines like the SPARCstation 10.
    #    Indications with Mustang is that alacrity runs do not show a
    #    big improvement using v8plus over v8, but other benchmarks might.
    XARCH_VALUE/32=v8
    XARCH_VALUE/64=v9
  endif
endif
ifeq ($(ARCH_FAMILY), i586)
  XARCH_VALUE/64=amd64
  XARCH_VALUE/32=
endif

# Arch value based on current data model being built
XARCH_VALUE=$(XARCH_VALUE/$(ARCH_DATA_MODEL))
ifneq ($(XARCH_VALUE), )
  # The actual compiler -xarch options to use
  XARCH_OPTION/32 = -xarch=$(XARCH_VALUE/32)
  XARCH_OPTION/64 = -xarch=$(XARCH_VALUE/64)
  XARCH_OPTION    = $(XARCH_OPTION/$(ARCH_DATA_MODEL))
endif

# If we have a specific -xarch value to use, add it
ifdef XARCH_OPTION
  CFLAGS_COMMON    += $(XARCH_OPTION)
  CXXFLAGS_COMMON  += $(XARCH_OPTION)
  ASFLAGS_COMMON   += $(XARCH_OPTION)
  EXTRA_LIBS       += $(XARCH_OPTION)
  LINTFLAGS_COMMON += -Xarch=$(XARCH_VALUE)
endif

#
# uncomment the following to build with PERTURBALOT set
#
# OTHER_CFLAGS += -DPERTURBALOT
#

CPPFLAGS_COMMON = -D$(ARCH_FAMILY) -D__solaris__ -D_REENTRANT 
CPPFLAGS_OPT    = 
CPPFLAGS_DBG    = -DDEBUG

ifeq ($(ARCH_FAMILY), i586)
  # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
  #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
  #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
  #   Note: -Dmacro         is the same as    #define macro 1
  #         -Dmacro=	    is the same as    #define macro
  #
  CPPFLAGS_COMMON +=  -DcpuIntel -D_LITTLE_ENDIAN= -D$(LIBARCH)
  # Turn off a superfluous compiler error message on Intel
  CFLAGS_COMMON += -erroff=E_BAD_PRAGMA_PACK_VALUE
endif

# Java memory management is based on memory mapping by default, but a
# system only assuming malloc/free can be built by adding -DUSE_MALLOC 

CPPFLAGS_COMMON	+= -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS
CPPFLAGS_OPT	+= -DTRIMMED

LDFLAGS_DEFS_OPTION  = -z defs
LDFLAGS_COMMON  += $(LDFLAGS_DEFS_OPTION)

#
# -L paths for finding and -ljava
#
LDFLAGS_COMMON += -L$(LIBDIR)/$(LIBARCH)
LDFLAGS_OPT     =
LDFLAGS_DBG     =

#
# We never really want the incremental linker, ever
#    The -xildoff option tells Sun's compilers to NOT use incremental linker
#
LDFLAGS_COMMON  += -xildoff

ifdef LIBRARY
  # Libraries need to locate other libraries at runtime, and you can tell
  #   a library where to look by way of the dynamic runpaths (RPATH or RUNPATH)
  #   buried inside the .so. The $ORIGIN says to look relative to where
  #   the library itself is and it can be followed with relative paths from
  #   that. By default we always look in $ORIGIN, optionally we add relative
  #   paths if the Makefile sets LD_RUNPATH_EXTRAS to those relative paths.
  #   The environment variable LD_LIBRARY_PATH will over-ride these runpaths.
  #   Try: 'dump -Lv lib*.so' to see these settings in a library.
  #
  LDFLAGS_COMMON += -R\$$ORIGIN
  LDFLAGS_COMMON += $(LD_RUNPATH_EXTRAS:%=-R\$$ORIGIN/%)
endif

EXTRA_LIBS += -lc

# Postprocessing is done on the images directories only
#
ifeq ($(VARIANT), OPT)
  ifeq ($(PARTIAL_GPROF), true)
    NO_STRIP = true
  endif
  ifeq ($(GPROF), true)
    NO_STRIP = true
  endif
  ifneq ($(NO_STRIP), true)
    # Debug 'strip -x' leaves local function Elf symbols (better stack traces)
    POST_STRIP_PROCESS = $(STRIP) -x
  endif
endif
POST_MCS_PROCESS=$(MCS) -d -a "JDK $(FULL_VERSION)"

#
# Sun C compiler will take -M and pass it on to ld.
# Usage: ld $(LD_MAPFILE_FLAG) mapfile *.o
#
ifeq ($(CC_VERSION),gcc)
LD_MAPFILE_FLAG = -Xlinker -M -Xlinker
else
LD_MAPFILE_FLAG = -M
endif

#
# Variables globally settable from the make command line (default
# values in brackets):
#	GPROF (false)
# Eg: 	% gnumake GPROF=true
GPROF = false
ifeq ($(GPROF), true)
    CFLAGS_COMMON += -DGPROF -xpg
    EXTRA_LIBS += -xpg
endif

# PARTIAL_GPROF is to be used ONLY during compilation - it should not
# appear during linking of libraries or programs.  It also should
# prevent linking with -z defs to allow a symbol to remain undefined.
#
PARTIAL_GPROF = false
ifeq ($(PARTIAL_GPROF), true)
  CFLAGS_GPROF += -xpg
  LDFLAGS_DEFS_OPTION  = -z nodefs
endif

#
# For a TCOV build we add in the TCOV_OPTION
#
ifdef TCOV_BUILD
  TCOV_OPTION		= -xprofile=tcov
  LDFLAGS_COMMON 	+= $(TCOV_OPTION) -Kpic
  CFLAGS_COMMON  	+= $(TCOV_OPTION)
  CXXFLAGS_COMMON 	+= $(TCOV_OPTION)
  EXTRA_LIBS 	+= $(TCOV_OPTION)
  LDNOMAP=true
endif

#
# Solaris only uses native threads. 
#
THREADS_FLAG=	native
THREADS_DIR=	threads

#
# Support for Quantify.
#
ifdef QUANTIFY
  QUANTIFY_CMD = quantify
  QUANTIFY_OPTIONS = -cache-dir=/tmp/quantify -always-use-cache-dir=yes
  LINK_PRE_CMD = $(QUANTIFY_CMD) $(QUANTIFY_OPTIONS)
  ifdef LIBRARY
    CFLAGS_COMMON += -K PIC
  endif
endif

#
# Support for Purify.
#
ifdef PURIFY
  PURIFY_CMD = /net/suntools.eng/export/tools/sparc/bin/purify
  PURIFY_OPTIONS = -cache-dir=/tmp/quantify -always-use-cache-dir=yes
  LINK_PRE_CMD = $(PURIFY_CMD) $(PURIFY_OPTIONS)
  ifdef LIBRARY
    CFLAGS_COMMON += -K PIC
  endif
endif

#
# Different "levels" of optimization.
#
ifeq ($(CC_VERSION),gcc)
  CC_HIGHEST_OPT = -O3
  CC_HIGHER_OPT  = -O3
  CC_LOWER_OPT   = -O2
  CFLAGS_REQUIRED_i586  += -fno-omit-frame-pointer
  CFLAGS_REQUIRED_amd64 += -fno-omit-frame-pointer
  # Automatic precompiled header option to use (if COMPILE_APPROACH=batch)
  #   (See Rules.gmk) May need to wait for gcc 5?
  AUTOMATIC_PCH_OPTION = 
else
  # Highest could be -xO5, but indications are that -xO5 should be reserved
  #    for a per-file use, on sources with known performance impacts.
  CC_HIGHEST_OPT = -xO4
  CC_HIGHER_OPT  = -xO4
  CC_LOWER_OPT   = -xO2
  #
  # WARNING: Use of _OPT=$(CC_HIGHEST_OPT) in your Makefile needs to be
  #          done with care, there are some assumptions below that need to
  #          be understood about the use of pointers, and IEEE behavior.
  #
  # Use non-standard floating point mode (not IEEE 754)
  CC_HIGHEST_OPT += -fns
  # Do some simplification of floating point arithmetic (not IEEE 754)
  CC_HIGHEST_OPT += -fsimple
  # Use single precision floating point with 'float'
  CC_HIGHEST_OPT += -fsingle
  # Assume memory references via basic pointer types do not alias
  #   (Source with excessing pointer casting and data access with mixed 
  #    pointer types are not recommended)
  CC_HIGHEST_OPT += -xalias_level=basic
  # Use intrinsic or inline versions for math/std functions
  #   (If you expect perfect errno behavior, do not use this)
  CC_HIGHEST_OPT += -xbuiltin=%all
  # Loop data dependency optimizations (need -xO3 or higher)
  CC_HIGHEST_OPT += -xdepend
  # Pointer parameters to functions do not overlap
  #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
  #    If you pass in multiple pointers to the same data, do not use this)
  CC_HIGHEST_OPT += -xrestrict
  # Inline some library routines
  #   (If you expect perfect errno behavior, do not use this)
  CC_HIGHEST_OPT += -xlibmil
  # Use optimized math routines
  #   (If you expect perfect errno behavior, do not use this)
  #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
  #  CC_HIGHEST_OPT += -xlibmopt
  ifeq ($(ARCH_FAMILY), sparc)
    # Assume at most 8byte alignment, raise SIGBUS on error
    ### Presents an ABI issue with customer JNI libs?
    ####CC_HIGHEST_OPT  += -xmemalign=8s
    # Automatic prefetch instructions, explicit prefetch macros
    CC_HIGHEST_OPT  += -xprefetch=auto,explicit
    # Pick ultra as the chip to optimize to
    CC_HIGHEST_OPT  += -xchip=ultra
  endif
  ifeq ($(ARCH), i586)
    # Pick pentium as the chip to optimize to
    CC_HIGHEST_OPT  += -xchip=pentium
  endif
  ifdef LIBRARY
    # The Solaris CBE (Common Build Environment) requires that the use
    # of appl registers be disabled when compiling a public library (or
    # a library that's loaded by a public library) on sparc.
    CFLAGS_REQUIRED_sparc    += -xregs=no%appl
    CFLAGS_REQUIRED_sparcv9  += -xregs=no%appl
  endif
  ifeq ($(shell $(EXPR) $(CC_VER) \> 5.6), 1)
    # Do NOT use the frame pointer register as a general purpose opt register
    CFLAGS_REQUIRED_i586  += -xregs=no%frameptr
    CFLAGS_REQUIRED_amd64 += -xregs=no%frameptr
    # We MUST allow data alignment of 4 for sparc V8 (32bit)
    #     Presents an ABI issue with customer JNI libs? We must be able to
    #     to handle 4byte aligned objects? (rare occurance, but possible?)
    CFLAGS_REQUIRED_sparc += -xmemalign=4s
  endif
  # Just incase someone trys to use the SOS9 compilers
  ifeq ($(CC_VER), 5.6)
    # We MUST allow data alignment of 4 for sparc (sparcv9 is ok at 8s)
    CFLAGS_REQUIRED_sparc += -xmemalign=4s
  endif
  # Automatic precompiled header option to use (if COMPILE_APPROACH=batch)
  #   (See Rules.gmk) The SS11 -xpch=auto* options appear to be broken.
  AUTOMATIC_PCH_OPTION =
endif
CC_NO_OPT      = 

# If NO_OPTIMIZATIONS is defined in the environment, turn all optimzations off
ifdef NO_OPTIMIZATIONS
  CC_HIGHEST_OPT = $(CC_NO_OPT)
  CC_HIGHER_OPT  = $(CC_NO_OPT)
  CC_LOWER_OPT   = $(CC_NO_OPT)
endif

# Flags required all the time
CFLAGS_REQUIRED = $(CFLAGS_REQUIRED_$(ARCH))

# Add processor specific options for optimizations
CC_HIGHEST_OPT += $(_OPT_$(ARCH))
CC_HIGHER_OPT  += $(_OPT_$(ARCH))
CC_LOWER_OPT   += $(_OPT_$(ARCH))

# Secret compiler optimization options that should be in the above macros
#    but since they differ in format from C to C++, are added into the C or
#    C++ specific macros for compiler flags.
#
#  On i586 we need to tell the code generator to ALWAYS use a
#   frame pointer.
ifeq ($(ARCH_FAMILY), i586)
  # Note that in 5.7, this is done with -xregs=no%frameptr
  ifeq ($(CC_VER), 5.5)
    #       It's not exactly clear when this optimization kicks in, the
    #       current assumption is -xO4 or greater and for C++ with
    #       the -features=no%except option and -xO4 and greater.
    #       Bottom line is, we ALWAYS want a frame pointer!
    CXXFLAGS_OPT += -Qoption ube -Z~B
    CFLAGS_OPT   +=          -Wu,-Z~B
    ifeq ($(FASTDEBUG), true)
        CXXFLAGS_DBG += -Qoption ube -Z~B
        CFLAGS_DBG   +=          -Wu,-Z~B
    endif
  endif
endif
#
#  Optimizer for sparc needs to be told not to do certain things
#   related to frames or save instructions.
ifeq ($(ARCH_FAMILY), sparc)
  # NOTE: Someday the compilers will provide a high-level option for this.
  #   Use save instructions instead of add instructions
  #    This was an optimization starting in SC5.0 that made it hard for us to
  #    find the "save" instruction (which got turned into an "add")
  CXXFLAGS_OPT += -Qoption cg -Qrm-s
  CFLAGS_OPT   +=         -Wc,-Qrm-s
  ifeq ($(FASTDEBUG), true)
    CXXFLAGS_DBG += -Qoption cg -Qrm-s
    CFLAGS_DBG   +=         -Wc,-Qrm-s
  endif
  #
  # NOTE: Someday the compilers will provide a high-level option for this.
  #   Don't allow tail call code optimization. Started in SC5.0.
  #    We don't like code of this form:
  #	save
  #	<code>
  #	call foo
  #	   restore
  #   because we can't tell if the method will have a stack frame
  #   and register windows or not.
  CXXFLAGS_OPT += -Qoption cg -Qiselect-T0
  CFLAGS_OPT   +=         -Wc,-Qiselect-T0
  ifeq ($(FASTDEBUG), true)
    CXXFLAGS_DBG += -Qoption cg -Qiselect-T0
    CFLAGS_DBG   +=         -Wc,-Qiselect-T0
  endif
endif

#
# Path and option to link against the VM, if you have to.  Note that
# there are libraries that link against only -ljava, but they do get
# -L to the -ljvm, this is because -ljava depends on -ljvm, whereas
# the library itself should not.
#
VM_NAME         = server
JVMLIB		= -L$(BOOTDIR)/jre/lib/$(LIBARCH)/server -ljvm
JAVALIB		=

# Part of INCREMENTAL_BUILD mechanism.
#   Compiler emits things like:  path/file.o: file.h
#   We want something like: relative_path/file.o relative_path/file.d: file.h
#   In addition on Solaris, any include file starting with / is deleted,
#   this gets rid of things like /usr/include files, which never change.
CC_DEPEND	 = -xM1
CC_DEPEND_FILTER = $(SED) -e '/:[ 	]*[/]/d' -e 's!$*\.$(OBJECT_SUFFIX)!$(dir $@)& $(dir $@)$*.$(DEPEND_SUFFIX)!g' | $(SORT) -u

# Location of openwin libraries (do we really need this anymore?)
OPENWIN_HOME    = /usr/openwin
OPENWIN_LIB     = $(OPENWIN_HOME)/lib$(ISA_DIR)

# Runtime graphics library search paths...
OPENWIN_RUNTIME_LIB = /usr/openwin/lib$(ISA_DIR)
AWT_RUNPATH = -R/usr/dt/lib$(ISA_DIR) -R$(OPENWIN_RUNTIME_LIB)

# C++ Runtime library (libCrun.so), use instead of -lCrun.
#    Originally used instead of -lCrun to guarantee use of the system
#    .so version and not the .a or .so that came with the compilers.
#    With the newer compilers this could probably change back to -lCrun but
#    in general this is ok to continue to do.
LIBCXX = /usr/lib$(ISA_DIR)/libCrun.so.1

# Math Library (libm.so), do not use -lm.
#    There might be two versions of libm.so on the build system:
#    libm.so.1 and libm.so.2, and we want libm.so.1.
#    Depending on the Solaris release being used to build with,
#    /usr/lib/libm.so could point at a libm.so.2, so we are
#    explicit here so that the libjvm.so you have built will work on an
#    older Solaris release that might not have libm.so.2.
#    This is a critical factor in allowing builds on Solaris 10 or newer
#    to run on Solaris 8 or 9.
#
#    Note: Historically there was also a problem picking up a static version
#          of libm.a from the compiler area, but that problem has gone away
#          with the newer compilers. Use of libm.a would cause .so bloat.
#
LIBM = /usr/lib$(ISA_DIR)/libm.so.1

# Socket library
LIBSOCKET = -lsocket

# GLOBAL_KPIC: If set means all libraries are PIC, position independent code
#    EXCEPT for select compiles
#    If a .o file is compiled non-PIC then it should be forced
#	   into the RW data segment with a mapfile option. This is done
#    with object files which generated from .s files.
#    The -ztext enforces that no relocations remain in the text segment
#    so that it remains purely read-only for optimum system performance.
#    Some libraries may use a smaller size (13bit -Kpic) on sparc instead of 
#    (32 bit -KPIC) and will override GLOBAL_KPIC appropriately.
#
PIC_CODE_LARGE   = -KPIC
PIC_CODE_SMALL   = -Kpic
ifndef TCOV_BUILD
    GLOBAL_KPIC      = $(PIC_CODE_LARGE)
    CXXFLAGS_COMMON += $(GLOBAL_KPIC)
    CFLAGS_COMMON   += $(GLOBAL_KPIC)
    LDFLAGS_COMMON  += -ztext
endif # TCOV_BUILD

# If your platform has DPS, it will have Type1 fonts too, in which case
# it is best to enable DPS support until such time as 2D's rasteriser
# can fully handle Type1 fonts in all cases. Default is "yes".
# HAVE_DPS should only be "no" if the platform has no DPS headers or libs
# DPS (Displayable PostScript) is available on Solaris machines

HAVE_DPS = yes

#
# Japanese manpages
#
JA_SOURCE_ENCODING = eucJP
JA_TARGET_ENCODINGS = eucJP UTF-8 PCK