# -*- Makefile -*- # # $Id$ # # configuration file for HP aCC on HP-UX # ############################################################################## CXX = aCC CCVER := $(shell $(CXX) -V 2>&1 \ | sed "s/.* \(A\.[0-9][0-9]*\.[0-9][0-9]\) .*/\1/") aCC_MAJOR := $(shell echo $(CCVER) | sed "s/[^.]*\.\([0-9]*\)\..*/\1/") aCC_MINOR := $(shell echo $(CCVER) | sed "s/[^.]*\.[^.]*\.\([0-9]*\)/\1/") WARNFLAGS = +w +W392 +W655 +W684 +W818 +W819 +W849 ifeq ($(shell [ $(aCC_MAJOR) -eq 3 -a $(aCC_MINOR) -lt 33 ] && echo 1),1) # disable bogus aCC warnings (aCC prior to 3.32): # 229 Ambiguous overloaded function call # 361 Value-returning function might end without executing a return statement WARNFLAGS += +W229 +W361 endif ifeq ($(aCC_MAJOR),06) # disable aCC 6.x (EDG front end) warnings emitted with +w: WARNFLAGS += +W2193 +W2236 +W2261 +W2340 +W2401 +W2487 # 2193 zero used for undefined preprocessing identifier # 2236 controlling expression is constant # 2261 access control not specified (%sq by default) # 2340 value copied to temporary, reference to temporary used # 2401 destructor for base class %t is not virtual # 2487 inline %n cannot be explicitly instantiated ifeq ($(shell [ $(aCC_MINOR) -gt 10 ] && echo 1),1) # 4227 padding struct with N bytes to align member # 4229 64 bit migration: conversion from "long" to "int" may truncate value # 4231 64 bit migration: conversion between types of different sizes # 4235 conversion from "T" to "U" may lose significant bits # 4237 type cast from "T" to "U" may cause sign extension # 4249 64 bit migration: value could be truncated before cast # 4255 padding size of struct with N bytes to alignment boundary # 4272 conversion from "T" to "unsigned T" may lose sign # 4284 operator= does not return reference to *this # 4285 operator= does not have a check for the source and destination # 4286 return non-const handle to non-public data member WARNFLAGS += +W4227 +W4229 +W4231 +W4235 +W4237 +W4249 \ +W4255 +W4272 +W4284 +W4285 +W4286 endif # aCC > 6.10 endif # aCC 6.x ifeq ($(shell [ $(aCC_MAJOR) -ge 6 -o $(aCC_MINOR) -ge 38 ] && echo 1),1) # starting with aCC x.38, the +Md option is deprecated in favor of +Maked DEPENDFLAGS = +Maked -E else DEPENDFLAGS = +Md -E endif PICFLAGS = +Z LDSOFLAGS = +Z -b # the extension of assembly files is .s AS_EXT = .s # $(_CPPOPTS), $(_CXXOPTS), and $(_LDOPTS) provided to allow for modification # of the respective variables w/o underscores on HP-UX where the latter are # used directly by the compiler and linker, respectively ifeq ($(shell [ $(aCC_MAJOR) -ge 5 ] && echo 1),1) # use -AA with aCC 5 and 6 CXXFLAGS = -AA "$$"(_CXXOPTS) CXXPRELINK = CPPFLAGS = "$$"(_CPPOPTS) LDFLAGS = -AA +nostl -Wl,+s "$$"(_LDOPTS) else CXXFLAGS = -Aa +nostl "$$"(_CXXOPTS) CXXPRELINK = CPPFLAGS = -I$(TOPDIR)/include/ansi -I/usr/include "$$"(_CPPOPTS) # -Wl,+s allows the dynamic loader to consider LD_LIBRARY_PATH (LP64) # and SHLIB_PATH when loading an executable into memory LDFLAGS = -Aa +nostl -Wl,+s -Wl,+vnocompatwarnings "$$"(_LDOPTS) endif # The flag(s) to use to embed a library search path into generated executables. RPATH = -Wl,+b # debug/optimization options DEBUG_CXXFLAGS = -g +d DEBUG_CPPFLAGS = OPTMZ_CXXFLAGS = +O2 OPTMZ_CPPFLAGS = # shared/static library options SHARED_CXXFLAGS = SHARED_CPPFLAGS = SHARED_LDFLAGS = SHARED_SUFFIX = .sl STATIC_CXXFLAGS = STATIC_CPPFLAGS = STATIC_LDFLAGS = # multi/single thread options; # we use the macros defined by the compiler when the -mt option is used # DCE threads not added since HP-UX versions after 10.20 use POSIX MULTI_CPPFLAGS_POSIX = -mt MULTI_CPPFLAGS_SOLARIS = MULTI_CPPFLAGS_DCE = MULTI_LDFLAGS_POSIX = -mt MULTI_LDFLAGS_SOLARIS = MULTI_LDFLAGS_DCE = # POSIX MULTI_CPPFLAGS = $(MULTI_CPPFLAGS_POSIX) MULTI_LDFLAGS = $(MULTI_LDFLAGS_POSIX) SINGL_CPPFLAGS = SINGL_LDFLAGS = # wide (64-bit, LP64) flags -- must be set explicitly CXXFLAGS.wide = +DD64 LDFLAGS.wide = +DD64 LDSOFLAGS.wide = +DD64 ARFLAGS.wide = # narrow (32-bit, ILP32) flags -- implicit in the default invocation # CXXFLAGS.narrow = +DD32 # LDFLAGS.narrow = +DD32 # LDSOFLAGS.narrow = +DD32 # ARFLAGS.narrow =