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 |
#
|
6
|
22 |
# Copyright 2010 Sun Microsystems, Inc. All rights reserved.
|
0
|
23 |
# Use is subject to license terms.
|
|
24 |
#
|
6
|
25 |
#ident "@(#)Makefile.sfw 1.4 10/01/08 SMI"
|
0
|
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=lcms-1.17
|
|
33 |
VER64=$(VER)-64
|
|
34 |
|
|
35 |
LARGEFILES = -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
|
|
36 |
PREFIX = /usr
|
|
37 |
DESTDIR = $(SRC)/lib/lcms/proto
|
|
38 |
|
|
39 |
# We need to do this because libtool adds wrong paths to RPATH.
|
|
40 |
LDFLAGS = -L$(PREFIX)/lib -R$(PREFIX)/lib
|
|
41 |
|
|
42 |
EXTRA_LDFLAGS64 = -L$(PREFIX)/lib/$(MACH64)
|
|
43 |
EXTRA_LDFLAGS64 += -R$(PREFIX)/lib/$(MACH64)
|
|
44 |
|
|
45 |
CCFLAGS_GENERIC = -features=anachronisms,except,rtti,export,extensions,nestedaccess,tmplife,tmplrefstatic \
|
|
46 |
-instances=global -template=geninlinefuncs -verbose=template \
|
|
47 |
-xlang=c99 -xbuiltin=%all -xinline=%auto -xlibmil \
|
|
48 |
-xustr=ascii_utf16_ushort -xlibmopt \
|
|
49 |
-z combreloc -z redlocsym -z ignore -z rescan -z absexec \
|
|
50 |
-xldscope=symbolic -xalias_level=compatible -KPIC \
|
|
51 |
-xF=%none -xthreadvar=%all -mt -D_REENTRANT -DNDEBUG \
|
|
52 |
-D__EXTENSIONS__ -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 \
|
|
53 |
-D_XOPEN_SOURCE=500 -D_POSIX_PTHREAD_SEMANTICS -s
|
|
54 |
|
|
55 |
all: real-all
|
|
56 |
|
|
57 |
all32: $(VER)/config.status
|
|
58 |
(cd $(VER); env "CFLAGS=$(CFLAGS) $(XREGSFLAG) $(LARGEFILES)" \
|
|
59 |
"LD_OPTIONS=-M $(SRC)/cmd/mapfile_noexstk -z ignore" \
|
|
60 |
"LDFLAGS=$(LDFLAGS)" \
|
|
61 |
"MAKE=/usr/ccs/bin/make" /usr/ccs/bin/make -e)
|
|
62 |
|
|
63 |
# if we do not add $($(MACH64)_XARCH), CXX will assume that it's linking
|
|
64 |
# 32-bit, and linking will fail.
|
|
65 |
all64: $(VER64)/config.status
|
|
66 |
(cd $(VER64); env "CFLAGS=$(CFLAGS64) $(XREGSFLAG64) $(LARGEFILES)" \
|
|
67 |
"LD_OPTIONS=-M $(SRC)/cmd/mapfile_noexstk -z ignore" \
|
|
68 |
"LDFLAGS=$(EXTRA_LDFLAGS64) $($(MACH64)_XARCH)" \
|
|
69 |
"MAKE=/usr/ccs/bin/make" /usr/ccs/bin/make -e)
|
|
70 |
|
|
71 |
include ../Makefile.lib
|
|
72 |
|
|
73 |
CCC += -norunpath
|
|
74 |
CCC64 += -norunpath
|
|
75 |
|
|
76 |
COMPAT_VERSION= 5
|
|
77 |
|
|
78 |
# override the defaults because -messages=no%anachronism and
|
|
79 |
# -features=no%conststrings cause C++ linking to fail
|
|
80 |
sparc_CCFLAGS = -compat=$(COMPAT_VERSION) -xmemalign=8i \
|
|
81 |
$(CCFLAGS_GENERIC)
|
|
82 |
sparcv9_CCFLAGS = $(sparcv9_XARCH) -xmemalign=8i \
|
|
83 |
-compat=$(COMPAT_VERSION) \
|
|
84 |
$(CCFLAGS_GENERIC)
|
|
85 |
i386_CCFLAGS = -compat=$(COMPAT_VERSION) $(CCFLAGS_GENERIC)
|
|
86 |
amd64_CCFLAGS = $(amd64_XARCH) -compat=$(COMPAT_VERSION) \
|
|
87 |
$(CCFLAGS_GENERIC)
|
|
88 |
|
|
89 |
# lint stuff
|
|
90 |
LIBRARY=liblcms.a
|
|
91 |
LINTOUT= lint.out
|
|
92 |
LINTFLAGS = -I./include -I. $(LARGEFILES)
|
|
93 |
LINTFLAGS64 = $(CCBITS64) -I./include -I. $(LARGEFILES)
|
|
94 |
|
|
95 |
# All this DESTDIR stuff is necessary because libtool must relink
|
|
96 |
# the shared libraries at make install time. Otherwise, libtool will
|
|
97 |
# put the wrong components in RPATH, and we really do not want that.
|
|
98 |
|
|
99 |
install: all
|
|
100 |
mkdir -p $(DESTDIR)
|
|
101 |
(cd $(VER); env "DESTDIR=$(DESTDIR)" \
|
|
102 |
/usr/ccs/bin/make \
|
|
103 |
DESTDIR=$(DESTDIR) \
|
|
104 |
INSTALL=/usr/ucb/install \
|
|
105 |
install)
|
|
106 |
(cd $(VER)-64; env "DESTDIR=$(DESTDIR)" \
|
|
107 |
/usr/ccs/bin/make \
|
|
108 |
DESTDIR=$(DESTDIR) \
|
|
109 |
INSTALL=/usr/ucb/install \
|
|
110 |
install)
|
|
111 |
|
|
112 |
INSTDIR=$(DESTDIR) $(SH) ./install-sfw
|
|
113 |
INSTDIR=$(DESTDIR) MACH64=$(MACH64) $(SH) ./install-sfw-64
|
|
114 |
rm -rf $(DESTDIR)
|
|
115 |
|
|
116 |
real-all: all32 all64 lint32 lint64
|
|
117 |
|
|
118 |
test: test32 test64
|
|
119 |
|
|
120 |
$(VER)/config.status: $(VER)/configure
|
|
121 |
(cd $(VER); \
|
|
122 |
env "CC=$(CC)" "CFLAGS=$(CPPFLAGS) $(CFLAGS)" \
|
|
123 |
"CPP=$(CC) $(CFLAGS) $(CPPFLAGS) -E" \
|
|
124 |
"CXX=$(CCC)" "CXXFLAGS=$(CPPFLAGS) $(CCFLAGS)" \
|
|
125 |
"CXXCPP=$(CCC) $(CPPFLAGS) $(CCFLAGS) -E" \
|
|
126 |
"LDFLAGS=$(LDFLAGS)" \
|
|
127 |
"CXXLD=$(CCC) $(CCFLAGS) $(LDFLAGS)" \
|
|
128 |
"INSTALL=/usr/ucb/install" \
|
6
|
129 |
PYTHON=$(PYTHON24) \
|
0
|
130 |
./configure --prefix=$(PREFIX) \
|
|
131 |
--localstatedir=/var \
|
|
132 |
--enable-shared \
|
|
133 |
--disable-static \
|
|
134 |
--disable-libtool-lock \
|
|
135 |
--with-jpeg \
|
|
136 |
--with-tiff \
|
|
137 |
--with-zlib \
|
|
138 |
--with-python \
|
|
139 |
--with-pic)
|
|
140 |
|
|
141 |
$(VER64)/config.status: $(VER64)/configure
|
|
142 |
(cd $(VER64); \
|
|
143 |
env "CC=$(CC64)" "CFLAGS=$(CPPFLAGS) $(CFLAGS64)" \
|
|
144 |
"CPP=$(CC64) $(CFLAGS64) $(CPPFLAGS) -E" \
|
|
145 |
"CXX=$(CCC64)" "CXXFLAGS=$(CPPFLAGS) $(CCFLAGS64)" \
|
|
146 |
"CXXCPP=$(CCC64) $(CPPFLAGS) $(CCFLAGS64) -E" \
|
|
147 |
"LDFLAGS=$(EXTRA_LDFLAGS64) $($(MACH64)_XARCH)" \
|
|
148 |
"CXXLDFLAGS=$(EXTRA_LDFLAGS64) $($(MACH64)_XARCH) -norunpath" \
|
|
149 |
"CXXLD=$(CCC64) $(EXTRA_LDFLAGS64) $($(MACH64)_XARCH)" \
|
|
150 |
"CXXLINKLIB=$(CCC64) $(CCFLAGS64) $(EXTRA_LDFLAGS64) $($(MACH64)_XARCH)" \
|
|
151 |
"MACH64=$(MACH64)" \
|
|
152 |
"INSTALL=/usr/ucb/install" \
|
6
|
153 |
PYTHON=$(PYTHON24_64) \
|
0
|
154 |
./configure --prefix=$(PREFIX) \
|
|
155 |
--bindir=$(PREFIX)/bin/$(MACH64) \
|
|
156 |
--libdir=$(PREFIX)/lib/$(MACH64) \
|
|
157 |
--libexecdir=$(PREFIX)/libexec/$(MACH64) \
|
|
158 |
--localstatedir=/var \
|
|
159 |
--enable-shared \
|
|
160 |
--disable-static \
|
|
161 |
--disable-libtool-lock \
|
|
162 |
--with-jpeg \
|
|
163 |
--with-tiff \
|
|
164 |
--with-zlib \
|
|
165 |
--with-python \
|
|
166 |
--with-pic)
|
|
167 |
|
|
168 |
$(VER)/configure: $(VER).tar.gz
|
|
169 |
mkdir -p tmp; gzip -dc $(VER).tar.gz | (cd tmp; tar xopf -)
|
|
170 |
mv tmp/$(VER) $(VER); rmdir tmp
|
|
171 |
touch $(VER)/configure
|
|
172 |
(cd $(VER); \
|
6
|
173 |
gpatch -p0 <../configure.patch ; \
|
0
|
174 |
gpatch -p0 <../python.Makefile.in.patch ; \
|
|
175 |
gpatch -p0 <../install-sh.patch ; \
|
|
176 |
cd ..)
|
|
177 |
|
|
178 |
$(VER64)/configure: $(VER).tar.gz
|
|
179 |
mkdir -p tmp; gzip -dc $(VER).tar.gz | (cd tmp; tar xopf -)
|
|
180 |
mv tmp/$(VER) $(VER64); rmdir tmp
|
|
181 |
touch $(VER64)/configure
|
|
182 |
(cd $(VER64); \
|
6
|
183 |
gpatch -p0 <../configure.patch ; \
|
0
|
184 |
gpatch -p0 <../python.Makefile.in.patch ; \
|
|
185 |
gpatch -p0 <../install-sh.patch ; \
|
|
186 |
gpatch -p0 <../lcms.python-64.patch ; \
|
|
187 |
cd ..)
|
|
188 |
|
|
189 |
clean:
|
|
190 |
-rm -rf $(VER)
|
|
191 |
-rm -rf $(VER64)
|
|
192 |
|
|
193 |
lint32: $(VER)/config.status
|
|
194 |
(cd $(VER); \
|
|
195 |
$(LINT.c) -o $(LIBNAME) ../llib-llcms > $(LINTOUT) 2>&1)
|
|
196 |
|
|
197 |
lint64: $(VER64)/config.status
|
|
198 |
(cd $(VER64); \
|
|
199 |
$(LINT64.c) -o $(LIBNAME) ../llib-llcms > $(LINTOUT) 2>&1)
|
|
200 |
|
|
201 |
install_h:
|
|
202 |
|
|
203 |
include ../Makefile.targ
|
|
204 |
|