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
|
# $Id$
#
debug = 1
optimize = 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 = gcc
CXX = g++
CFLAGS += -w
#
# 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
CCFLAGS += $(CFLAGS) -fno-implicit-templates -DHPUX_VERS=$(HPUX_VERS) $(THR_DEFS)
DCFLAGS += -g
DLD = $(CXX)
LD = $(CXX)
OCFLAGS += -O2
PIC = -fPIC
ARFLAGS = ruv
RANLIB = echo
LDFLAGS = -L. -L$(ACE_ROOT)/ace -Wl,+s
SOFLAGS = $(CPPFLAGS) -shared -nostdlib $(PIC)
SOEXT = sl
SOBUILD = $(COMPILE.cc) $(PIC) -o $(VSHDIR)$*.$(SOEXT) $<
SHLIBBUILD = $(SOLINK.cc) -o $@ $(VSHOBJS1)
PRELIB = @true
#
# 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
|