author | Alan Coopersmith <Alan.Coopersmith@Sun.COM> |
Wed, 23 Jan 2008 15:02:08 -0800 | |
changeset 292 | 0cadb6330f7c |
parent 278 | d14c4ceeb35d |
child 341 | 0a1eb61fd56e |
permissions | -rw-r--r-- |
87
f16a51e60f1c
6504462 XFixes 4.0 [PSARC 2006/702]
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
70
diff
changeset
|
1 |
# -*- Makefile -*- rules common to most X.Org library modules |
70
af1bea13b32b
6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
2 |
# |
292
0cadb6330f7c
6652947 Bold font emulation in Xft is disabled after nevada b80
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
278
diff
changeset
|
3 |
# Copyright 2008 Sun Microsystems, Inc. All rights reserved. |
70
af1bea13b32b
6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
4 |
# Use subject to license terms. |
af1bea13b32b
6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
5 |
# |
af1bea13b32b
6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
6 |
# Permission is hereby granted, free of charge, to any person obtaining a |
af1bea13b32b
6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
7 |
# copy of this software and associated documentation files (the |
af1bea13b32b
6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
8 |
# "Software"), to deal in the Software without restriction, including |
af1bea13b32b
6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
9 |
# without limitation the rights to use, copy, modify, merge, publish, |
af1bea13b32b
6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
10 |
# distribute, and/or sell copies of the Software, and to permit persons |
af1bea13b32b
6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
11 |
# to whom the Software is furnished to do so, provided that the above |
af1bea13b32b
6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
12 |
# copyright notice(s) and this permission notice appear in all copies of |
af1bea13b32b
6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
13 |
# the Software and that both the above copyright notice(s) and this |
af1bea13b32b
6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
14 |
# permission notice appear in supporting documentation. |
af1bea13b32b
6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
15 |
# |
af1bea13b32b
6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
16 |
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS |
af1bea13b32b
6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
17 |
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF |
af1bea13b32b
6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
18 |
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT |
af1bea13b32b
6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
19 |
# OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR |
af1bea13b32b
6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
20 |
# HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL |
af1bea13b32b
6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
21 |
# INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING |
af1bea13b32b
6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
22 |
# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, |
af1bea13b32b
6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
23 |
# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION |
af1bea13b32b
6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
24 |
# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
af1bea13b32b
6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
25 |
# |
af1bea13b32b
6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
26 |
# Except as contained in this notice, the name of a copyright holder |
af1bea13b32b
6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
27 |
# shall not be used in advertising or otherwise to promote the sale, use |
af1bea13b32b
6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
28 |
# or other dealings in this Software without prior written authorization |
af1bea13b32b
6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
29 |
# of the copyright holder. |
af1bea13b32b
6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
30 |
# |
292
0cadb6330f7c
6652947 Bold font emulation in Xft is disabled after nevada b80
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
278
diff
changeset
|
31 |
# @(#)Makefile.inc 1.9 08/01/23 |
70
af1bea13b32b
6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
32 |
# |
af1bea13b32b
6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
33 |
|
af1bea13b32b
6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
34 |
PWD:sh=pwd |
af1bea13b32b
6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
35 |
TOP=$(PWD)/../.. |
156
1dec9ce4addc
6551329 X open-src makefiles spawn too many shell commands
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
87
diff
changeset
|
36 |
|
70
af1bea13b32b
6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
37 |
BUILD_TYPES=32 64 |
156
1dec9ce4addc
6551329 X open-src makefiles spawn too many shell commands
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
87
diff
changeset
|
38 |
BUILD_TYPES_SET=yes |
70
af1bea13b32b
6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
39 |
|
af1bea13b32b
6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
40 |
# Directory created by unpacking source |
af1bea13b32b
6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
41 |
SOURCE_DIR=$(BUILD_DIR)/$(LIB_MODULE)-$(LIB_VERS) |
af1bea13b32b
6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
42 |
|
af1bea13b32b
6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
43 |
SUNTOUCH_MAN_FLAGS= -l $(LIBNAME) \ |
af1bea13b32b
6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
44 |
-a '{Availability, $(SUN_PACKAGE)} {Interface Stability, $(LIB_STABILITY)} {MT-Level, See XInitThreads(3X11)}' $(LIB_SUNTOUCH_MAN_FLAGS) |
af1bea13b32b
6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
45 |
|
af1bea13b32b
6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
46 |
include $(TOP)/common/Makefile.inc |
af1bea13b32b
6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
47 |
|
156
1dec9ce4addc
6551329 X open-src makefiles spawn too many shell commands
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
87
diff
changeset
|
48 |
# Source tarball |
1dec9ce4addc
6551329 X open-src makefiles spawn too many shell commands
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
87
diff
changeset
|
49 |
SOURCE_TARBALL_DEFAULT = $(SOURCE_TARBALL_SET:yes=$(POUND_SIGN)) |
1dec9ce4addc
6551329 X open-src makefiles spawn too many shell commands
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
87
diff
changeset
|
50 |
$(SOURCE_TARBALL_DEFAULT) SOURCE_TARBALL_NAME=$(LIB_MODULE)-$(LIB_VERS).tar.bz2 |
1dec9ce4addc
6551329 X open-src makefiles spawn too many shell commands
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
87
diff
changeset
|
51 |
SOURCE_TARBALL_DIR=lib |
1dec9ce4addc
6551329 X open-src makefiles spawn too many shell commands
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
87
diff
changeset
|
52 |
|
1dec9ce4addc
6551329 X open-src makefiles spawn too many shell commands
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
87
diff
changeset
|
53 |
# Where to install files - default is /usr/X11 |
1dec9ce4addc
6551329 X open-src makefiles spawn too many shell commands
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
87
diff
changeset
|
54 |
LIB_PREFIX_DEFAULT = $(LIB_PREFIX_SET:yes=$(POUND_SIGN)) |
1dec9ce4addc
6551329 X open-src makefiles spawn too many shell commands
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
87
diff
changeset
|
55 |
$(LIB_PREFIX_DEFAULT) LIB_PREFIX=$(X11_DIR) |
70
af1bea13b32b
6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
56 |
|
af1bea13b32b
6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
57 |
# Command line options to GNU autoconf configure script |
af1bea13b32b
6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
58 |
CONFIG_OPTS = --enable-shared=yes --enable-static=no \ |
156
1dec9ce4addc
6551329 X open-src makefiles spawn too many shell commands
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
87
diff
changeset
|
59 |
--prefix=$(LIB_PREFIX) --mandir='$${prefix}/share/man' \ |
87
f16a51e60f1c
6504462 XFixes 4.0 [PSARC 2006/702]
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
70
diff
changeset
|
60 |
--libdir='$${exec_prefix}/lib$(LIB_ADD_SUBDIR)$(LIBSUBDIR)' \ |
162
073d0aeee13d
6562151 Update X snv_b66, fc-cache can't run on 32-bit x86
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
156
diff
changeset
|
61 |
--bindir='$${exec_prefix}/bin$(LIBSUBDIR)' \ |
87
f16a51e60f1c
6504462 XFixes 4.0 [PSARC 2006/702]
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
70
diff
changeset
|
62 |
$(LIB_ADD_CONFIG_OPTS) |
70
af1bea13b32b
6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
63 |
|
af1bea13b32b
6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
64 |
# Environment variable options to GNU autoconf configure script |
87
f16a51e60f1c
6504462 XFixes 4.0 [PSARC 2006/702]
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
70
diff
changeset
|
65 |
THIS_LIB_CFLAGS=$(LIB_CFLAGS) -I$(PROTODIR)/usr/X11/include $(LIB_ADD_CFLAGS) |
70
af1bea13b32b
6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
66 |
|
292
0cadb6330f7c
6652947 Bold font emulation in Xft is disabled after nevada b80
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
278
diff
changeset
|
67 |
# Use proto area for building against current library versions |
0cadb6330f7c
6652947 Bold font emulation in Xft is disabled after nevada b80
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
278
diff
changeset
|
68 |
LIB_LD_OPTIONS = $(LIB_REQUIRED_LDFLAGS) \ |
0cadb6330f7c
6652947 Bold font emulation in Xft is disabled after nevada b80
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
278
diff
changeset
|
69 |
-L$(PROTODIR)$(X11_DIR)/lib$(LIBSUBDIR) $(LIB_ADD_LD_OPTIONS) |
0cadb6330f7c
6652947 Bold font emulation in Xft is disabled after nevada b80
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
278
diff
changeset
|
70 |
|
87
f16a51e60f1c
6504462 XFixes 4.0 [PSARC 2006/702]
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
70
diff
changeset
|
71 |
CONFIG_ENV = CC=$(CC) CFLAGS="$(THIS_LIB_CFLAGS)" LD="$(LD) $(LDFLAGS)" \ |
255
32600afcc112
6632594 FreeType move from /usr/sfw to /usr [LSARC/2007/662]
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
162
diff
changeset
|
72 |
CPPFLAGS="-I $(PROTODIR)$(X11_INCLUDES_DIR) $(LIB_ADD_CPPFLAGS)" \ |
292
0cadb6330f7c
6652947 Bold font emulation in Xft is disabled after nevada b80
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
278
diff
changeset
|
73 |
LDFLAGS="$(LIB_LDFLAGS) -L$(PROTODIR)$(X11_DIR)/lib$(ARCHLIBSUBDIR) -L$(PROTODIR)/usr/lib$(ARCHLIBSUBDIR)" \ |
87
f16a51e60f1c
6504462 XFixes 4.0 [PSARC 2006/702]
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
70
diff
changeset
|
74 |
PKG_CONFIG_PATH=$(PROTODIR)/usr/lib$(ARCHLIBSUBDIR)/pkgconfig:$(TOP)/common/pc-files/$(BUILD_DIR):/usr/lib$(ARCHLIBSUBDIR)/pkgconfig \ |
f16a51e60f1c
6504462 XFixes 4.0 [PSARC 2006/702]
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
70
diff
changeset
|
75 |
INSTALL="$(TOP)/common/install-sh -c" CPPROG="cp -p" \ |
156
1dec9ce4addc
6551329 X open-src makefiles spawn too many shell commands
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
87
diff
changeset
|
76 |
LIB_MAN_SUFFIX=$(LIB_MAN_SUFFIX) $(LIB_ADD_CONFIG_ENV) |
70
af1bea13b32b
6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
77 |
|
af1bea13b32b
6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
78 |
# Run configure script |
af1bea13b32b
6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
79 |
$(SOURCE_DIR)/Makefile: $(UNPACK_TARGET) $(XPROTO_DEP) |
af1bea13b32b
6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
80 |
(cd $(SOURCE_DIR) ; chmod a+x configure ; \ |
af1bea13b32b
6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
81 |
$(CONFIG_ENV) ./configure $(CONFIG_OPTS) ) |
af1bea13b32b
6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
82 |
|
af1bea13b32b
6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
83 |
build_gen: $(LIB_BUILT) |
af1bea13b32b
6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
84 |
|
af1bea13b32b
6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
85 |
$(LIB_BUILT): $(SOURCE_DIR)/Makefile $(LIB_ADD_BUILD_DEPS) |
292
0cadb6330f7c
6652947 Bold font emulation in Xft is disabled after nevada b80
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
278
diff
changeset
|
86 |
(cd $(SOURCE_DIR) ; $(LIBPATHS) LD_OPTIONS="$(LIB_LD_OPTIONS)" $(MAKE) $(MFLAGS) $(LIB_ADD_MAKEFLAGS) ) |
70
af1bea13b32b
6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
87 |
|
156
1dec9ce4addc
6551329 X open-src makefiles spawn too many shell commands
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
87
diff
changeset
|
88 |
install_gen:: $(LIB_BUILT) |
278
d14c4ceeb35d
6651397 Xorg modularization: libXmu & libXmuu [PSARC 2008/036]
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
255
diff
changeset
|
89 |
(cd $(SOURCE_DIR) ; $(LIBPATHS) LD_OPTIONS="$(LIB_LD_OPTIONS)" $(MAKE) $(MFLAGS) -e DESTDIR=$(PROTODIR) libdir=$(LIB_PREFIX)/lib$(LIB_ADD_SUBDIR)$(ARCHLIBSUBDIR) install pkgconfigdir=/usr/lib$(ARCHLIBSUBDIR)/pkgconfig $(LIB_ADD_MAKEFLAGS)) |