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 |
#
|
|
22 |
# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
|
|
23 |
# Use is subject to license terms.
|
|
24 |
#
|
|
25 |
# ident "@(#)Makefile.sfw 1.6 09/03/23 SMI"
|
|
26 |
|
|
27 |
#
|
|
28 |
# This makefile builds both 32 and 64 bit versions of the library.
|
|
29 |
# Builds occur in separate directories.
|
|
30 |
#
|
|
31 |
|
|
32 |
VER=libidn-1.9
|
|
33 |
VER64=$(VER)-64
|
|
34 |
|
|
35 |
LARGEFILES= -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
|
|
36 |
PREFIX = /usr
|
|
37 |
|
|
38 |
include ../Makefile.lib
|
|
39 |
|
|
40 |
all: real-all
|
|
41 |
|
|
42 |
all32: $(VER)/config.status
|
|
43 |
(cd $(VER); env "CFLAGS=$(CFLAGS) $(XREGSFLAG) $(LARGEFILES)" \
|
|
44 |
"LD_OPTIONS=-M $(SRC)/cmd/mapfile_noexstk -z ignore" \
|
|
45 |
PATH=$(SFW_PATH) \
|
|
46 |
"MAKE=$(GMAKE)" $(GMAKE) -e)
|
|
47 |
|
|
48 |
all64: $(VER64)/config.status
|
|
49 |
(cd $(VER64); env "CFLAGS=$(CFLAGS64) $(XREGSFLAG64) $(LARGEFILES)" \
|
|
50 |
"LD_OPTIONS=-M $(SRC)/cmd/mapfile_noexstk -z ignore" \
|
|
51 |
PATH=$(SFW_PATH) \
|
|
52 |
"MAKE=$(GMAKE)" $(GMAKE) -e)
|
|
53 |
|
|
54 |
COMPAT_VERSION= 5
|
|
55 |
|
|
56 |
# lint stuff
|
|
57 |
LIBRARY=libidn.a
|
|
58 |
LINTOUT= lint.out
|
|
59 |
LINTFLAGS= -I../Solaris -I./lib -I./src $(CCBITS32) $(LARGEFILES)
|
|
60 |
LINTFLAGS64= -I../Solaris -I./lib -I./src $(CCBITS64) $(LARGEFILES)
|
|
61 |
|
|
62 |
install: all
|
|
63 |
$(SH) ./install-sfw
|
|
64 |
MACH64=$(MACH64) $(SH) ./install-sfw-64
|
|
65 |
|
|
66 |
real-all: all32 all64 lint32 lint64
|
|
67 |
|
|
68 |
test: test32 test64
|
|
69 |
|
|
70 |
$(VER)/config.status: $(VER)/configure
|
|
71 |
(cd $(VER) ; \
|
|
72 |
env "CC=$(CC)" "CFLAGS=$(CPPFLAGS) $(CFLAGS)" \
|
|
73 |
"CPP=$(CC) $(CFLAGS) $(CPPFLAGS) -E" \
|
|
74 |
"CXX=$(CCC)" "CXXFLAGS=$(CPPFLAGS) $(CCFLAGS)" \
|
|
75 |
"CXXCPP=$(CCC) $(CPPFLAGS) $(CCFLAGS) -E" \
|
|
76 |
"CXXLDFLAGS=$(LDFLAGS)" \
|
|
77 |
"CXXLD=$(CCC) $(LDFLAGS)" \
|
|
78 |
AUTOMAKE="/usr/bin/automake-1.10" \
|
|
79 |
PATH=$(SFW_PATH) \
|
|
80 |
"MAKE=$(GMAKE)" \
|
|
81 |
"INSTALL=$(GINSTALL) -c " \
|
|
82 |
"ACLOCAL=/usr/bin/aclocal-1.10" \
|
|
83 |
./configure --prefix=$(CFGPREFIX) \
|
|
84 |
--includedir=$(CFGPREFIX)/include/idn \
|
|
85 |
--localstatedir=/var \
|
|
86 |
--enable-shared \
|
|
87 |
--disable-static \
|
|
88 |
--disable-csharp \
|
|
89 |
--disable-valgrind-tests \
|
|
90 |
--enable-tld \
|
|
91 |
--disable-gtk-doc \
|
|
92 |
--enable-java \
|
|
93 |
--with-libiconv-prefix=$(PREFIX) \
|
|
94 |
--with-libintl-prefix=$(PREFIX) \
|
|
95 |
--with-html-dir=$(PREFIX)/share/doc \
|
|
96 |
--with-pic)
|
|
97 |
|
|
98 |
$(VER64)/config.status: $(VER64)/configure
|
|
99 |
(cd $(VER64) ; \
|
|
100 |
env "CC=$(CC64)" "CFLAGS=$(CPPFLAGS) $(CFLAGS64)" \
|
|
101 |
"CPP=$(CC64) $(CFLAGS64) $(CPPFLAGS) -E" \
|
|
102 |
"CXX=$(CCC64)" "CXXFLAGS=$(CPPFLAGS) $(CCFLAGS64)" \
|
|
103 |
"CXXCPP=$(CCC64) $(CPPFLAGS) $(CCFLAGS64) -E" \
|
|
104 |
"CXXLDFLAGS=$(LDFLAGS)" \
|
|
105 |
"CXXLD=$(CCC64) $(LDFLAGS)" \
|
|
106 |
"CXXLINKLIB=$(CCC64) $(LDFLAGS)" \
|
|
107 |
AUTOMAKE="/usr/bin/automake-1.10" \
|
|
108 |
"MACH64=$(MACH64)" \
|
|
109 |
PATH=$(SFW_PATH) \
|
|
110 |
"MAKE=$(GMAKE)" \
|
|
111 |
"INSTALL=$(GINSTALL) -c " \
|
|
112 |
"ACLOCAL=/usr/bin/aclocal-1.10" \
|
|
113 |
./configure --prefix=$(CFGPREFIX) \
|
|
114 |
--bindir=$(CFGPREFIX)/bin/$(MACH64) \
|
|
115 |
--libdir=$(CFGPREFIX)/lib/$(MACH64) \
|
|
116 |
--libexecdir=$(CFGPREFIX)/libexec/$(MACH64) \
|
|
117 |
--includedir=$(CFGPREFIX)/include/idn \
|
|
118 |
--localstatedir=/var \
|
|
119 |
--enable-shared \
|
|
120 |
--disable-static \
|
|
121 |
--disable-csharp \
|
|
122 |
--disable-valgrind-tests \
|
|
123 |
--enable-tld \
|
|
124 |
--disable-gtk-doc \
|
|
125 |
--enable-java \
|
|
126 |
--with-libiconv-prefix=$(PREFIX) \
|
|
127 |
--with-libintl-prefix=$(PREFIX) \
|
|
128 |
--with-html-dir=$(PREFIX)/share/doc \
|
|
129 |
--with-pic)
|
|
130 |
|
|
131 |
$(VER)/configure: $(VER).tar.gz
|
|
132 |
mkdir -p tmp; gzip -dc $(VER).tar.gz | (cd tmp; tar xopf -)
|
|
133 |
mv tmp/$(VER) $(VER); rmdir tmp
|
|
134 |
( cd $(VER)/doc ; \
|
|
135 |
cp -fp ../../tld-0.7.tar.gz . ; \
|
|
136 |
gunzip tld-0.7.tar.gz ; \
|
|
137 |
tar xvf tld-0.7.tar ; \
|
|
138 |
rm -f tld-0.7.tar ; \
|
|
139 |
cd ../.. )
|
|
140 |
find $(VER) -type d -exec chmod go+rx {} +
|
|
141 |
( cd $(VER) ; \
|
|
142 |
gpatch -p0 <../Makefile.in.0.diff ; \
|
|
143 |
touch configure ; \
|
|
144 |
chmod 0755 configure ; \
|
|
145 |
cd .. )
|
|
146 |
|
|
147 |
$(VER64)/configure: $(VER).tar.gz
|
|
148 |
mkdir -p tmp; gzip -dc $(VER).tar.gz | (cd tmp; tar xopf -)
|
|
149 |
mv tmp/$(VER) $(VER64); rmdir tmp
|
|
150 |
( cd $(VER64)/doc ; \
|
|
151 |
cp -fp ../../tld-0.7.tar.gz . ; \
|
|
152 |
gunzip tld-0.7.tar.gz ; \
|
|
153 |
tar xvf tld-0.7.tar ; \
|
|
154 |
rm -f tld-0.7.tar ; \
|
|
155 |
cd ../.. )
|
|
156 |
find $(VER64) -type d -exec chmod go+rx {} +
|
|
157 |
( cd $(VER64) ; \
|
|
158 |
gpatch -p0 <../Makefile.in.0.diff ; \
|
|
159 |
touch configure ; \
|
|
160 |
chmod 0755 configure ; \
|
|
161 |
cd .. )
|
|
162 |
|
|
163 |
clean:
|
|
164 |
-rm -rf $(VER)
|
|
165 |
-rm -rf $(VER64)
|
|
166 |
|
|
167 |
lint32: $(VER)/config.status
|
|
168 |
(cd $(VER); \
|
|
169 |
$(LINT.c) -o $(LIBNAME) ../llib-lidn > $(LINTOUT) 2>&1)
|
|
170 |
|
|
171 |
lint64: $(VER64)/config.status
|
|
172 |
(cd $(VER64); \
|
|
173 |
$(LINT64.c) -o $(LIBNAME) ../llib-lidn > $(LINTOUT) 2>&1)
|
|
174 |
|
|
175 |
install_h:
|
|
176 |
|
|
177 |
include ../Makefile.targ
|