0
|
1 |
#
|
|
2 |
# CDDL HEADER START
|
|
3 |
#
|
|
4 |
# The contents of this file are subject to the terms of the
|
|
5 |
# Common Development and Distribution License (the "License").
|
|
6 |
# You may not use this file except in compliance with the License.
|
|
7 |
#
|
|
8 |
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
|
|
9 |
# or http://www.opensolaris.org/os/licensing.
|
|
10 |
# See the License for the specific language governing permissions
|
|
11 |
# and limitations under the License.
|
|
12 |
#
|
|
13 |
# When distributing Covered Code, include this CDDL HEADER in each
|
|
14 |
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
|
|
15 |
# If applicable, add the following below this CDDL HEADER, with the
|
|
16 |
# fields enclosed by brackets "[]" replaced with your own identifying
|
|
17 |
# information: Portions Copyright [yyyy] [name of copyright owner]
|
|
18 |
#
|
|
19 |
# CDDL HEADER END
|
|
20 |
#
|
|
21 |
# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
|
|
22 |
# Use is subject to license terms.
|
|
23 |
#
|
|
24 |
#ident "@(#)Makefile.sfw 1.1 08/04/28 SMI"
|
|
25 |
|
|
26 |
PBMAJVER=1.1
|
|
27 |
PBMINVER=$(PBMAJVER).2
|
|
28 |
VER=pgbouncer-$(PBMINVER)
|
|
29 |
PGMAJVER=8.3 # pgbouncer *installed* here
|
|
30 |
|
|
31 |
POUND_SIGN:sh= echo \\043
|
|
32 |
SPARC_BLD_1= $(MACH:i386=$(POUND_SIGN))
|
|
33 |
SPARC_BLD= $(SPARC_BLD_1:sparc=)
|
|
34 |
INTEL_BLD_1= $(MACH:sparc=$(POUND_SIGN))
|
|
35 |
INTEL_BLD= $(INTEL_BLD_1:i386=)
|
|
36 |
|
|
37 |
all : pgb
|
|
38 |
|
|
39 |
include ../../Makefile.cmd
|
|
40 |
|
|
41 |
pgb: $(VER)/config.status
|
|
42 |
(cd $(VER); env CC=$(CC) \
|
|
43 |
"LD_OPTIONS=-M $(SRC)/cmd/mapfile_noexstk" \
|
|
44 |
INSTALL=/usr/ucb/install \
|
|
45 |
MAKE=$(GMAKE) \
|
|
46 |
$(GMAKE) all)
|
|
47 |
|
|
48 |
$(VER)/config.status: $(VER)/configure
|
|
49 |
(cd $(VER); ./configure \
|
|
50 |
CC=$(CC) \
|
|
51 |
INSTALL=/usr/ucb/install \
|
|
52 |
LDFLAGS="-l socket -l nsl -l resolv" \
|
|
53 |
--prefix=/usr/postgres/$(PGMAJVER) \
|
|
54 |
--exec-prefix=/usr/postgres/$(PGMAJVER) \
|
|
55 |
--bindir=/usr/postgres/$(PGMAJVER)/bin \
|
|
56 |
--datadir=/usr/postgres/$(PGMAJVER)/share \
|
|
57 |
--mandir=/usr/postgres/$(PGMAJVER)/man )
|
|
58 |
|
|
59 |
$(VER)/configure: $(VER).tgz
|
|
60 |
gzip -dc $(VER).tgz | tar xopf -
|
|
61 |
( cd $(VER) \
|
|
62 |
; gpatch -p0 < ../pgbstudio11.patch \
|
|
63 |
; gpatch -p0 < ../pgbini.patch )
|
|
64 |
touch $(VER)/configure
|
|
65 |
|
|
66 |
install: all
|
|
67 |
(cd $(VER); env \
|
|
68 |
CC=$(CC) \
|
|
69 |
"LD_OPTIONS=-M $(SRC)/cmd/mapfile_noexstk" \
|
|
70 |
INSTALL=/usr/ucb/install \
|
|
71 |
BININSTALL=/usr/ucb/install \
|
|
72 |
DESTDIR=$(ROOT) \
|
|
73 |
MAKE=$(GMAKE) \
|
|
74 |
$(GMAKE) install )
|
|
75 |
$(SH) ./install-sfw ${PGMAJVER}
|
|
76 |
$(SRC)/tools/protofix --perm \
|
|
77 |
--pkg SUNWpgbouncer-pg83-server --pkg SUNWpgbouncer-pg83-config
|
|
78 |
|
|
79 |
clean:
|
|
80 |
-rm -rf $(VER)
|
|
81 |
|
|
82 |
include ../../Makefile.targ
|