1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
|
# $Id$
#
# This is for the HP-UX 10.x and 11.x using the aC++ compiler.
#
# For 10.x, most of the difference for threaded vs. non-threaded is
# contained in ace/config-hpux-10.x.h. However, there is a line to verify
# in this file - if you are using DCE threads, "-lcma" needs to be on the
# 10.x version of the LIBS line, below. If you are not using DCE threads,
# then use the LIBS without -lcma.
#
# HP-UX 11 supports both 32-bit and 64-bit builds, regardless of which
# architecture the build is done on. This file is set up to build native
# to the machine it's running on. To cross-build for another platform, add
# the appropriate +DA switch to CCFLAGS. Note that if you do this, and want to
# shut up the "At least one PA 2.0 object file detected..." messages, you
# should also add -Wl,+vnocompatwarnings.
debug = 1
threads = 1
# First, extract the OS version number.
HPVERS_WORDS := $(subst ., ,$(shell uname -r))
HPUX_VERS := $(join $(word 2,$(HPVERS_WORDS)),$(word 3,$(HPVERS_WORDS)))
#
CC = /bin/cc
CXX = /opt/aCC/bin/aCC
#
# Set the appropriate preprocessor defs for threading based on OS version.
# If the user has requested building without threads, then don't set any.
#
ifeq ($(threads),1)
ifeq ($(word 2,$(HPVERS_WORDS)), 11)
THR_DEFS = -DACE_HAS_THREADS -D_POSIX_C_SOURCE=199506L
else
THR_DEFS = -DACE_HAS_THREADS -D_REENTRANT
endif
endif
# Suppress warning 829 (string literal to char * is deprecated)
# Suppress warning 302 ((...) parameter list is a non-portable feature)
CCFLAGS += $(CFLAGS) $(THR_DEFS) -DHPUX_VERS=$(HPUX_VERS) +W829,302 -DACE_LACKS_PRAGMA_ONCE
DCFLAGS += -g
DLD = $(CXX) $(CCFLAGS)
LD = $(CXX)
PIC = +Z
AR = $(COMPILE.cc) +inst_close $^; /bin/ar
ARFLAGS = ruv
RANLIB = echo
LDFLAGS = -Wl,+s
SOFLAGS = -b
SOEXT = sl
#
# Grab the appropriate libraries based on the version of HP-UX we're building
# on and whether or not thread support is being used.
#
ifeq ($(word 2,$(HPVERS_WORDS)), 11)
#11.x:
ifeq ($(threads),1)
LIBS += -lxti -lpthread -lrt -ldld
else
LIBS += -lxti -lrt -ldld
endif
else
# 10.x:
LIBS += -lxti -ldld
ifeq ($(threads),1)
LIBS += -lcma
endif
endif
|