|
1 | 1 | HPUX_MAJOR= $(shell uname -r|sed 's/^[^.]*\.\([^.]*\).*/\1/')
|
| 2 | +# Distinguish HPUX 10 (and later) from HPUX 9 |
| 3 | +ifneq ($(HPUX_MAJOR), 09) |
| 4 | + CFLAGS+= -DHPUX_10 |
| 5 | +endif |
| 6 | + |
2 | 7 | # HP-UX 10 has a select() in libcurses, so we need to get the libc version first
|
3 |
| -ifeq ($(HPUX_MAJOR), 10) |
| 8 | +# We also want to be sure we get the POSIX signal routines in libc, |
| 9 | +# not the BSD-like ones in libBSD. |
| 10 | +ifneq ($(HPUX_MAJOR), 09) |
4 | 11 | LDFLAGS:= -Wl,-E -lc $(LDFLAGS)
|
5 | 12 | endif
|
6 | 13 |
|
7 |
| -# HP-UX 09 needs libc before libPW, so we need to get the libc version first |
| 14 | +# HP-UX 09 provides rint() only in PA1.1 version of libm, so add -L command |
| 15 | +# to get that version. (CAUTION: you need PHSS_4630 to have a working version |
| 16 | +# of rint()!) Also, libPW exists on this platform but is not helpful, so |
| 17 | +# delete it from LDFLAGS. |
| 18 | +# NOTE: libBSD must be loaded before libc to get BSD signal() semantics. |
8 | 19 | ifeq ($(HPUX_MAJOR), 09)
|
9 |
| - LDFLAGS:= -Wl,-E $(LDFLAGS:-lPW=-lc -lPW) |
| 20 | + LDFLAGS:= -Wl,-E -L /lib/pa1.1 $(LDFLAGS:-lPW=) |
10 | 21 | endif
|
11 | 22 |
|
| 23 | +# On all HPUX versions, embed LIBDIR as the shared library search path |
| 24 | +# so that the executables don't need SHLIB_PATH to be set. |
| 25 | +LDFLAGS+= -Wl,+b -Wl,$(LIBDIR) |
| 26 | + |
12 | 27 | # Does anyone use this stuff?
|
13 | 28 | #ifdef ENFORCE_ALIGNMENT
|
14 | 29 | # CFLAGS+= -DNOFIXADE
|
|
0 commit comments