author | Alan Coopersmith <Alan.Coopersmith@Sun.COM> |
Tue, 03 Oct 2006 16:50:02 -0700 | |
changeset 70 | af1bea13b32b |
child 87 | f16a51e60f1c |
permissions | -rw-r--r-- |
70
af1bea13b32b
6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
1 |
############################################################################### |
af1bea13b32b
6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
2 |
# |
af1bea13b32b
6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
3 |
# Copyright 2006 Sun Microsystems, Inc. All rights reserved. |
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 |
# |
af1bea13b32b
6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
31 |
# @(#)Makefile.inc 1.1 06/10/03 |
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 |
### Makefile settings/rules common to most X.Org library modules |
af1bea13b32b
6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
35 |
|
af1bea13b32b
6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
36 |
PWD:sh=pwd |
af1bea13b32b
6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
37 |
TOP=$(PWD)/../.. |
af1bea13b32b
6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
38 |
BUILD_TYPES=32 64 |
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 |
# Source tarball |
af1bea13b32b
6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
41 |
SOURCE_TARBALL_NAME=$(LIB_MODULE)-$(LIB_VERS).tar.bz2 |
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 |
# Download site for source |
af1bea13b32b
6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
44 |
SOURCE_URL=$(XORG_RELEASES_URL)/lib/$(SOURCE_TARBALL_NAME) |
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 |
# Directory created by unpacking source |
af1bea13b32b
6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
47 |
SOURCE_DIR=$(BUILD_DIR)/$(LIB_MODULE)-$(LIB_VERS) |
af1bea13b32b
6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
48 |
|
af1bea13b32b
6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
49 |
SUNTOUCH_MAN_FLAGS= -l $(LIBNAME) \ |
af1bea13b32b
6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
50 |
-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
|
51 |
|
af1bea13b32b
6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
52 |
include $(TOP)/common/Makefile.inc |
af1bea13b32b
6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
53 |
|
af1bea13b32b
6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
54 |
# Where to install files |
af1bea13b32b
6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
55 |
LIB_prefix=$(X11_DIR) |
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 \ |
af1bea13b32b
6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
59 |
--prefix=$(LIB_prefix) --libdir='$${exec_prefix}/lib$(LIBSUBDIR)' \ |
af1bea13b32b
6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
60 |
--mandir='$${prefix}/share/man' $(LIB_ADD_CONFIG_OPTS) |
af1bea13b32b
6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
61 |
|
af1bea13b32b
6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
62 |
# Environment variable options to GNU autoconf configure script |
af1bea13b32b
6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
63 |
THIS_LIB_CFLAGS=$(LIB_CFLAGS) -I$(PROTODIR)/usr/X11/include |
af1bea13b32b
6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
64 |
|
af1bea13b32b
6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
65 |
CONFIG_ENV = CC=$(CC) CFLAGS="$(THIS_LIB_CFLAGS)" \ |
af1bea13b32b
6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
66 |
LD="$(LD) $(LDFLAGS)" LDFLAGS="$(LIB_LDFLAGS)" \ |
af1bea13b32b
6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
67 |
PKG_CONFIG_PATH=$(PROTODIR)/usr/lib/$(ARCHLIBSUBDIR)/pkgconfig:$(TOP)/common/pc-files/$(BUILD_DIR) \ |
af1bea13b32b
6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
68 |
LIB_MAN_SUFFIX=$(LIB_MAN_SUFFIX) |
af1bea13b32b
6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
69 |
|
af1bea13b32b
6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
70 |
# Run configure script |
af1bea13b32b
6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
71 |
$(SOURCE_DIR)/Makefile: $(UNPACK_TARGET) $(XPROTO_DEP) |
af1bea13b32b
6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
72 |
(cd $(SOURCE_DIR) ; chmod a+x configure ; \ |
af1bea13b32b
6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
73 |
$(CONFIG_ENV) ./configure $(CONFIG_OPTS) ) |
af1bea13b32b
6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
74 |
|
af1bea13b32b
6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
75 |
build_gen: $(LIB_BUILT) |
af1bea13b32b
6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
76 |
|
af1bea13b32b
6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
77 |
$(LIB_BUILT): $(SOURCE_DIR)/Makefile $(LIB_ADD_BUILD_DEPS) |
af1bea13b32b
6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
78 |
(cd $(SOURCE_DIR) ; LD_OPTIONS="$(LIB_REQUIRED_LDFLAGS) $(LIB_ADD_LD_OPTIONS)" $(MAKE) $(MFLAGS) ) |
af1bea13b32b
6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
79 |
|
af1bea13b32b
6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
80 |
|
af1bea13b32b
6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
81 |
install_gen: $(LIB_BUILT) |
af1bea13b32b
6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
82 |
(cd $(SOURCE_DIR) ; $(LIBPATHS) LD_OPTIONS="$(LIB_REQUIRED_LDFLAGS) $(LIB_ADD_LD_OPTIONS)" $(MAKE) $(MFLAGS) -e DESTDIR=$(PROTODIR) libdir=$(LIB_prefix)/lib$(ARCHLIBSUBDIR) install pkgconfigdir=/usr/lib/$(ARCHLIBSUBDIR)/pkgconfig) |