open-src/common/Makefile.init
author Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
Sat, 20 Nov 2010 17:51:15 -0800
changeset 1042 d0172f4fafac
parent 1013 da85f64a241e
child 1056 7ab8c847a602
permissions -rw-r--r--
7001277 Update SourceForge & X.Org URLs for source downloads
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
#
935
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
     4
# Copyright (c) 2008, 2010, 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
666
196a1b963ffb 6815700 X consolidation should be built with -xspace to reduce binary sizes
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 625
diff changeset
    98
OPT_FLAGS_suncc		= -xO4 -xbuiltin=%none -xlibmil -xprefetch \
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
a511d9068b59 6854482 Xorg 1.6 doesn't try vesa by default
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 705
diff changeset
   118
ARCH32_FLAGS_i386_suncc 	= -m32 -xtarget=pentium -D__i386__
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
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   122
ARCH_LIB_FLAGS_sparc_suncc 	= -xregs=no%appl
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   123
ARCH_LIB_FLAGS_i386_suncc 	=  
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   124
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   125
## GNU Compilers
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   126
GCC				= /usr/sfw/bin/gcc
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   127
GXX				= /usr/sfw/bin/g++
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   128
CC_gcc				= $(GCC)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   129
CXX_gcc				= $(GXX)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   130
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
   131
DEBUG_FLAGS_gcc			= $(DEBUG_FLAGS_common)
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   132
$(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
   133
$(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
   134
WARNFLAGS_gcc			= -Wall -Wno-unknown-pragmas
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   135
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
   136
				  -fno-omit-frame-pointer $(WARNFLAGS_gcc)
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   137
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
   138
				  -fno-omit-frame-pointer $(WARNFLAGS_gcc)
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   139
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   140
ARCH32_FLAGS_sparc_gcc	 	= -mcpu=ultrasparc -m32
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   141
ARCH64_FLAGS_sparc_gcc 		= -mcpu=ultrasparc -m64
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   142
ARCH32_FLAGS_i386_gcc 		= -march=i686 -m32
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   143
ARCH64_FLAGS_i386_gcc 		= -march=opteron -m64
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   144
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   145
# 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
   146
ARCH_LIB_FLAGS_sparc_gcc 	= -mno-app-regs
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   147
ARCH_LIB_FLAGS_i386_gcc 	= 
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   148
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   149
## Set common variables based on above rules
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   150
CC			= $(CC_$(MODULE_COMPILER))
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   151
CXX			= $(CXX_$(MODULE_COMPILER))
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   152
CFLAGS			= $(CFLAGS_$(MODULE_COMPILER)) $(ARCH_FLAGS)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   153
CXXFLAGS		= $(CXXFLAGS_$(MODULE_COMPILER)) $(ARCH_FLAGS)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   154
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
   155
ARCH32_FLAGS	       += $(ARCH_FLAGS_$(MACH)_$(MODULE_COMPILER))
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   156
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
   157
ARCH64_FLAGS	       += $(ARCH_FLAGS_$(MACH)_$(MODULE_COMPILER))
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   158
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
   159
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   160
# Flags for specific binary types
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   161
LIB_CPPFLAGS 		= -D_REENTRANT
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   162
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
   163
LIB_CXXFLAGS 		= $(CXXFLAGS) $(ARCH_LIB_FLAGS)
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   164
PROG_CFLAGS		= $(CFLAGS)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   165
PROG_CXXFLAGS		= $(CXXFLAGS)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   166
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   167
### Linker flags
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   168
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   169
# 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
   170
# 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
   171
# we can only make .bss, not all of .data no-exec on SPARC
1013
da85f64a241e 6988507 X commands have invalid symbol table entries; xterm cannot start
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1003
diff changeset
   172
#
da85f64a241e 6988507 X commands have invalid symbol table entries; xterm cannot start
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1003
diff changeset
   173
# The mapfiles that cause extra .bss sections to be generated have
da85f64a241e 6988507 X commands have invalid symbol table entries; xterm cannot start
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1003
diff changeset
   174
# been temporarily disabled due to linker bug 6988300 - see bug 6988507.
da85f64a241e 6988507 X commands have invalid symbol table entries; xterm cannot start
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1003
diff changeset
   175
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
   176
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
   177
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
   178
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
   179
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
   180
MAPFILE_PAGEALIGN	= -M /usr/lib/ld/map.pagealign
da85f64a241e 6988507 X commands have invalid symbol table entries; xterm cannot start
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1003
diff changeset
   181
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
   182
1013
da85f64a241e 6988507 X commands have invalid symbol table entries; xterm cannot start
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1003
diff changeset
   183
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
   184
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
   185
			$(MAPFILE_NOEXBSS)
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   186
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   187
# Common flags for all binaries
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   188
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
   189
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   190
# 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
   191
# building libraries.
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   192
LIB_REQUIRED_LDFLAGS	= -z text -z defs
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   193
LIB_LDFLAGS_common	= $(LDFLAGS_common) $(LIB_REQUIRED_LDFLAGS)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   194
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   195
# Flags for programs
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   196
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
   197
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   198
# 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
   199
# 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
   200
LDFLAGS_suncc		= $(LDFLAGS_common)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   201
LIB_LDFLAGS_suncc	= $(LIB_LDFLAGS_common)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   202
PROG_LDFLAGS_suncc	= $(PROG_LDFLAGS_common)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   203
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
   204
# 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
   205
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
   206
		      -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
   207
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   208
# 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
   209
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
   210
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
   211
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
   212
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
   213
LIB_LDFLAGS_gcc=$(GCC_LIB_LDFLAGS_CMD:sh)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   214
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
   215
PROG_LDFLAGS_gcc=$(GCC_PROG_LDFLAGS_CMD:sh)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   216
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   217
LDFLAGS=$(LDFLAGS_$(MODULE_COMPILER))
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   218
LIB_LDFLAGS=$(LIB_LDFLAGS_$(MODULE_COMPILER))
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   219
PROG_LDFLAGS=$(PROG_LDFLAGS_$(MODULE_COMPILER))
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   220
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   221
## Commonly added options
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   222
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   223
# 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
   224
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
   225
			-R$(X11_SERVERLIBS_DIR)$(ARCHLIBSUBDIR)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   226
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
### Directory paths
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
# 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
   231
PROTOTOP=$(TOP)/proto
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   232
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
   233
PROTOMETA=$(PROTOTOP)/metadata_$(MACH)
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   234
980
c30d0dbf2c96 6939384 X delivered SMF manifests should be relocated to /lib/svc/manifest
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 970
diff changeset
   235
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
   236
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
   237
851
d428083dbbdd 6905171 X11R7.5 / Xorg 1.7.3 integration
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 837
diff changeset
   238
X11_DIR=/usr
d428083dbbdd 6905171 X11R7.5 / Xorg 1.7.3 integration
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 837
diff changeset
   239
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
   240
X11_LIB_DIR=$(X11_DIR)/lib
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   241
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
   242
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
   243
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
   244
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
   245
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
   246
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
   247
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
   248
X11_DOC_DIR=/usr/share/doc/X11
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   249
X11_LOCALE_DIR=$(X11_DIR)/share/locale
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   250
X11_MAN_DIR=$(X11_DIR)/share/man
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   251
X11_ACLOCAL_DIR=$(X11_DIR)/share/aclocal
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   252
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
   253
851
d428083dbbdd 6905171 X11R7.5 / Xorg 1.7.3 integration
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 837
diff changeset
   254
# 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
   255
X11_SERVERLIBS_SUBDIR=/xorg
d428083dbbdd 6905171 X11R7.5 / Xorg 1.7.3 integration
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 837
diff changeset
   256
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
   257
851
d428083dbbdd 6905171 X11R7.5 / Xorg 1.7.3 integration
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 837
diff changeset
   258
# 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
   259
X11_SERVERMODS_SUBDIR=/xorg/modules
d428083dbbdd 6905171 X11R7.5 / Xorg 1.7.3 integration
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 837
diff changeset
   260
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
   261
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
   262
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   263
SERVERMOD_subdir_sparc=
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   264
SERVERMOD_subdir_i386=$(ARCHLIBSUBDIR)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   265
SERVERMOD_subdir=$(SERVERMOD_subdir_$(MACH))
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   266
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
   267
# 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
   268
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
   269
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
   270
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
   271
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
   272
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
   273
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
   274
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   275
# 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
   276
# 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
   277
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
   278
TOOLS_ACLOCAL_DIR=$(TOOLS_DIR)/share/aclocal
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   279
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   280
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   281
### Other tools needed to build
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
# 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
   284
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
   285
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   286
# 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
   287
GNUMAKE = gmake
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   288
970
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   289
# 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
   290
# 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
   291
PROTOTOOLSDIR=$(PROTODIR)
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   292
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   293
# 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
   294
LNDIR=$(PROTOTOOLSDIR)$(X11_BIN_DIR)/lndir
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   295
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   296
# Tools needed to build docbook documentation
963
7a4fced80e83 6962316 X proto area should more closely match packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 935
diff changeset
   297
DOCBOOKUTIL_BINDIR=$(TOOLS_DIR)/bin
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   298
DOCBOOK2HTML=$(DOCBOOKUTIL_BINDIR)/docbook2html
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   299
DOCBOOK2TXT=$(DOCBOOKUTIL_BINDIR)/docbook2txt
970
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   300
XORG_DEFS_ENT=$(PROTOTOOLSDIR)/$(X11_DIR)/share/sgml/X11/defs.ent
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   301
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
   302
# 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
   303
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
   304
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
   305
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
   306
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
   307
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
   308
837
ee480af8e87c 6896574 Font repackaging and upgrade to X11R7.5 fonts
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 810
diff changeset
   309
# 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
   310
# 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
   311
# make output
ee480af8e87c 6896574 Font repackaging and upgrade to X11R7.5 fonts
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 810
diff changeset
   312
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
   313
935
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   314
# Other tools used during build
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   315
PERL = /usr/perl5/bin/perl
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   316
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   317
### Sources, in-tree and upstream
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   318
967
efbd0ee6805d 6963229 build race conditions and other makefile issues
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 965
diff changeset
   319
TARBALLDIR=$(TOP)/open-src/tarballs
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   320
WGET=/usr/sfw/bin/wget --no-check-certificate
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   321
GIT=git
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   322
1003
a4d17d6bc179 6980773 X gate needs branding options
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 980
diff changeset
   323
# 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
   324
# these in your Makefile.options file
a4d17d6bc179 6980773 X gate needs branding options
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 980
diff changeset
   325
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
   326
$(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
   327
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
   328
$(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
   329
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   330
# 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
   331
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
   332
$(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
   333
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
   334
$(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
   335
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   336
# Target created when sources are unpacked
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   337
UNPACK_FILE = .unpack_done
1003
a4d17d6bc179 6980773 X gate needs branding options
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 980
diff changeset
   338
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
   339
7a4fced80e83 6962316 X proto area should more closely match packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 935
diff changeset
   340
### Misc rules
7a4fced80e83 6962316 X proto area should more closely match packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 935
diff changeset
   341
7a4fced80e83 6962316 X proto area should more closely match packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 935
diff changeset
   342
# 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
   343
# 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
   344
# 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
   345
print_make_var-%:
7a4fced80e83 6962316 X proto area should more closely match packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 935
diff changeset
   346
	@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
   347
7a4fced80e83 6962316 X proto area should more closely match packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 935
diff changeset
   348
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
   349
	@print '\n'