# **********************************************************************
#
# Copyright (c) 2003-2006 ZeroC, Inc. All rights reserved.
#
# This copy of Ice is licensed to you under the terms described in the
# ICE_LICENSE file included in this distribution.
#
# **********************************************************************

#
# This file is included by Make.rules when uname is HP-UX..
#

CXX			= aCC

ifeq ($(LP64),yes)
    CXXARCHFLAGS	= +DD64
else
    CXXARCHFLAGS	= +DA2.0N
endif

#
# TODO: add -Bhidden_def (for declspec), when it works
#

#
# Disable the following future errors and warnings:
# 849: External symbol too long, truncated from xxxx to 4000
DISABLEDWARNINGS        = +W849

CXXFLAGS		= -AA -mt $(DISABLEDWARNINGS) $(CXXARCHFLAGS)

ifeq ($(STATICLIBS),)
    CXXFLAGS		+= +Z
endif

ifeq ($(OPTIMIZE),yes)
     CXXFLAGS		+= -O -DNDEBUG
else
     CXXFLAGS		+= -g0
endif

#
# C++ run-time libraries, necessary for linking some shared libraries.
#
CXXLIBS			= -lCsup_v2 -lstd_v2

ifeq ($(ADD_LIBDIR_TO_RPATH),yes)
   LDPLATFORMFLAGS      = -Wl,+s -Wl,+b$(install_libdir)
else
   LDPLATFORMFLAGS      = -Wl,+s
endif

mklibfilename           = $(if $(2),lib$(1).$(2),lib$(1).sl)
mksoname                = $(if $(2),lib$(1).$(2),lib$(1).sl)
ifeq ($(STATICLIBS),)
    mklibname		= lib$(1).sl
endif
mkshlib                 = $(CXX) -b -Wl,-Bsymbolic $(LDFLAGS) -o $(1) -Wl,+h$(2) $(3) $(4)
mklib			= ar cr $(1) $(2)

rpathlink               = -L$(1)


BASELIBS		= -lIceUtil -lxnet -lpthread
LIBS			= $(BZIP2_RPATH_LINK) -lIce $(BASELIBS)

ICEUTIL_OS_LIBS         = -lpthread -lrt
ICE_OS_LIBS             =

lp64suffix              = /pa20_64

ifeq ($(LP64),yes)
    export LD_LIBRARY_PATH := $(libdir):$(LD_LIBRARY_PATH)
else
    export SHLIB_PATH	   := $(libdir):$(SHLIB_PATH)
endif
