open-src/common/Makefile.init
author Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
Mon, 21 Jun 2010 10:51:30 -0700
changeset 965 c096efd79ce7
parent 963 7a4fced80e83
child 967 efbd0ee6805d
permissions -rw-r--r--
6962789 Fix a number of library runpath and unneededed linking issues in X gate
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
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    48
###  Machine architecture macros
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    49
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    50
# 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
    51
MACH=$(TARGET_ARCH:-%=%)
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    52
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    53
# ARCH will be either "sun4" or "i386" - mainly used in $(PROTODIR)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    54
ARCH=$(MACH:sparc=sun4)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    55
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    56
MACH32_sparc	= sparc
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    57
MACH64_sparc 	= sparcv9
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    58
MACH32_i386	= i386
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    59
MACH64_i386 	= amd64
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    60
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    61
MACH32= $(MACH32_$(MACH))
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    62
MACH64= $(MACH64_$(MACH))
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    63
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    64
# Architecture subdirectories
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    65
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    66
SUBDIR32_sparc	= sparcv8
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    67
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
    68
SUBDIR32_i386	= i86
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    69
SUBDIR64_i386 	= amd64
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    70
922
db66e53f0c94 6933880 Simplify building the same X workspace on sparc & x86
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 919
diff changeset
    71
SUBDIR32	= $(SUBDIR32_$(MACH))
db66e53f0c94 6933880 Simplify building the same X workspace on sparc & x86
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 919
diff changeset
    72
SUBDIR64	= $(SUBDIR64_$(MACH))
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    73
922
db66e53f0c94 6933880 Simplify building the same X workspace on sparc & x86
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 919
diff changeset
    74
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
    75
LIBSUBDIR_32	= # None
db66e53f0c94 6933880 Simplify building the same X workspace on sparc & x86
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 919
diff changeset
    76
LIBSUBDIR_64	= /$(SUBDIR64)
db66e53f0c94 6933880 Simplify building the same X workspace on sparc & x86
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 919
diff changeset
    77
ARCHLIBSUBDIR	= $(LIBSUBDIR)
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    78
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    79
### Default compiler & options
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    80
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    81
# 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
    82
# 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
    83
# 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
    84
DEFAULT_COMPILER		= suncc
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    85
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
    86
# 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
    87
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
    88
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    89
## Sun Studio
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    90
CC_suncc		= cc
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    91
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
    92
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
    93
			  -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
    94
DEBUG_FLAGS_suncc	= $(DEBUG_FLAGS_common)
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    95
$(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
    96
$(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
    97
802
159b5b227862 6865400 X consolidation does not build with Studio 12 Update 1 compilers
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 737
diff changeset
    98
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
    99
			  -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
   100
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
   101
			  -features=extensions
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   102
737
a511d9068b59 6854482 Xorg 1.6 doesn't try vesa by default
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 705
diff changeset
   103
# -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
   104
# 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
   105
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
   106
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
   107
ARCH64_FLAGS_sparc_suncc	= -m64
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   108
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   109
# -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
   110
# 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
   111
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
   112
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
   113
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
   114
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   115
# 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
   116
ARCH_LIB_FLAGS_sparc_suncc 	= -xregs=no%appl
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   117
ARCH_LIB_FLAGS_i386_suncc 	=  
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   118
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   119
## GNU Compilers
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   120
GCC				= /usr/sfw/bin/gcc
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   121
GXX				= /usr/sfw/bin/g++
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   122
CC_gcc				= $(GCC)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   123
CXX_gcc				= $(GXX)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   124
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
   125
DEBUG_FLAGS_gcc			= $(DEBUG_FLAGS_common)
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   126
$(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
   127
$(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
   128
WARNFLAGS_gcc			= -Wall -Wno-unknown-pragmas
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   129
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
   130
				  -fno-omit-frame-pointer $(WARNFLAGS_gcc)
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   131
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
   132
				  -fno-omit-frame-pointer $(WARNFLAGS_gcc)
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   133
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   134
ARCH32_FLAGS_sparc_gcc	 	= -mcpu=ultrasparc -m32
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   135
ARCH64_FLAGS_sparc_gcc 		= -mcpu=ultrasparc -m64
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   136
ARCH32_FLAGS_i386_gcc 		= -march=i686 -m32
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   137
ARCH64_FLAGS_i386_gcc 		= -march=opteron -m64
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   138
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   139
# 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
   140
ARCH_LIB_FLAGS_sparc_gcc 	= -mno-app-regs
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   141
ARCH_LIB_FLAGS_i386_gcc 	= 
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
## Set common variables based on above rules
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   144
CC			= $(CC_$(MODULE_COMPILER))
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   145
CXX			= $(CXX_$(MODULE_COMPILER))
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   146
CFLAGS			= $(CFLAGS_$(MODULE_COMPILER)) $(ARCH_FLAGS)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   147
CXXFLAGS		= $(CXXFLAGS_$(MODULE_COMPILER)) $(ARCH_FLAGS)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   148
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
   149
ARCH32_FLAGS	       += $(ARCH_FLAGS_$(MACH)_$(MODULE_COMPILER))
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   150
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
   151
ARCH64_FLAGS	       += $(ARCH_FLAGS_$(MACH)_$(MODULE_COMPILER))
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   152
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
   153
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   154
# Flags for specific binary types
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   155
LIB_CPPFLAGS 		= -D_REENTRANT
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   156
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
   157
LIB_CXXFLAGS 		= $(CXXFLAGS) $(ARCH_LIB_FLAGS)
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   158
PROG_CFLAGS		= $(CFLAGS)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   159
PROG_CXXFLAGS		= $(CXXFLAGS)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   160
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   161
### Linker flags
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
# 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
   164
# 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
   165
# we can only make .bss, not all of .data no-exec on SPARC
869
1a9eb10831aa 6912805 X builds should use system map.noexbss instead of local copy
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 859
diff changeset
   166
MAPFILE_NOEXBSS		= /usr/lib/ld/map.noexbss
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   167
MAPFILE_NOEXDATA_sparc	= $(MAPFILE_NOEXBSS)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   168
MAPFILE_NOEXDATA_i386	= /usr/lib/ld/map.noexdata
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   169
MAPFILE_NOEXDATA	= $(MAPFILE_NOEXDATA_$(MACH))
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   170
MAPFILE_NOEXSTACK	= /usr/lib/ld/map.noexstk
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   171
MAPFILE_PAGEALIGN	= /usr/lib/ld/map.pagealign
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   172
MAPFILE_HEAPALIGN	= /usr/lib/ld/map.bssalign
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   173
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   174
MAPFILES_FOR_ALL   = -M $(MAPFILE_PAGEALIGN) -M $(MAPFILE_NOEXDATA)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   175
MAPFILES_FOR_PROGS = -M $(MAPFILE_HEAPALIGN) -M $(MAPFILE_NOEXSTACK) \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   176
			-M $(MAPFILE_NOEXBSS)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   177
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   178
# Common flags for all binaries
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   179
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
   180
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   181
# 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
   182
# building libraries.
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   183
LIB_REQUIRED_LDFLAGS	= -z text -z defs
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   184
LIB_LDFLAGS_common	= $(LDFLAGS_common) $(LIB_REQUIRED_LDFLAGS)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   185
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   186
# Flags for programs
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   187
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
   188
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   189
# 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
   190
# 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
   191
LDFLAGS_suncc		= $(LDFLAGS_common)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   192
LIB_LDFLAGS_suncc	= $(LIB_LDFLAGS_common)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   193
PROG_LDFLAGS_suncc	= $(PROG_LDFLAGS_common)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   194
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
   195
# 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
   196
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
   197
		      -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
   198
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   199
# 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
   200
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
   201
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
   202
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
   203
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
   204
LIB_LDFLAGS_gcc=$(GCC_LIB_LDFLAGS_CMD:sh)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   205
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
   206
PROG_LDFLAGS_gcc=$(GCC_PROG_LDFLAGS_CMD:sh)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   207
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   208
LDFLAGS=$(LDFLAGS_$(MODULE_COMPILER))
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   209
LIB_LDFLAGS=$(LIB_LDFLAGS_$(MODULE_COMPILER))
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   210
PROG_LDFLAGS=$(PROG_LDFLAGS_$(MODULE_COMPILER))
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   211
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   212
## Commonly added options
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   213
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   214
# 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
   215
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
   216
			-R$(X11_SERVERLIBS_DIR)$(ARCHLIBSUBDIR)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   217
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   218
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   219
### Directory paths
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
# Proto directory to install into for packaging
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   222
PROTODIR=$(TOP)/../proto-$(ARCH)-svr4
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   223
851
d428083dbbdd 6905171 X11R7.5 / Xorg 1.7.3 integration
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 837
diff changeset
   224
X11_DIR=/usr
d428083dbbdd 6905171 X11R7.5 / Xorg 1.7.3 integration
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 837
diff changeset
   225
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
   226
X11_LIB_DIR=$(X11_DIR)/lib
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   227
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
   228
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
   229
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
   230
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
   231
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
   232
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
   233
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
   234
X11_DOC_DIR=/usr/share/doc/X11
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   235
X11_LOCALE_DIR=$(X11_DIR)/share/locale
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   236
X11_MAN_DIR=$(X11_DIR)/share/man
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   237
X11_ACLOCAL_DIR=$(X11_DIR)/share/aclocal
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   238
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
   239
851
d428083dbbdd 6905171 X11R7.5 / Xorg 1.7.3 integration
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 837
diff changeset
   240
# 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
   241
X11_SERVERLIBS_SUBDIR=/xorg
d428083dbbdd 6905171 X11R7.5 / Xorg 1.7.3 integration
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 837
diff changeset
   242
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
   243
851
d428083dbbdd 6905171 X11R7.5 / Xorg 1.7.3 integration
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 837
diff changeset
   244
# 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
   245
X11_SERVERMODS_SUBDIR=/xorg/modules
d428083dbbdd 6905171 X11R7.5 / Xorg 1.7.3 integration
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 837
diff changeset
   246
X11_SERVERMODS_DIR=$(X11_LIB_DIR)$(X11_SERVERMODS_SUBDIR)
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   247
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   248
SERVERMOD_subdir_sparc=
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   249
SERVERMOD_subdir_i386=$(ARCHLIBSUBDIR)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   250
SERVERMOD_subdir=$(SERVERMOD_subdir_$(MACH))
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   251
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
   252
# 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
   253
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
   254
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
   255
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
   256
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
   257
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
   258
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
   259
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   260
# 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
   261
# delivered in packages
963
7a4fced80e83 6962316 X proto area should more closely match packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 935
diff changeset
   262
TOOLS_DIR=$(PROTODIR)/tools
7a4fced80e83 6962316 X proto area should more closely match packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 935
diff changeset
   263
TOOLS_ACLOCAL_DIR=$(TOOLS_DIR)/share/aclocal
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   264
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   265
# Directory that license files are copied to for use in building package
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   266
# license files
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   267
LICENSE_DEST = $(PROTODIR)/licenses
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   268
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   269
### Other tools needed to build
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   270
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   271
# Script used to install files in proto area
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   272
INSTALL_SCRIPT=$(TOP)/common/install-sh -c
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   273
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   274
# 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
   275
GNUMAKE = gmake
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   276
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   277
# Some modules use lndir to merge in sources from Sun specific directories
851
d428083dbbdd 6905171 X11R7.5 / Xorg 1.7.3 integration
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 837
diff changeset
   278
LNDIR=$(PROTODIR)$(X11_BIN_DIR)/lndir
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
# 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
   281
DOCBOOKUTIL_BINDIR=$(TOOLS_DIR)/bin
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   282
DOCBOOK2HTML=$(DOCBOOKUTIL_BINDIR)/docbook2html
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   283
DOCBOOK2TXT=$(DOCBOOKUTIL_BINDIR)/docbook2txt
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   284
XORG_DEFS_ENT=$(PROTODIR)/$(X11_DIR)/share/sgml/X11/defs.ent
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   285
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
   286
# Commands to run font utilities from proto area
851
d428083dbbdd 6905171 X11R7.5 / Xorg 1.7.3 integration
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 837
diff changeset
   287
MKFONTDIR=$(PROTODIR)$(X11_BIN_DIR)/mkfontdir
d428083dbbdd 6905171 X11R7.5 / Xorg 1.7.3 integration
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 837
diff changeset
   288
MKFONTSCALE=$(PROTODIR)$(X11_BIN_DIR)/mkfontscale
d428083dbbdd 6905171 X11R7.5 / Xorg 1.7.3 integration
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 837
diff changeset
   289
INSTALLALIAS=$(PROTODIR)$(X11_X11LIB_DIR)/installalias
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
   290
837
ee480af8e87c 6896574 Font repackaging and upgrade to X11R7.5 fonts
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 810
diff changeset
   291
# 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
   292
# 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
   293
# make output
ee480af8e87c 6896574 Font repackaging and upgrade to X11R7.5 fonts
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 810
diff changeset
   294
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
   295
935
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   296
# Other tools used during build
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   297
PERL = /usr/perl5/bin/perl
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   298
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   299
### Sources, in-tree and upstream
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   300
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   301
TARBALLDIR=$(TOP)/tarballs
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   302
WGET=/usr/sfw/bin/wget --no-check-certificate
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   303
GIT=git
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   304
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   305
# If you need to use a closer mirror for X.Org or SourceForge, change these
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   306
XORG_RELEASES_URL=http://xorg.freedesktop.org/releases/individual
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   307
SF_DOWNLOADS_URL=http://easynews.dl.sourceforge.net/sourceforge
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   308
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   309
# Git repositories hosted on freedesktop.org (X.Org, Mesa, pixman, etc.)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   310
FDO_GIT_URL=http://anongit.freedesktop.org/git
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   311
XORG_GIT_URL=$(FDO_GIT_URL)/xorg
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   312
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   313
# Target created when sources are unpacked
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   314
UNPACK_FILE = .unpack_done
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
   315
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
   316
7a4fced80e83 6962316 X proto area should more closely match packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 935
diff changeset
   317
### Misc rules
7a4fced80e83 6962316 X proto area should more closely match packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 935
diff changeset
   318
7a4fced80e83 6962316 X proto area should more closely match packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 935
diff changeset
   319
# 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
   320
# 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
   321
# 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
   322
print_make_var-%:
7a4fced80e83 6962316 X proto area should more closely match packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 935
diff changeset
   323
	@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
   324
7a4fced80e83 6962316 X proto area should more closely match packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 935
diff changeset
   325
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
   326
	@print '\n'