author | Jon Tibble <meths@btinternet.com> |
Mon, 04 May 2015 14:04:39 +0100 | |
branch | oi_151a |
changeset 254 | 9c2a4ac793f0 |
parent 12 | 12fc69ddc5a5 |
child 64 | 707ce1130311 |
permissions | -rw-r--r-- |
0 | 1 |
# |
2 |
# |
|
3 |
# CDDL HEADER START |
|
4 |
# |
|
5 |
# The contents of this file are subject to the terms of the |
|
6 |
# Common Development and Distribution License (the "License"). |
|
7 |
# You may not use this file except in compliance with the License. |
|
8 |
# |
|
9 |
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE |
|
10 |
# or http://www.opensolaris.org/os/licensing. |
|
11 |
# See the License for the specific language governing permissions |
|
12 |
# and limitations under the License. |
|
13 |
# |
|
14 |
# When distributing Covered Code, include this CDDL HEADER in each |
|
15 |
# file and include the License file at usr/src/OPENSOLARIS.LICENSE. |
|
16 |
# If applicable, add the following below this CDDL HEADER, with the |
|
17 |
# fields enclosed by brackets "[]" replaced with your own identifying |
|
18 |
# information: Portions Copyright [yyyy] [name of copyright owner] |
|
19 |
# |
|
20 |
# CDDL HEADER END |
|
21 |
# |
|
12
12fc69ddc5a5
Import sfw build 138
"Cyril Plisko <cyril.plisko@grigale.com>"
parents:
5
diff
changeset
|
22 |
# Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. |
12fc69ddc5a5
Import sfw build 138
"Cyril Plisko <cyril.plisko@grigale.com>"
parents:
5
diff
changeset
|
23 |
# |
12fc69ddc5a5
Import sfw build 138
"Cyril Plisko <cyril.plisko@grigale.com>"
parents:
5
diff
changeset
|
24 |
#ident "@(#)Makefile.sfw 1.12 10/04/07 SMI" |
0 | 25 |
|
26 |
VER=$(COMPONENT_VERSION:sh) |
|
27 |
MYSQL_DIR=$(COMPONENT_NAME:sh)-$(VER) |
|
28 |
MYSQL_DIR_64=$(COMPONENT_NAME:sh)-$(VER)_64 |
|
29 |
PREFIX=/usr/mysql/5.0 |
|
30 |
CONFDIR=/etc/mysql/5.0 |
|
31 |
DATA_PREFIX=/var/mysql/5.0 |
|
32 |
||
33 |
||
34 |
all : build32 build64 |
|
35 |
||
36 |
install : install32 install64 |
|
37 |
||
38 |
test: test32 test64 |
|
39 |
||
40 |
include ../Makefile.cmd |
|
41 |
||
42 |
||
43 |
||
44 |
# C++ common flags |
|
45 |
||
5 | 46 |
CXXCOMMONFLAGS= -DDBUG_OFF -DBIG_TABLES -DHAVE_RWLOCK_T -KPIC -DPIC -xO4 -xmaxopt=4 \ |
0 | 47 |
-xprefetch=auto -xprefetch_level=3 -mt -fns=no -fsimple=1 -xbuiltin=%all \ |
48 |
-xlibmil -xlibmopt -norunpath |
|
49 |
||
50 |
# C++ 64 bit flags |
|
51 |
CXX64FLAGS= $(CXXCOMMONFLAGS) -features=no%except $(CCBITS64) |
|
52 |
||
53 |
# C++ 32 bit flags |
|
54 |
CXX32FLAGS= $(CXXCOMMONFLAGS) -xtarget=generic |
|
55 |
||
56 |
# C common compiler flags |
|
57 |
COMMONCFLAGS= -xO4 -xstrconst -xprefetch=auto -xprefetch_level=3 -mt\ |
|
58 |
-fns=no -fsimple=1 -xbuiltin=%all -xlibmil -xlibmopt -xnorunpath |
|
59 |
||
60 |
# common ENV for both 32 & 64bit compilation |
|
61 |
ENVCOMMONLINE=MAKE=$(CCSMAKE) \ |
|
62 |
PATH=$(SFW_PATH) \ |
|
63 |
DESTDIR=$(ROOT) \ |
|
64 |
INSTALL_ROOT=$(ROOT) \ |
|
65 |
INSTALL=/usr/ucb/install \ |
|
66 |
CC=$(CC) \ |
|
67 |
CXX=$(CCC) |
|
68 |
||
69 |
#ENV for 32 bit compilation only |
|
70 |
ENVLINE32 = $(ENVCOMMONLINE) \ |
|
71 |
LDFLAGS="-L$(SPRO_VROOT)/lib -lCrun -lrt"\ |
|
72 |
CFLAGS="$(COMMONCFLAGS) -xtarget=generic"\ |
|
73 |
CXXFLAGS="$(CXX32FLAGS)" |
|
74 |
||
75 |
#ENV for 64 bit compilation only |
|
76 |
ENVLINE64= $(ENVCOMMONLINE) \ |
|
77 |
LD="$(LD) -64" \ |
|
78 |
LDFLAGS="-lrt" \ |
|
79 |
CFLAGS="$(COMMONCFLAGS) $(CCBITS64)" \ |
|
80 |
CXXFLAGS="$(CXX64FLAGS)" |
|
81 |
||
82 |
#These COMMON_CONFIG_OPTIONS are common for both 32 and 64-bit |
|
83 |
COMMON_CONFIG_OPTIONS= \ |
|
84 |
--prefix=$(PREFIX) \ |
|
85 |
--localstatedir=$(DATA_PREFIX)/data \ |
|
86 |
--datadir=$(PREFIX)/share \ |
|
87 |
--sbindir=$(PREFIX)sbin \ |
|
88 |
--sharedstatedir=$(PREFIX)/com \ |
|
89 |
--includedir=$(PREFIX)/include \ |
|
90 |
--oldincludedir=$(PREFIX)/include \ |
|
91 |
--infodir=$(PREFIX)/docs \ |
|
92 |
--mandir=$(PREFIX)/man \ |
|
93 |
--sysconfdir=$(CONFDIR) \ |
|
94 |
--with-server-suffix= \ |
|
95 |
--enable-thread-safe-client \ |
|
96 |
--with-mysqld-libs=-lmtmalloc \ |
|
97 |
--with-named-curses=-lcurses \ |
|
98 |
--with-client-ldflags=-static \ |
|
99 |
--with-mysql-ldflags=-static \ |
|
100 |
--with-pic \ |
|
101 |
--with-big-tables \ |
|
102 |
--with-yassl \ |
|
103 |
--with-readline \ |
|
104 |
--with-archive-storage-engine \ |
|
105 |
--with-blackhole-storage-engine \ |
|
106 |
--with-csv-storage-engine \ |
|
107 |
--with-example-storage-engine \ |
|
108 |
--with-federated-storage-engine \ |
|
109 |
--with-innodb \ |
|
110 |
--with-extra-charsets=complex \ |
|
111 |
--enable-local-infile \ |
|
112 |
--with-ndbcluster |
|
113 |
||
114 |
#----Main MySQL Targets ----- |
|
115 |
||
116 |
build32:$(MYSQL_DIR)/config.status |
|
117 |
( cd $(MYSQL_DIR); /usr/bin/env - $(ENVLINE32) $(CCSMAKE) all ) |
|
118 |
find . -name core -exec rm -f {} \; |
|
119 |
||
120 |
build64:$(MYSQL_DIR_64)/config.status |
|
121 |
( cd $(MYSQL_DIR_64); /usr/bin/env - $(ENVLINE64) $(CCSMAKE) all ) |
|
122 |
||
123 |
test32:build32 |
|
124 |
(cd $(MYSQL_DIR); env - $(ENVLINE32) $(CCSMAKE) test) |
|
125 |
||
126 |
test64:build64 |
|
127 |
(cd $(MYSQL_DIR_64); env - $(ENVLINE64) $(CCSMAKE) test) |
|
128 |
||
129 |
||
130 |
install32:build32 |
|
131 |
/usr/bin/chmod -R u+w $(ROOT)$(PREFIX) |
|
132 |
(cd $(MYSQL_DIR); \ |
|
133 |
env - $(ENVLINE32) $(CCSMAKE) install) |
|
134 |
(env MYSQL_DIR=$(MYSQL_DIR) $(SHELL) ./install-mysql) |
|
135 |
||
136 |
install64:build64 |
|
137 |
/usr/bin/chmod -R u+w $(ROOT)$(PREFIX) |
|
138 |
(cd $(MYSQL_DIR_64); \ |
|
139 |
env - $(ENVLINE64) $(CCSMAKE) install) |
|
140 |
MACH64=$(MACH64) $(SHELL) ./install-mysql-64 |
|
141 |
||
142 |
||
143 |
$(MYSQL_DIR)/config.status: $(MYSQL_DIR)/configure |
|
144 |
(cd $(MYSQL_DIR); env - $(ENVLINE32) $(SHELL) ./configure \ |
|
145 |
$(COMMON_CONFIG_OPTIONS) \ |
|
146 |
--libexecdir=$(PREFIX)/bin \ |
|
147 |
--bindir=$(PREFIX)/bin \ |
|
148 |
--libdir=$(PREFIX)/lib) |
|
149 |
||
150 |
||
151 |
||
152 |
$(MYSQL_DIR_64)/config.status: $(MYSQL_DIR_64)/configure |
|
153 |
(cd $(MYSQL_DIR_64); env - $(ENVLINE64) $(SHELL) ./configure \ |
|
154 |
$(COMMON_CONFIG_OPTIONS) \ |
|
155 |
--libexecdir=$(PREFIX)/bin/$(MACH64) \ |
|
156 |
--bindir=$(PREFIX)/bin/$(MACH64) \ |
|
157 |
--libdir=$(PREFIX)/lib/$(MACH64)) |
|
158 |
||
159 |
||
160 |
$(MYSQL_DIR)/configure: $(MYSQL_DIR).tar.gz |
|
161 |
/usr/bin/gzip -dc $(MYSQL_DIR).tar.gz | \ |
|
162 |
$(GTAR) xpf - --no-same-owner |
|
163 |
gpatch $(MYSQL_DIR)/innobase/include/univ.i -i patches/inline.patch |
|
164 |
gpatch $(MYSQL_DIR)/scripts/mysql_config.sh -i patches/mysql_config.patch |
|
165 |
gpatch $(MYSQL_DIR)/configure -i patches/configure.patch |
|
12
12fc69ddc5a5
Import sfw build 138
"Cyril Plisko <cyril.plisko@grigale.com>"
parents:
5
diff
changeset
|
166 |
gpatch $(MYSQL_DIR)/configure -i patches/configure.xild.patch |
5 | 167 |
gpatch $(MYSQL_DIR)/sql/sql_select.cc -i patches/xO4_optimization.patch |
0 | 168 |
(cd $(MYSQL_DIR)/support-files; gpatch -p0 < ../../patches/federated_cnf.patch) |
169 |
touch $(MYSQL_DIR)/configure |
|
170 |
find $(MYSQL_DIR) -type d -exec /usr/bin/chmod 755 "{}" \; |
|
171 |
find $(MYSQL_DIR) -type f -exec /usr/bin/chmod ugo+r "{}" \; |
|
172 |
||
173 |
||
174 |
||
175 |
$(MYSQL_DIR_64)/configure: $(MYSQL_DIR).tar.gz |
|
176 |
mkdir -p tmp; /usr/bin/gzip -dc $(MYSQL_DIR).tar.gz | (cd tmp; tar xopf -) |
|
177 |
mv tmp/$(MYSQL_DIR) $(MYSQL_DIR_64); rmdir tmp |
|
178 |
gpatch $(MYSQL_DIR_64)/innobase/include/univ.i -i patches/inline.patch |
|
179 |
gpatch $(MYSQL_DIR_64)/scripts/mysql_config.sh -i patches/mysql_config.patch |
|
180 |
gpatch $(MYSQL_DIR_64)/configure -i patches/configure.patch |
|
12
12fc69ddc5a5
Import sfw build 138
"Cyril Plisko <cyril.plisko@grigale.com>"
parents:
5
diff
changeset
|
181 |
gpatch $(MYSQL_DIR_64)/configure -i patches/configure.xild.patch |
5 | 182 |
gpatch $(MYSQL_DIR_64)/sql/sql_select.cc -i patches/xO4_optimization.patch |
0 | 183 |
(cd $(MYSQL_DIR_64)/support-files; gpatch -p0 < ../../patches/federated_cnf.patch) |
184 |
touch $(MYSQL_DIR_64)/configure |
|
185 |
find $(MYSQL_DIR_64) -type d -exec /usr/bin/chmod 755 "{}" \; |
|
186 |
find $(MYSQL_DIR_64) -type f -exec /usr/bin/chmod ugo+r "{}" \; |
|
187 |
||
188 |
||
189 |
||
190 |
||
191 |
clean: clean32 clean64 |
|
192 |
||
193 |
clean32: |
|
194 |
-rm -rf $(MYSQL_DIR) |
|
195 |
||
196 |
clean64: |
|
197 |
-rm -rf $(MYSQL_DIR_64) |
|
198 |
#---------------------------------------------end of MySQL Targets |
|
199 |
||
200 |
||
201 |
||
202 |
include ../Makefile.targ |
|
203 |
||
204 |
FRC: |