open-src/common/Makefile.init
author Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
Sun, 31 Jul 2011 11:54:33 -0700
changeset 1175 d321497d1679
parent 1147 54bcc6a673bf
child 1190 faa50483142d
permissions -rw-r--r--
7071400 X gate needs to workaround -xregs=no%appl bug 7030022 in Studio 12.1 compilers
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
     1
# -*- Makefile -*- rules commonly shared among X consolidation open source dirs
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
     2
# Makefile.init has definitions that are needed before the module/modtype rules
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
     3
#
1076
d5ec2442657d 6988508 Restore noexbss & bssalign mapfiles to X builds after fix for 6988300
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1073
diff changeset
     4
# Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
     5
#
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
     6
# 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
     7
# 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
     8
# 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
     9
# 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
    10
# 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
    11
# 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
    12
#
425233ae7236 6931307 Standardize Sun copyright & license notices in X gate on current format
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 910
diff changeset
    13
# 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
    14
# 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
    15
# Software.
425233ae7236 6931307 Standardize Sun copyright & license notices in X gate on current format
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 910
diff changeset
    16
#
425233ae7236 6931307 Standardize Sun copyright & license notices in X gate on current format
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 910
diff changeset
    17
# 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
    18
# 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
    19
# 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
    20
# 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
    21
# 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
    22
# 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
    23
# DEALINGS IN THE SOFTWARE.
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    24
#
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    25
#
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    26
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    27
# Use ksh93 for shell commands in Makefiles so that builds are the same
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    28
# on Nevada (where /bin/sh is still ancient Bourne shell) and Indiana
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    29
# (where /bin/sh is ksh93)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    30
SHELL=/usr/bin/ksh93
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    31
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    32
# Borrowed from Solaris OS/Net makefile.master:
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    33
# The declaration POUND_SIGN is always '#'. This is needed to get around the
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    34
# make feature that '#' is always a comment delimiter, even when escaped or
810
6f94d3da0552 6889793 enable parallel builds of the X consolidation
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 802
diff changeset
    35
# quoted. We use this macro expansion method to get POUND_SIGN rather than
6f94d3da0552 6889793 enable parallel builds of the X consolidation
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 802
diff changeset
    36
# always breaking out a shell because the general case can cause a noticable
6f94d3da0552 6889793 enable parallel builds of the X consolidation
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 802
diff changeset
    37
# slowdown in build times when so many Makefiles include Makefile.init.
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    38
#
810
6f94d3da0552 6889793 enable parallel builds of the X consolidation
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 802
diff changeset
    39
PRE_POUND=				pre\#
6f94d3da0552 6889793 enable parallel builds of the X consolidation
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 802
diff changeset
    40
POUND_SIGN=				$(PRE_POUND:pre\%=%)
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    41
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    42
# Set default build target to all
910
0a08683bf637 6928500 Race conditions in parallel make break X nightly builds
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 907
diff changeset
    43
default: all
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    44
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    45
# The infrastructure in the main tree requires Solaris make
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    46
$(error You must use Solaris make, not GNU make in this build - make sure /usr/ccs/bin or /usr/bin is ahead of /usr/gnu/bin in $$PATH)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    47
1003
a4d17d6bc179 6980773 X gate needs branding options
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 980
diff changeset
    48
### Build options
a4d17d6bc179 6980773 X gate needs branding options
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 980
diff changeset
    49
a4d17d6bc179 6980773 X gate needs branding options
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 980
diff changeset
    50
# Different builders want different settings for various options such
a4d17d6bc179 6980773 X gate needs branding options
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 980
diff changeset
    51
# as branding or download sites.  The top-level "make setup" command
a4d17d6bc179 6980773 X gate needs branding options
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 980
diff changeset
    52
# sets the Makefile.options link to point to a included Makefile to
a4d17d6bc179 6980773 X gate needs branding options
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 980
diff changeset
    53
# set these up.
a4d17d6bc179 6980773 X gate needs branding options
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 980
diff changeset
    54
a4d17d6bc179 6980773 X gate needs branding options
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 980
diff changeset
    55
include "Makefile.options"
a4d17d6bc179 6980773 X gate needs branding options
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 980
diff changeset
    56
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    57
###  Machine architecture macros
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    58
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    59
# MACH will be either "sparc" or "i386"
810
6f94d3da0552 6889793 enable parallel builds of the X consolidation
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 802
diff changeset
    60
MACH=$(TARGET_ARCH:-%=%)
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    61
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    62
MACH32_sparc	= sparc
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    63
MACH64_sparc 	= sparcv9
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    64
MACH32_i386	= i386
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    65
MACH64_i386 	= amd64
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    66
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    67
MACH32= $(MACH32_$(MACH))
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    68
MACH64= $(MACH64_$(MACH))
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    69
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    70
# Architecture subdirectories
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    71
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    72
SUBDIR32_sparc	= sparcv8
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    73
SUBDIR64_sparc 	= sparcv9
859
449d89f35385 6909859 References to /usr/bin/i386/X* should be changed to /usr/bin/i86/X*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 851
diff changeset
    74
SUBDIR32_i386	= i86
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    75
SUBDIR64_i386 	= amd64
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    76
922
db66e53f0c94 6933880 Simplify building the same X workspace on sparc & x86
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 919
diff changeset
    77
SUBDIR32	= $(SUBDIR32_$(MACH))
db66e53f0c94 6933880 Simplify building the same X workspace on sparc & x86
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 919
diff changeset
    78
SUBDIR64	= $(SUBDIR64_$(MACH))
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    79
922
db66e53f0c94 6933880 Simplify building the same X workspace on sparc & x86
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 919
diff changeset
    80
LIBSUBDIR	= $(LIBSUBDIR_$(BUILD_TYPE))
db66e53f0c94 6933880 Simplify building the same X workspace on sparc & x86
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 919
diff changeset
    81
LIBSUBDIR_32	= # None
db66e53f0c94 6933880 Simplify building the same X workspace on sparc & x86
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 919
diff changeset
    82
LIBSUBDIR_64	= /$(SUBDIR64)
db66e53f0c94 6933880 Simplify building the same X workspace on sparc & x86
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 919
diff changeset
    83
ARCHLIBSUBDIR	= $(LIBSUBDIR)
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    84
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    85
### Default compiler & options
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    86
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    87
# Our default compiler is Sun Studio, but if you want to default to GNU 
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    88
# compilers, you can change this here - some modules with specific 
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    89
# requirements override this in their makefiles with MODULE_COMPILER.
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    90
DEFAULT_COMPILER		= suncc
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    91
606
068c11b419c9 6582489 X11R7.4: Xorg server 1.5.3, Mesa 7.2, and associated driver updates
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 561
diff changeset
    92
# Flags used by either compiler in debug builds
068c11b419c9 6582489 X11R7.4: Xorg server 1.5.3, Mesa 7.2, and associated driver updates
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 561
diff changeset
    93
DEBUG_FLAGS_common	= -g $(MODTYPE_DEBUG_FLAGS) $(MODULE_DEBUG_FLAGS)
068c11b419c9 6582489 X11R7.4: Xorg server 1.5.3, Mesa 7.2, and associated driver updates
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 561
diff changeset
    94
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    95
## Sun Studio
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    96
CC_suncc		= cc
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    97
CXX_suncc		= CC
1073
027712a1965a 7017145 Xorg sometimes fails to reply to a client that grabbed it
Stuart Kreitman <Stuart.Kreitman@Oracle.COM>
parents: 1056
diff changeset
    98
OPT_FLAGS_suncc		= -xO4 -W2,-Rext_tail_dup -xbuiltin=%none -xlibmil -xprefetch \
666
196a1b963ffb 6815700 X consolidation should be built with -xspace to reduce binary sizes
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 625
diff changeset
    99
			  -xdepend -xspace
606
068c11b419c9 6582489 X11R7.4: Xorg server 1.5.3, Mesa 7.2, and associated driver updates
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 561
diff changeset
   100
DEBUG_FLAGS_suncc	= $(DEBUG_FLAGS_common)
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   101
$(BUILD_DEBUG:yes=) DEBUG_OR_OPT_FLAGS_suncc = $(DEBUG_FLAGS_suncc)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   102
$(BUILD_DEBUG:yes=$(POUND_SIGN)) DEBUG_OR_OPT_FLAGS_suncc = $(OPT_FLAGS_suncc)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   103
802
159b5b227862 6865400 X consolidation does not build with Studio 12 Update 1 compilers
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 737
diff changeset
   104
CFLAGS_suncc 		= $(DEBUG_OR_OPT_FLAGS_suncc) -v -xstrconst \
606
068c11b419c9 6582489 X11R7.4: Xorg server 1.5.3, Mesa 7.2, and associated driver updates
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 561
diff changeset
   105
			  -features=extensions
802
159b5b227862 6865400 X consolidation does not build with Studio 12 Update 1 compilers
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 737
diff changeset
   106
CXXFLAGS_suncc		= $(DEBUG_OR_OPT_FLAGS_suncc) +w2 -norunpath \
684
1822e0f4b539 6831268 Upgrade rss-glx screensaver modules from 0.8.1 to 0.8.3
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 666
diff changeset
   107
			  -features=extensions
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   108
737
a511d9068b59 6854482 Xorg 1.6 doesn't try vesa by default
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 705
diff changeset
   109
# -D__<arch>__ flags are to match gcc definitions that are used in much
a511d9068b59 6854482 Xorg 1.6 doesn't try vesa by default
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 705
diff changeset
   110
# of the upstream open source code base
a511d9068b59 6854482 Xorg 1.6 doesn't try vesa by default
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 705
diff changeset
   111
ARCH_FLAGS_sparc_suncc		= -xarch=sparc -D__sparc__
a511d9068b59 6854482 Xorg 1.6 doesn't try vesa by default
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 705
diff changeset
   112
ARCH32_FLAGS_sparc_suncc 	= -m32
a511d9068b59 6854482 Xorg 1.6 doesn't try vesa by default
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 705
diff changeset
   113
ARCH64_FLAGS_sparc_suncc	= -m64
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   114
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   115
# -xregs=no%frameptr is required on x86 when compiling at -xO4 or higher to 
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   116
# avoid losing stack frame pointers so you can't get stack traces or debug
737
a511d9068b59 6854482 Xorg 1.6 doesn't try vesa by default
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 705
diff changeset
   117
ARCH_FLAGS_i386_suncc		= -xregs=no%frameptr
1097
243d7ed7a10c 6991718 Removal of 32-bit X servers [PSARC/2010/382]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1095
diff changeset
   118
ARCH32_FLAGS_i386_suncc 	= -m32 -xarch=sse2 -D__i386__
737
a511d9068b59 6854482 Xorg 1.6 doesn't try vesa by default
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 705
diff changeset
   119
ARCH64_FLAGS_i386_suncc 	= -m64 -xarch=sse2 -D__amd64__
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   120
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   121
# SPARC ABI requires system libraries not use application registers
1175
d321497d1679 7071400 X gate needs to workaround -xregs=no%appl bug 7030022 in Studio 12.1 compilers
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1147
diff changeset
   122
# The normal/documented flag for this is -xregs=no%appl, but for now,
d321497d1679 7071400 X gate needs to workaround -xregs=no%appl bug 7030022 in Studio 12.1 compilers
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1147
diff changeset
   123
# we use "-Qoption cg -xregs=no%appl" to workaround bug 7030022 in 
d321497d1679 7071400 X gate needs to workaround -xregs=no%appl bug 7030022 in Studio 12.1 compilers
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1147
diff changeset
   124
# the Studio 12.1 compilers that fails to honor the normal option.
d321497d1679 7071400 X gate needs to workaround -xregs=no%appl bug 7030022 in Studio 12.1 compilers
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1147
diff changeset
   125
ARCH_LIB_FLAGS_sparc_suncc 	= -Qoption cg -xregs=no%appl
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   126
ARCH_LIB_FLAGS_i386_suncc 	=  
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   127
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   128
## GNU Compilers
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   129
GCC				= /usr/sfw/bin/gcc
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   130
GXX				= /usr/sfw/bin/g++
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   131
CC_gcc				= $(GCC)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   132
CXX_gcc				= $(GXX)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   133
OPT_FLAGS_gcc			= -O3
606
068c11b419c9 6582489 X11R7.4: Xorg server 1.5.3, Mesa 7.2, and associated driver updates
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 561
diff changeset
   134
DEBUG_FLAGS_gcc			= $(DEBUG_FLAGS_common)
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   135
$(BUILD_DEBUG:yes=) DEBUG_OR_OPT_FLAGS_gcc = $(DEBUG_FLAGS_gcc)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   136
$(BUILD_DEBUG:yes=$(POUND_SIGN)) DEBUG_OR_OPT_FLAGS_gcc = $(OPT_FLAGS_gcc)
625
afcef81bda59 6800698 Sun modifications to Xinerama headers cause compiler warnings
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 606
diff changeset
   137
WARNFLAGS_gcc			= -Wall -Wno-unknown-pragmas
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   138
CFLAGS_gcc			= $(DEBUG_OR_OPT_FLAGS_gcc) \
625
afcef81bda59 6800698 Sun modifications to Xinerama headers cause compiler warnings
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 606
diff changeset
   139
				  -fno-omit-frame-pointer $(WARNFLAGS_gcc)
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   140
CXXFLAGS_gcc			= $(DEBUG_OR_OPT_FLAGS_gcc) \
625
afcef81bda59 6800698 Sun modifications to Xinerama headers cause compiler warnings
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 606
diff changeset
   141
				  -fno-omit-frame-pointer $(WARNFLAGS_gcc)
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   142
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   143
ARCH32_FLAGS_sparc_gcc	 	= -mcpu=ultrasparc -m32
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   144
ARCH64_FLAGS_sparc_gcc 		= -mcpu=ultrasparc -m64
1097
243d7ed7a10c 6991718 Removal of 32-bit X servers [PSARC/2010/382]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1095
diff changeset
   145
ARCH32_FLAGS_i386_gcc 		= -march=pentium4 -m32
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   146
ARCH64_FLAGS_i386_gcc 		= -march=opteron -m64
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   147
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   148
# SPARC ABI requires system libraries not use application registers
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   149
ARCH_LIB_FLAGS_sparc_gcc 	= -mno-app-regs
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   150
ARCH_LIB_FLAGS_i386_gcc 	= 
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   151
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   152
## Set common variables based on above rules
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   153
CC			= $(CC_$(MODULE_COMPILER))
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   154
CXX			= $(CXX_$(MODULE_COMPILER))
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   155
CFLAGS			= $(CFLAGS_$(MODULE_COMPILER)) $(ARCH_FLAGS)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   156
CXXFLAGS		= $(CXXFLAGS_$(MODULE_COMPILER)) $(ARCH_FLAGS)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   157
ARCH32_FLAGS		= $(ARCH32_FLAGS_$(MACH)_$(MODULE_COMPILER))
737
a511d9068b59 6854482 Xorg 1.6 doesn't try vesa by default
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 705
diff changeset
   158
ARCH32_FLAGS	       += $(ARCH_FLAGS_$(MACH)_$(MODULE_COMPILER))
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   159
ARCH64_FLAGS		= $(ARCH64_FLAGS_$(MACH)_$(MODULE_COMPILER))
737
a511d9068b59 6854482 Xorg 1.6 doesn't try vesa by default
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 705
diff changeset
   160
ARCH64_FLAGS	       += $(ARCH_FLAGS_$(MACH)_$(MODULE_COMPILER))
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   161
ARCH_LIB_FLAGS		= $(ARCH_LIB_FLAGS_$(MACH)_$(MODULE_COMPILER))
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   162
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   163
# Flags for specific binary types
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   164
LIB_CPPFLAGS 		= -D_REENTRANT
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   165
LIB_CFLAGS 		= $(CFLAGS) $(ARCH_LIB_FLAGS)
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: 684
diff changeset
   166
LIB_CXXFLAGS 		= $(CXXFLAGS) $(ARCH_LIB_FLAGS)
1095
f3ae5df34b0b 7030089 X fd_sets use too many fd's in 64-bit mode
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1076
diff changeset
   167
PROG_CPPFLAGS		= -DFD_SETSIZE=$(FD_SETSIZE)
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   168
PROG_CFLAGS		= $(CFLAGS)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   169
PROG_CXXFLAGS		= $(CXXFLAGS)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   170
1095
f3ae5df34b0b 7030089 X fd_sets use too many fd's in 64-bit mode
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1076
diff changeset
   171
# Default FD_SETSIZE - 1024 was the 32-bit default and was big enough
f3ae5df34b0b 7030089 X fd_sets use too many fd's in 64-bit mode
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1076
diff changeset
   172
# <sys/select.h> makes the 64-bit default be 65536 which is way too big,
f3ae5df34b0b 7030089 X fd_sets use too many fd's in 64-bit mode
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1076
diff changeset
   173
# and eats a lot of memory for fd_sets and cpu doing operations on them
f3ae5df34b0b 7030089 X fd_sets use too many fd's in 64-bit mode
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1076
diff changeset
   174
FD_SETSIZE_DEFAULT	= $(FD_SETSIZE_SET:yes=$(POUND_SIGN))
f3ae5df34b0b 7030089 X fd_sets use too many fd's in 64-bit mode
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1076
diff changeset
   175
$(FD_SETSIZE_DEFAULT)	FD_SETSIZE = 1024
f3ae5df34b0b 7030089 X fd_sets use too many fd's in 64-bit mode
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1076
diff changeset
   176
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   177
### Linker flags
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   178
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   179
# Linker mapfiles to link with for better performance & security
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   180
# SPARC architecture requires PLT section in .data be executable, so
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   181
# we can only make .bss, not all of .data no-exec on SPARC
1076
d5ec2442657d 6988508 Restore noexbss & bssalign mapfiles to X builds after fix for 6988300
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1073
diff changeset
   182
MAPFILE_NOEXBSS		= -M /usr/lib/ld/map.noexbss
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   183
MAPFILE_NOEXDATA_sparc	= $(MAPFILE_NOEXBSS)
1013
da85f64a241e 6988507 X commands have invalid symbol table entries; xterm cannot start
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1003
diff changeset
   184
MAPFILE_NOEXDATA_i386	= -M /usr/lib/ld/map.noexdata
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   185
MAPFILE_NOEXDATA	= $(MAPFILE_NOEXDATA_$(MACH))
1013
da85f64a241e 6988507 X commands have invalid symbol table entries; xterm cannot start
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1003
diff changeset
   186
MAPFILE_NOEXSTACK	= -M /usr/lib/ld/map.noexstk
da85f64a241e 6988507 X commands have invalid symbol table entries; xterm cannot start
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1003
diff changeset
   187
MAPFILE_PAGEALIGN	= -M /usr/lib/ld/map.pagealign
1076
d5ec2442657d 6988508 Restore noexbss & bssalign mapfiles to X builds after fix for 6988300
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1073
diff changeset
   188
MAPFILE_HEAPALIGN	= -M /usr/lib/ld/map.bssalign
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   189
1013
da85f64a241e 6988507 X commands have invalid symbol table entries; xterm cannot start
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1003
diff changeset
   190
MAPFILES_FOR_ALL   = $(MAPFILE_PAGEALIGN) $(MAPFILE_NOEXDATA)
da85f64a241e 6988507 X commands have invalid symbol table entries; xterm cannot start
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1003
diff changeset
   191
MAPFILES_FOR_PROGS = $(MAPFILE_HEAPALIGN) $(MAPFILE_NOEXSTACK) \
da85f64a241e 6988507 X commands have invalid symbol table entries; xterm cannot start
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1003
diff changeset
   192
			$(MAPFILE_NOEXBSS)
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   193
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   194
# Common flags for all binaries
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   195
LDFLAGS_common 		= -z combreloc -z lazyload $(MAPFILES_FOR_ALL)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   196
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   197
# LIB_REQUIRED_LDFLAGS are forced on via LD_OPTIONS to override libtool when
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   198
# building libraries.
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   199
LIB_REQUIRED_LDFLAGS	= -z text -z defs
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   200
LIB_LDFLAGS_common	= $(LDFLAGS_common) $(LIB_REQUIRED_LDFLAGS)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   201
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   202
# Flags for programs
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   203
PROG_LDFLAGS_common	= $(LDFLAGS_common) $(MAPFILES_FOR_PROGS) -B direct
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   204
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   205
# Sun Studio recognizes the common linker flags without -Wl, and 
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   206
# Sun Studio CC can't handle -Wl,-flag,option format, so just pass directly
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   207
LDFLAGS_suncc		= $(LDFLAGS_common)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   208
LIB_LDFLAGS_suncc	= $(LIB_LDFLAGS_common)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   209
PROG_LDFLAGS_suncc	= $(PROG_LDFLAGS_common)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   210
965
c096efd79ce7 6962789 Fix a number of library runpath and unneededed linking issues in X gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 963
diff changeset
   211
# gcc requires additional library path for libgcc_s.so
c096efd79ce7 6962789 Fix a number of library runpath and unneededed linking issues in X gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 963
diff changeset
   212
DEFAULT_LDFLAGS_gcc = -L/usr/sfw/lib$(ARCHLIBSUBDIR) \
c096efd79ce7 6962789 Fix a number of library runpath and unneededed linking issues in X gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 963
diff changeset
   213
		      -R/usr/sfw/lib$(ARCHLIBSUBDIR)
c096efd79ce7 6962789 Fix a number of library runpath and unneededed linking issues in X gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 963
diff changeset
   214
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   215
# Need to use -Wl,.. to pass linker flags through gcc
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   216
GCC_CONVERT_LDFLAGS_CMD=sed -e 's/-M /-Wl,-M,/g' -e 's/-B /-Wl,-B,/g'
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   217
GCC_LDFLAGS_CMD=echo $(LDFLAGS_common) | $(GCC_CONVERT_LDFLAGS_CMD)
965
c096efd79ce7 6962789 Fix a number of library runpath and unneededed linking issues in X gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 963
diff changeset
   218
LDFLAGS_gcc=$(GCC_LDFLAGS_CMD:sh) $(DEFAULT_LDFLAGS_gcc)
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   219
GCC_LIB_LDFLAGS_CMD=echo $(LIB_LDFLAGS_common) | $(GCC_CONVERT_LDFLAGS_CMD)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   220
LIB_LDFLAGS_gcc=$(GCC_LIB_LDFLAGS_CMD:sh)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   221
GCC_PROG_LDFLAGS_CMD=echo $(PROG_LDFLAGS_common) | $(GCC_CONVERT_LDFLAGS_CMD)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   222
PROG_LDFLAGS_gcc=$(GCC_PROG_LDFLAGS_CMD:sh)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   223
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   224
LDFLAGS=$(LDFLAGS_$(MODULE_COMPILER))
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   225
LIB_LDFLAGS=$(LIB_LDFLAGS_$(MODULE_COMPILER))
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   226
PROG_LDFLAGS=$(PROG_LDFLAGS_$(MODULE_COMPILER))
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   227
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   228
## Commonly added options
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   229
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   230
# Link with X server private libraries like libXfont & libfontenc
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   231
X11_SERVERLIBS_LDFLAGS= -L$(PROTODIR)$(X11_SERVERLIBS_DIR)$(ARCHLIBSUBDIR) \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   232
			-R$(X11_SERVERLIBS_DIR)$(ARCHLIBSUBDIR)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   233
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   234
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   235
### Directory paths
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   236
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   237
# Proto directory to install into for packaging
970
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   238
PROTOTOP=$(TOP)/proto
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   239
PROTODIR=$(PROTOTOP)/root_$(MACH)
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   240
PROTOMETA=$(PROTOTOP)/metadata_$(MACH)
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   241
980
c30d0dbf2c96 6939384 X delivered SMF manifests should be relocated to /lib/svc/manifest
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 970
diff changeset
   242
SMF_MANIFEST_DIR=/lib/svc/manifest
c30d0dbf2c96 6939384 X delivered SMF manifests should be relocated to /lib/svc/manifest
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 970
diff changeset
   243
SMF_METHOD_DIR=/lib/svc/method
c30d0dbf2c96 6939384 X delivered SMF manifests should be relocated to /lib/svc/manifest
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 970
diff changeset
   244
851
d428083dbbdd 6905171 X11R7.5 / Xorg 1.7.3 integration
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 837
diff changeset
   245
X11_DIR=/usr
d428083dbbdd 6905171 X11R7.5 / Xorg 1.7.3 integration
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 837
diff changeset
   246
X11_BIN_DIR=$(X11_DIR)/bin
d428083dbbdd 6905171 X11R7.5 / Xorg 1.7.3 integration
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 837
diff changeset
   247
X11_LIB_DIR=$(X11_DIR)/lib
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   248
X11_INCLUDES_DIR=$(X11_DIR)/include
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: 684
diff changeset
   249
XORG_SDK_INCLUDES_DIR=$(X11_INCLUDES_DIR)/xorg
851
d428083dbbdd 6905171 X11R7.5 / Xorg 1.7.3 integration
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 837
diff changeset
   250
X11_X11LIB_DIR=$(X11_LIB_DIR)/X11
837
ee480af8e87c 6896574 Font repackaging and upgrade to X11R7.5 fonts
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 810
diff changeset
   251
SHARE_FONT_DIR=/usr/share/fonts
ee480af8e87c 6896574 Font repackaging and upgrade to X11R7.5 fonts
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 810
diff changeset
   252
X11_FONT_DIR=$(SHARE_FONT_DIR)/X11
963
7a4fced80e83 6962316 X proto area should more closely match packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 935
diff changeset
   253
X11_FONT_CATALOGUE=/etc/X11/fontpath.d
837
ee480af8e87c 6896574 Font repackaging and upgrade to X11R7.5 fonts
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 810
diff changeset
   254
TRUETYPE_FONT_DIR=$(SHARE_FONT_DIR)/TrueType
851
d428083dbbdd 6905171 X11R7.5 / Xorg 1.7.3 integration
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 837
diff changeset
   255
X11_DOC_DIR=/usr/share/doc/X11
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   256
X11_LOCALE_DIR=$(X11_DIR)/share/locale
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   257
X11_MAN_DIR=$(X11_DIR)/share/man
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   258
X11_ACLOCAL_DIR=$(X11_DIR)/share/aclocal
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   259
X11_LC_MESSAGES_DIR=$(X11_LOCALE_DIR)/C/LC_MESSAGES
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   260
851
d428083dbbdd 6905171 X11R7.5 / Xorg 1.7.3 integration
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 837
diff changeset
   261
# Subdirectory of /usr/lib for X server private libraries
d428083dbbdd 6905171 X11R7.5 / Xorg 1.7.3 integration
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 837
diff changeset
   262
X11_SERVERLIBS_SUBDIR=/xorg
d428083dbbdd 6905171 X11R7.5 / Xorg 1.7.3 integration
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 837
diff changeset
   263
X11_SERVERLIBS_DIR=$(X11_LIB_DIR)$(X11_SERVERLIBS_SUBDIR)
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   264
851
d428083dbbdd 6905171 X11R7.5 / Xorg 1.7.3 integration
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 837
diff changeset
   265
# Subdirectory of /usr/lib for X server loadable modules
d428083dbbdd 6905171 X11R7.5 / Xorg 1.7.3 integration
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 837
diff changeset
   266
X11_SERVERMODS_SUBDIR=/xorg/modules
d428083dbbdd 6905171 X11R7.5 / Xorg 1.7.3 integration
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 837
diff changeset
   267
X11_SERVERMODS_DIR=$(X11_LIB_DIR)$(X11_SERVERMODS_SUBDIR)
970
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   268
MESA_XSERVERMODS_DIR=$(X11_LIB_DIR)/mesa/modules
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   269
606
068c11b419c9 6582489 X11R7.4: Xorg server 1.5.3, Mesa 7.2, and associated driver updates
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 561
diff changeset
   270
# PKGCONFIG_DIR is constructed of _prefix + ARCHLIBSUBDIR + _suffix
068c11b419c9 6582489 X11R7.4: Xorg server 1.5.3, Mesa 7.2, and associated driver updates
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 561
diff changeset
   271
PKGCONFIG_DIR_prefix=/usr/lib
068c11b419c9 6582489 X11R7.4: Xorg server 1.5.3, Mesa 7.2, and associated driver updates
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 561
diff changeset
   272
PKGCONFIG_DIR_suffix=/pkgconfig
068c11b419c9 6582489 X11R7.4: Xorg server 1.5.3, Mesa 7.2, and associated driver updates
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 561
diff changeset
   273
PKGCONFIG_DIR=$(PKGCONFIG_DIR_prefix)$(ARCHLIBSUBDIR)$(PKGCONFIG_DIR_suffix)
068c11b419c9 6582489 X11R7.4: Xorg server 1.5.3, Mesa 7.2, and associated driver updates
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 561
diff changeset
   274
PKGCONFIG_DIR_32=$(PKGCONFIG_DIR_prefix)$(PKGCONFIG_DIR_suffix)
068c11b419c9 6582489 X11R7.4: Xorg server 1.5.3, Mesa 7.2, and associated driver updates
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 561
diff changeset
   275
PKGCONFIG_DIR_64=$(PKGCONFIG_DIR_prefix)/$(SUBDIR64)$(PKGCONFIG_DIR_suffix)
851
d428083dbbdd 6905171 X11R7.5 / Xorg 1.7.3 integration
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 837
diff changeset
   276
PKGCONFIG_DIR_SHARE=/usr/share$(PKGCONFIG_DIR_suffix)
606
068c11b419c9 6582489 X11R7.4: Xorg server 1.5.3, Mesa 7.2, and associated driver updates
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 561
diff changeset
   277
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   278
# Directory used for installing tools used during build but not
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   279
# delivered in packages
970
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   280
TOOLS_DIR=$(PROTOTOP)/tools_$(MACH)
963
7a4fced80e83 6962316 X proto area should more closely match packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 935
diff changeset
   281
TOOLS_ACLOCAL_DIR=$(TOOLS_DIR)/share/aclocal
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   282
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   283
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   284
### Other tools needed to build
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   285
1132
d9f96853a754 7047456 X could do better at building & packaging python bits
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1097
diff changeset
   286
## Python tools & paths
d9f96853a754 7047456 X could do better at building & packaging python bits
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1097
diff changeset
   287
# When changing PYTHON_VERSION, check that PYTHON_PKG_VERSION & 
d9f96853a754 7047456 X could do better at building & packaging python bits
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1097
diff changeset
   288
# PYTHON_PATH_VERSION are still set correctly in pkg/Makefile
d9f96853a754 7047456 X could do better at building & packaging python bits
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1097
diff changeset
   289
PYTHON_VERSION=2.6
d9f96853a754 7047456 X could do better at building & packaging python bits
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1097
diff changeset
   290
PYTHON=/usr/bin/python$(PYTHON_VERSION)
d9f96853a754 7047456 X could do better at building & packaging python bits
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1097
diff changeset
   291
PYTHON_PATH=$(PROTODIR)/usr/lib/python$(PYTHON_VERSION)/vendor-packages:$(PROTODIR)/usr/lib/python$(PYTHON_VERSION)/site-packages:/usr/lib/python$(PYTHON_VERSION)/vendor-packages:/usr/lib/python$(PYTHON_VERSION)/site-packages
d9f96853a754 7047456 X could do better at building & packaging python bits
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1097
diff changeset
   292
1147
54bcc6a673bf 7054723 X consolidation should move to perl 5.12
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1132
diff changeset
   293
## Perl tools & paths
54bcc6a673bf 7054723 X consolidation should move to perl 5.12
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1132
diff changeset
   294
# When changing PERL_VERSION, check that PERL_PKG_VERSION is
54bcc6a673bf 7054723 X consolidation should move to perl 5.12
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1132
diff changeset
   295
# still set correctly in pkg/Makefile
54bcc6a673bf 7054723 X consolidation should move to perl 5.12
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1132
diff changeset
   296
PERL_VERSION = 5.12
54bcc6a673bf 7054723 X consolidation should move to perl 5.12
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1132
diff changeset
   297
PERL = /usr/perl5/$(PERL_VERSION)/bin/perl
54bcc6a673bf 7054723 X consolidation should move to perl 5.12
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1132
diff changeset
   298
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   299
# Script used to install files in proto area
967
efbd0ee6805d 6963229 build race conditions and other makefile issues
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 965
diff changeset
   300
INSTALL_SCRIPT=$(TOP)/open-src/common/install-sh -c
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   301
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   302
# Some modules (such as FreeType 2) require GNU make
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   303
GNUMAKE = gmake
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   304
970
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   305
# Directory to find tools used during build, even when installing to a
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   306
# temporary dest dir, such as during 'make manifest'
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   307
PROTOTOOLSDIR=$(PROTODIR)
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   308
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   309
# Some modules use lndir to merge in sources from Sun specific directories
970
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   310
LNDIR=$(PROTOTOOLSDIR)$(X11_BIN_DIR)/lndir
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   311
557
3e9830015f69 6748087 move Xprt to open-src and /usr/X11 [fix install of Xprt fonts]
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 507
diff changeset
   312
# Commands to run font utilities from proto area
970
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   313
MKFONTDIR=$(PROTOTOOLSDIR)$(X11_BIN_DIR)/mkfontdir
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   314
MKFONTSCALE=$(PROTOTOOLSDIR)$(X11_BIN_DIR)/mkfontscale
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   315
INSTALLALIAS=$(PROTOTOOLSDIR)$(X11_X11LIB_DIR)/installalias
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   316
FC_QUERY=$(PROTOTOOLSDIR)$(X11_BIN_DIR)/fc-query
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   317
FC_SCAN=$(PROTOTOOLSDIR)$(X11_BIN_DIR)/fc-scan
557
3e9830015f69 6748087 move Xprt to open-src and /usr/X11 [fix install of Xprt fonts]
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 507
diff changeset
   318
837
ee480af8e87c 6896574 Font repackaging and upgrade to X11R7.5 fonts
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 810
diff changeset
   319
# Script fragment to start echoing commands in shell sequences in make rules
ee480af8e87c 6896574 Font repackaging and upgrade to X11R7.5 fonts
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 810
diff changeset
   320
# Sets PS4 to "" so output isn't prepended with "+ " and looks like normal
ee480af8e87c 6896574 Font repackaging and upgrade to X11R7.5 fonts
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 810
diff changeset
   321
# make output
ee480af8e87c 6896574 Font repackaging and upgrade to X11R7.5 fonts
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 810
diff changeset
   322
START_CMD_ECHO = PS4="" ; set -x
ee480af8e87c 6896574 Font repackaging and upgrade to X11R7.5 fonts
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 810
diff changeset
   323
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   324
### Sources, in-tree and upstream
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   325
967
efbd0ee6805d 6963229 build race conditions and other makefile issues
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 965
diff changeset
   326
TARBALLDIR=$(TOP)/open-src/tarballs
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   327
WGET=/usr/sfw/bin/wget --no-check-certificate
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   328
GIT=git
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   329
1003
a4d17d6bc179 6980773 X gate needs branding options
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 980
diff changeset
   330
# If you need to use a closer mirror for X.Org or SourceForge, override
a4d17d6bc179 6980773 X gate needs branding options
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 980
diff changeset
   331
# these in your Makefile.options file
a4d17d6bc179 6980773 X gate needs branding options
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 980
diff changeset
   332
XRU_DEFAULT	= $(XORG_RELEASES_URL_SET:yes=$(POUND_SIGN))
1042
d0172f4fafac 7001277 Update SourceForge & X.Org URLs for source downloads
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1013
diff changeset
   333
$(XRU_DEFAULT)	XORG_RELEASES_URL=http://www.x.org/releases/individual
1003
a4d17d6bc179 6980773 X gate needs branding options
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 980
diff changeset
   334
SFU_DEFAULT	= $(SF_DOWNLOADS_URL_SET:yes=$(POUND_SIGN))
1042
d0172f4fafac 7001277 Update SourceForge & X.Org URLs for source downloads
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1013
diff changeset
   335
$(SFU_DEFAULT)	SF_DOWNLOADS_URL=http://downloads.sourceforge.net/project
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   336
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   337
# Git repositories hosted on freedesktop.org (X.Org, Mesa, pixman, etc.)
1003
a4d17d6bc179 6980773 X gate needs branding options
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 980
diff changeset
   338
FDO_GIT_DEFAULT		= $(FDO_GIT_URL_SET:yes=$(POUND_SIGN))
a4d17d6bc179 6980773 X gate needs branding options
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 980
diff changeset
   339
$(FDO_GIT_DEFAULT)	FDO_GIT_URL=http://anongit.freedesktop.org/git
a4d17d6bc179 6980773 X gate needs branding options
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 980
diff changeset
   340
XORG_GIT_DEFAULT	= $(XORG_GIT_URL_SET:yes=$(POUND_SIGN))
a4d17d6bc179 6980773 X gate needs branding options
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 980
diff changeset
   341
$(XORG_GIT_DEFAULT)	XORG_GIT_URL=$(FDO_GIT_URL)/xorg
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   342
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   343
# Target created when sources are unpacked
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   344
UNPACK_FILE = .unpack_done
1003
a4d17d6bc179 6980773 X gate needs branding options
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 980
diff changeset
   345
UNPACK_TARGET = $(SOURCE_DIR)/$(UNPACK_FILE)
963
7a4fced80e83 6962316 X proto area should more closely match packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 935
diff changeset
   346
7a4fced80e83 6962316 X proto area should more closely match packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 935
diff changeset
   347
### Misc rules
7a4fced80e83 6962316 X proto area should more closely match packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 935
diff changeset
   348
7a4fced80e83 6962316 X proto area should more closely match packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 935
diff changeset
   349
# For use in debugging or calling from scripts like the code review helper
7a4fced80e83 6962316 X proto area should more closely match packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 935
diff changeset
   350
# Use such as: make print_make_vars VARS="MODTYPE MODULE_NAME"
7a4fced80e83 6962316 X proto area should more closely match packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 935
diff changeset
   351
# or: make print_make_vars BUILD_TYPE=32 VARS=SOURCE_DIR
7a4fced80e83 6962316 X proto area should more closely match packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 935
diff changeset
   352
print_make_var-%:
7a4fced80e83 6962316 X proto area should more closely match packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 935
diff changeset
   353
	@print -n ' $(@:print_make_var-%=%)="$($(@:print_make_var-%=%))"'
7a4fced80e83 6962316 X proto area should more closely match packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 935
diff changeset
   354
7a4fced80e83 6962316 X proto area should more closely match packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 935
diff changeset
   355
print_make_vars: $(VARS:%=print_make_var-%)
7a4fced80e83 6962316 X proto area should more closely match packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 935
diff changeset
   356
	@print '\n'