open-src/lib/Makefile.inc
author Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
Mon, 22 Feb 2016 16:57:16 -0800
changeset 1610 77a2e608a1ff
parent 1466 fbd4067be4c6
permissions -rw-r--r--
22807351 X gate makefiles no longer need to carry around $(X11_DIR) baggage
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
#
1610
77a2e608a1ff 22807351 X gate makefiles no longer need to carry around $(X11_DIR) baggage
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1466
diff changeset
     3
# Copyright (c) 2006, 2016, Oracle and/or its affiliates. All rights reserved.
70
af1bea13b32b 6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
     4
#
af1bea13b32b 6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
     5
# Permission is hereby granted, free of charge, to any person obtaining a
919
425233ae7236 6931307 Standardize Sun copyright & license notices in X gate on current format
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 910
diff changeset
     6
# copy of this software and associated documentation files (the "Software"),
425233ae7236 6931307 Standardize Sun copyright & license notices in X gate on current format
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 910
diff changeset
     7
# to deal in the Software without restriction, including without limitation
425233ae7236 6931307 Standardize Sun copyright & license notices in X gate on current format
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 910
diff changeset
     8
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
425233ae7236 6931307 Standardize Sun copyright & license notices in X gate on current format
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 910
diff changeset
     9
# and/or sell copies of the Software, and to permit persons to whom the
425233ae7236 6931307 Standardize Sun copyright & license notices in X gate on current format
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 910
diff changeset
    10
# Software is furnished to do so, subject to the following conditions:
425233ae7236 6931307 Standardize Sun copyright & license notices in X gate on current format
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 910
diff changeset
    11
#
425233ae7236 6931307 Standardize Sun copyright & license notices in X gate on current format
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 910
diff changeset
    12
# The above copyright notice and this permission notice (including the next
425233ae7236 6931307 Standardize Sun copyright & license notices in X gate on current format
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 910
diff changeset
    13
# paragraph) shall be included in all copies or substantial portions of the
425233ae7236 6931307 Standardize Sun copyright & license notices in X gate on current format
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 910
diff changeset
    14
# Software.
425233ae7236 6931307 Standardize Sun copyright & license notices in X gate on current format
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 910
diff changeset
    15
#
425233ae7236 6931307 Standardize Sun copyright & license notices in X gate on current format
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 910
diff changeset
    16
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
425233ae7236 6931307 Standardize Sun copyright & license notices in X gate on current format
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 910
diff changeset
    17
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
425233ae7236 6931307 Standardize Sun copyright & license notices in X gate on current format
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 910
diff changeset
    18
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
425233ae7236 6931307 Standardize Sun copyright & license notices in X gate on current format
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 910
diff changeset
    19
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
425233ae7236 6931307 Standardize Sun copyright & license notices in X gate on current format
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 910
diff changeset
    20
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
425233ae7236 6931307 Standardize Sun copyright & license notices in X gate on current format
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 910
diff changeset
    21
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
425233ae7236 6931307 Standardize Sun copyright & license notices in X gate on current format
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 910
diff changeset
    22
# DEALINGS IN THE SOFTWARE.
70
af1bea13b32b 6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    23
#
af1bea13b32b 6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    24
#
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
PWD:sh=pwd
967
efbd0ee6805d 6963229 build race conditions and other makefile issues
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 965
diff changeset
    27
TOP=$(PWD)/../../..
156
1dec9ce4addc 6551329 X open-src makefiles spawn too many shell commands
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 87
diff changeset
    28
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 341
diff changeset
    29
MODTYPE=lib
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 341
diff changeset
    30
970
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
    31
# Hierarchical parent for pkg names in this area
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
    32
MODTYPE_PKGHIER=x11/library
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
    33
MODTYPE_PKGHIER_SET=yes
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
    34
1356
73c3eb360de2 16167547 Update copyright & license display & metadata in X packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1196
diff changeset
    35
# Default module description for packages in this area
73c3eb360de2 16167547 Update copyright & license display & metadata in X packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1196
diff changeset
    36
MODTYPE_DESC = the $(MODULE_NAME) library
73c3eb360de2 16167547 Update copyright & license display & metadata in X packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1196
diff changeset
    37
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 341
diff changeset
    38
### Include common definitions
967
efbd0ee6805d 6963229 build race conditions and other makefile issues
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 965
diff changeset
    39
include $(TOP)/open-src/common/Makefile.init
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 341
diff changeset
    40
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 341
diff changeset
    41
# Set default to build both 32-bit & 64-bit if not set in module makefile
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 341
diff changeset
    42
BUILD_TYPES_DEFAULT     = $(BUILD_TYPES_SET:yes=$(POUND_SIGN))
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 341
diff changeset
    43
$(BUILD_TYPES_DEFAULT)  BUILD_TYPES=32 64
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 341
diff changeset
    44
$(BUILD_TYPES_DEFAULT)	BUILD_TYPES_SET=yes
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 341
diff changeset
    45
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 341
diff changeset
    46
# Changes to apply to man pages
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 341
diff changeset
    47
MODULE_MTLEVEL_DEFAULT	= $(MODULE_MTLEVEL_SET:yes=$(POUND_SIGN))
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 341
diff changeset
    48
$(MODULE_MTLEVEL_DEFAULT)	MODULE_MTLEVEL=See XInitThreads(3X11)
1451
4d0056c482c6 18663528 Missed attributes in man pages of packages from X-incorporation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1425
diff changeset
    49
MODULE_PKGCONFIG_MAN_DEFAULT	= $(MODULE_PKGCONFIG_MAN_SET:yes=$(POUND_SIGN))
4d0056c482c6 18663528 Missed attributes in man pages of packages from X-incorporation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1425
diff changeset
    50
$(MODULE_PKGCONFIG_MAN_DEFAULT)	MODULE_PKGCONFIG_MAN = $(FIX_PC_FILES:%.pc.in=%)
4d0056c482c6 18663528 Missed attributes in man pages of packages from X-incorporation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1425
diff changeset
    51
LIB_SUNTOUCH_DEFAULTS	= -a '{MT-Level, $(MODULE_MTLEVEL)}'
4d0056c482c6 18663528 Missed attributes in man pages of packages from X-incorporation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1425
diff changeset
    52
LIB_SUNTOUCH_DEFAULTS	+= --library='$(LIBNAME)'
4d0056c482c6 18663528 Missed attributes in man pages of packages from X-incorporation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1425
diff changeset
    53
LIB_SUNTOUCH_DEFAULTS	+= --pkg-config='$(MODULE_PKGCONFIG_MAN)'
4d0056c482c6 18663528 Missed attributes in man pages of packages from X-incorporation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1425
diff changeset
    54
MODTYPE_SUNTOUCH_DEFAULT = $(OVERRIDE_LIB_SUNTOUCH_DEFAULT:yes=$(POUND_SIGN))
4d0056c482c6 18663528 Missed attributes in man pages of packages from X-incorporation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1425
diff changeset
    55
$(MODTYPE_SUNTOUCH_DEFAULT) MODTYPE_SUNTOUCH_MAN_FLAGS = $(LIB_SUNTOUCH_DEFAULTS)
70
af1bea13b32b 6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    56
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 341
diff changeset
    57
# Flags to build & link libraries with
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 341
diff changeset
    58
MODTYPE_CPPFLAGS=$(LIB_CPPFLAGS)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 341
diff changeset
    59
MODTYPE_CFLAGS=$(LIB_CFLAGS)
705
24ca414edbff 6826940 Xorg server 1.6.1, Mesa 7.4.1, and associated module upgrades [PSARC 2009/292]
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 591
diff changeset
    60
MODTYPE_CXXFLAGS=$(LIB_CXXFLAGS)
1196
1ce455dae979 7081325 X builds should run check_rtime to ensure binaries are linked well
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 970
diff changeset
    61
MODTYPE_LDFLAGS=$(LIB_LDFLAGS) -lc
1425
d2b9d2006251 17915870 clean up check_rtime & ld guidance warnings in X gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1356
diff changeset
    62
MODTYPE_LD_OPTIONS=
70
af1bea13b32b 6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    63
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 341
diff changeset
    64
# Additional command line options to GNU autoconf configure script
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 341
diff changeset
    65
MODTYPE_CONFIG_OPTS = --enable-shared=yes --enable-static=no \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 341
diff changeset
    66
    --with-lint --enable-lint-library --with-pic \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 341
diff changeset
    67
    --libdir='$${exec_prefix}/lib$(MODULE_ADD_LIB_SUBDIR)$(ARCHLIBSUBDIR)' \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 341
diff changeset
    68
    --bindir='$${exec_prefix}/bin$(ARCHLIBSUBDIR)'
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 341
diff changeset
    69
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 341
diff changeset
    70
# Additional environment variables to GNU autoconf configure script
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 341
diff changeset
    71
MODTYPE_CONFIG_ENV = LIB_MAN_SUFFIX=$(LIB_MAN_SUFFIX)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 341
diff changeset
    72
591
a2c6b61a92aa 6777135 X builds should record version info in ELF comments
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 493
diff changeset
    73
# Set comments in ELF binaries to help identify versions/builds
a2c6b61a92aa 6777135 X builds should record version info in ELF comments
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 493
diff changeset
    74
MODTYPE_ADD_BUILD_TARGETS=set-elf-comments
a2c6b61a92aa 6777135 X builds should record version info in ELF comments
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 493
diff changeset
    75
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 341
diff changeset
    76
# Additional arguments to pass to make when running make install
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 341
diff changeset
    77
MODTYPE_INSTALL_MAKEFLAGS = \
1610
77a2e608a1ff 22807351 X gate makefiles no longer need to carry around $(X11_DIR) baggage
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1466
diff changeset
    78
	libdir=$(MODULE_FULLARCH_LIB_DIR)
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 341
diff changeset
    79
1466
fbd4067be4c6 19461700 Split source & build subdirectories in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1451
diff changeset
    80
# Need to fix libtool interference with our linker flags, unless module overrides
fbd4067be4c6 19461700 Split source & build subdirectories in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1451
diff changeset
    81
DELIBTOOLIZE_1 =	$(DELIBTOOLIZE:no=$(POUND_SIGN))
fbd4067be4c6 19461700 Split source & build subdirectories in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1451
diff changeset
    82
DELIBTOOLIZE_2 =	$(DELIBTOOLIZE_1:yes=$(POUND_SIGN))
fbd4067be4c6 19461700 Split source & build subdirectories in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1451
diff changeset
    83
$(DELIBTOOLIZE_2)	DELIBTOOLIZE=yes
70
af1bea13b32b 6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    84
967
efbd0ee6805d 6963229 build race conditions and other makefile issues
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 965
diff changeset
    85
include $(TOP)/open-src/common/Makefile.inc