author | Alan Coopersmith <Alan.Coopersmith@Sun.COM> |
Mon, 06 Oct 2008 17:28:50 -0700 | |
changeset 561 | 3c2df35483af |
parent 559 | 894681074118 |
child 606 | 068c11b419c9 |
permissions | -rw-r--r-- |
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 |
# |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
4 |
# Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
5 |
# Use subject to license terms. |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
6 |
# |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
7 |
# Permission is hereby granted, free of charge, to any person obtaining a |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
8 |
# copy of this software and associated documentation files (the |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
9 |
# "Software"), to deal in the Software without restriction, including |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
10 |
# without limitation the rights to use, copy, modify, merge, publish, |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
11 |
# distribute, and/or sell copies of the Software, and to permit persons |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
12 |
# to whom the Software is furnished to do so, provided that the above |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
13 |
# copyright notice(s) and this permission notice appear in all copies of |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
14 |
# the Software and that both the above copyright notice(s) and this |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
15 |
# permission notice appear in supporting documentation. |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
16 |
# |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
17 |
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
18 |
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
19 |
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
20 |
# OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
21 |
# HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
22 |
# INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
23 |
# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
24 |
# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
25 |
# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
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 |
# Except as contained in this notice, the name of a copyright holder |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
28 |
# shall not be used in advertising or otherwise to promote the sale, use |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
29 |
# or other dealings in this Software without prior written authorization |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
30 |
# of the copyright holder. |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
31 |
# |
561
3c2df35483af
6756343 Split FSWxorg-fonts into smaller packages & integrate to Nevada gate
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
559
diff
changeset
|
32 |
# @(#)Makefile.init 1.5 08/10/06 |
493
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
33 |
# |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
34 |
|
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
35 |
# 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
|
36 |
# 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
|
37 |
# (where /bin/sh is ksh93) |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
38 |
SHELL=/usr/bin/ksh93 |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
39 |
|
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
40 |
# Borrowed from Solaris OS/Net makefile.master: |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
41 |
# 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
|
42 |
# make feature that '#' is always a comment delimiter, even when escaped or |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
43 |
# quoted. The only way of generating this is the :sh macro mechanism. Note |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
44 |
# however that in general :sh macros should be avoided in makefiles that are |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
45 |
# widely included into other makefiles, as the resulting shell executions can |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
46 |
# cause a noticable slowdown in build times. |
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 |
POUND_SIGN:sh= echo \\043 |
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 |
# Set default build target to all |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
51 |
default:: all |
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 |
# 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
|
54 |
$(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
|
55 |
|
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
56 |
### Machine architecture macros |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
57 |
|
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
58 |
# MACH will be either "sparc" or "i386" |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
59 |
MACH:sh=uname -p |
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 |
# 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
|
62 |
ARCH=$(MACH:sparc=sun4) |
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 |
MACH32_sparc = sparc |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
65 |
MACH64_sparc = sparcv9 |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
66 |
MACH32_i386 = i386 |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
67 |
MACH64_i386 = amd64 |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
68 |
|
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
69 |
MACH32= $(MACH32_$(MACH)) |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
70 |
MACH64= $(MACH64_$(MACH)) |
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 |
# Architecture subdirectories |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
73 |
|
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
74 |
SUBDIR32_sparc = sparcv8 |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
75 |
SUBDIR64_sparc = sparcv9 |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
76 |
SUBDIR32_i386 = i386 |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
77 |
SUBDIR64_i386 = amd64 |
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 |
SUBDIR32 = $(SUBDIR32_$(MACH)) |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
80 |
SUBDIR64 = $(SUBDIR64_$(MACH)) |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
81 |
|
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
82 |
|
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
83 |
### Default compiler & options |
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 |
# 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
|
86 |
# 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
|
87 |
# 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
|
88 |
DEFAULT_COMPILER = suncc |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
89 |
|
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
90 |
## Sun Studio |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
91 |
CC_suncc = cc |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
92 |
CXX_suncc = CC |
507
dac240d465a4
6738027 After Xserver B97b packages were installed, the keyboard is disabled on the login screen
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
493
diff
changeset
|
93 |
OPT_FLAGS_suncc = -xO4 -xbuiltin=%none -xlibmil -xprefetch -xdepend |
493
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
94 |
DEBUG_FLAGS_suncc = -g |
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 |
|
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
98 |
CFLAGS_suncc = $(DEBUG_OR_OPT_FLAGS_suncc) -v -mc -xstrconst |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
99 |
CXXFLAGS_suncc = $(DEBUG_OR_OPT_FLAGS_suncc) +w -mc -norunpath |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
100 |
|
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
101 |
ARCH32_FLAGS_sparc_suncc = -xarch=v8plus |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
102 |
ARCH64_FLAGS_sparc_suncc = -xarch=v9 |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
103 |
|
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
104 |
# -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
|
105 |
# avoid losing stack frame pointers so you can't get stack traces or debug |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
106 |
ARCH32_FLAGS_i386_suncc = -xtarget=pentium -xregs=no%frameptr |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
107 |
ARCH64_FLAGS_i386_suncc = -xarch=generic64 -xregs=no%frameptr |
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 |
# 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
|
110 |
ARCH_LIB_FLAGS_sparc_suncc = -xregs=no%appl |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
111 |
ARCH_LIB_FLAGS_i386_suncc = |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
112 |
|
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
113 |
## GNU Compilers |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
114 |
GCC = /usr/sfw/bin/gcc |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
115 |
GXX = /usr/sfw/bin/g++ |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
116 |
CC_gcc = $(GCC) |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
117 |
CXX_gcc = $(GXX) |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
118 |
OPT_FLAGS_gcc = -O3 |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
119 |
DEBUG_FLAGS_gcc = -g |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
120 |
$(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
|
121 |
$(BUILD_DEBUG:yes=$(POUND_SIGN)) DEBUG_OR_OPT_FLAGS_gcc = $(OPT_FLAGS_gcc) |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
122 |
CFLAGS_gcc = $(DEBUG_OR_OPT_FLAGS_gcc) \ |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
123 |
-fno-omit-frame-pointer -Wall |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
124 |
CXXFLAGS_gcc = $(DEBUG_OR_OPT_FLAGS_gcc) \ |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
125 |
-fno-omit-frame-pointer -Wall |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
126 |
|
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
127 |
ARCH32_FLAGS_sparc_gcc = -mcpu=ultrasparc -m32 |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
128 |
ARCH64_FLAGS_sparc_gcc = -mcpu=ultrasparc -m64 |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
129 |
ARCH32_FLAGS_i386_gcc = -march=i686 -m32 |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
130 |
ARCH64_FLAGS_i386_gcc = -march=opteron -m64 |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
131 |
|
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
132 |
# 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
|
133 |
ARCH_LIB_FLAGS_sparc_gcc = -mno-app-regs |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
134 |
ARCH_LIB_FLAGS_i386_gcc = |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
135 |
|
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
136 |
## Set common variables based on above rules |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
137 |
CC = $(CC_$(MODULE_COMPILER)) |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
138 |
CXX = $(CXX_$(MODULE_COMPILER)) |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
139 |
CFLAGS = $(CFLAGS_$(MODULE_COMPILER)) $(ARCH_FLAGS) |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
140 |
CXXFLAGS = $(CXXFLAGS_$(MODULE_COMPILER)) $(ARCH_FLAGS) |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
141 |
ARCH32_FLAGS = $(ARCH32_FLAGS_$(MACH)_$(MODULE_COMPILER)) |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
142 |
ARCH64_FLAGS = $(ARCH64_FLAGS_$(MACH)_$(MODULE_COMPILER)) |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
143 |
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
|
144 |
|
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
145 |
# Flags for specific binary types |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
146 |
LIB_CPPFLAGS = -D_REENTRANT |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
147 |
LIB_CFLAGS = $(CFLAGS) $(ARCH_LIB_FLAGS) |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
148 |
PROG_CFLAGS = $(CFLAGS) |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
149 |
PROG_CXXFLAGS = $(CXXFLAGS) |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
150 |
|
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
151 |
### Linker flags |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
152 |
|
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
153 |
# 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
|
154 |
# 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
|
155 |
# we can only make .bss, not all of .data no-exec on SPARC |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
156 |
MAPFILE_DIR = $(TOP)/common/mapfiles |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
157 |
MAPFILE_NOEXBSS = $(MAPFILE_DIR)/map.noexbss |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
158 |
MAPFILE_NOEXDATA_sparc = $(MAPFILE_NOEXBSS) |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
159 |
MAPFILE_NOEXDATA_i386 = /usr/lib/ld/map.noexdata |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
160 |
MAPFILE_NOEXDATA = $(MAPFILE_NOEXDATA_$(MACH)) |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
161 |
MAPFILE_NOEXSTACK = /usr/lib/ld/map.noexstk |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
162 |
MAPFILE_PAGEALIGN = /usr/lib/ld/map.pagealign |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
163 |
MAPFILE_HEAPALIGN = /usr/lib/ld/map.bssalign |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
164 |
|
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
165 |
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
|
166 |
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
|
167 |
-M $(MAPFILE_NOEXBSS) |
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 |
# Common flags for all binaries |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
170 |
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
|
171 |
|
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
172 |
# 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
|
173 |
# building libraries. |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
174 |
LIB_REQUIRED_LDFLAGS = -z text -z defs |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
175 |
LIB_LDFLAGS_common = $(LDFLAGS_common) $(LIB_REQUIRED_LDFLAGS) |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
176 |
|
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
177 |
# Flags for programs |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
178 |
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
|
179 |
|
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
180 |
# 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
|
181 |
# 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
|
182 |
LDFLAGS_suncc = $(LDFLAGS_common) |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
183 |
LIB_LDFLAGS_suncc = $(LIB_LDFLAGS_common) |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
184 |
PROG_LDFLAGS_suncc = $(PROG_LDFLAGS_common) |
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 |
# 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
|
187 |
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
|
188 |
GCC_LDFLAGS_CMD=echo $(LDFLAGS_common) | $(GCC_CONVERT_LDFLAGS_CMD) |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
189 |
LDFLAGS_gcc=$(GCC_LDFLAGS_CMD:sh) |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
190 |
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
|
191 |
LIB_LDFLAGS_gcc=$(GCC_LIB_LDFLAGS_CMD:sh) |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
192 |
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
|
193 |
PROG_LDFLAGS_gcc=$(GCC_PROG_LDFLAGS_CMD:sh) |
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 |
LDFLAGS=$(LDFLAGS_$(MODULE_COMPILER)) |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
196 |
LIB_LDFLAGS=$(LIB_LDFLAGS_$(MODULE_COMPILER)) |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
197 |
PROG_LDFLAGS=$(PROG_LDFLAGS_$(MODULE_COMPILER)) |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
198 |
|
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
199 |
## Commonly added options |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
200 |
|
559
894681074118
6755420 Make libXaw.so.7 public [LSARC/2008/609]
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
557
diff
changeset
|
201 |
# No longer needed, since X.Org libXaw is now default |
894681074118
6755420 Make libXaw.so.7 public [LSARC/2008/609]
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
557
diff
changeset
|
202 |
XAW_LDFLAGS = |
493
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
203 |
|
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
204 |
# 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
|
205 |
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
|
206 |
-R$(X11_SERVERLIBS_DIR)$(ARCHLIBSUBDIR) |
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 |
|
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
209 |
### Directory paths |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
210 |
|
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
211 |
# Proto directory to install into for packaging |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
212 |
PROTODIR=$(TOP)/../proto-$(ARCH)-svr4 |
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 |
# Common subdirs |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
215 |
OW_DIR=/usr/openwin |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
216 |
OW_X11LIB_DIR=$(OW_DIR)/lib/X11 |
561
3c2df35483af
6756343 Split FSWxorg-fonts into smaller packages & integrate to Nevada gate
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
559
diff
changeset
|
217 |
OW_FONT_DIR=$(OW_X11LIB_DIR)/fonts |
3c2df35483af
6756343 Split FSWxorg-fonts into smaller packages & integrate to Nevada gate
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
559
diff
changeset
|
218 |
OW_TRUETYPE_DIR=$(OW_FONT_DIR)/TrueType |
493
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
219 |
|
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
220 |
X11_DIR=/usr/X11 |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
221 |
X11_INCLUDES_DIR=$(X11_DIR)/include |
561
3c2df35483af
6756343 Split FSWxorg-fonts into smaller packages & integrate to Nevada gate
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
559
diff
changeset
|
222 |
X11_X11LIB_DIR=$(X11_DIR)/lib/X11 |
3c2df35483af
6756343 Split FSWxorg-fonts into smaller packages & integrate to Nevada gate
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
559
diff
changeset
|
223 |
X11_FONT_DIR=$(X11_X11LIB_DIR)/fonts |
3c2df35483af
6756343 Split FSWxorg-fonts into smaller packages & integrate to Nevada gate
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
559
diff
changeset
|
224 |
X11_TRUETYPE_DIR=$(X11_FONT_DIR)/TTF |
493
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
225 |
X11_DOC_DIR=$(X11_DIR)/share/doc |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
226 |
X11_LOCALE_DIR=$(X11_DIR)/share/locale |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
227 |
X11_MAN_DIR=$(X11_DIR)/share/man |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
228 |
X11_ACLOCAL_DIR=$(X11_DIR)/share/aclocal |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
229 |
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
|
230 |
|
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
231 |
# Subdirectory of /usr/X11/lib for X server private libraries |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
232 |
X11_SERVERLIBS_SUBDIR=/X11/xserver |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
233 |
X11_SERVERLIBS_DIR=$(X11_DIR)/lib$(X11_SERVERLIBS_SUBDIR) |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
234 |
|
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
235 |
# Subdirectory of /usr/X11/lib for X server loadable modules |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
236 |
X11_SERVERMODS_SUBDIR=/modules |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
237 |
X11_SERVERMODS_DIR=$(X11_DIR)/lib$(X11_SERVERMODS_SUBDIR) |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
238 |
|
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
239 |
SERVERMOD_subdir_sparc= |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
240 |
SERVERMOD_subdir_i386=$(ARCHLIBSUBDIR) |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
241 |
SERVERMOD_subdir=$(SERVERMOD_subdir_$(MACH)) |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
242 |
|
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
243 |
# 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
|
244 |
# delivered in packages |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
245 |
TOOLS_DIR=/tools |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
246 |
|
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
247 |
# 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
|
248 |
# license files |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
249 |
LICENSE_DEST = $(PROTODIR)/licenses |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
250 |
|
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
251 |
### Other tools needed to build |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
252 |
|
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
253 |
# Script used to install files in proto area |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
254 |
INSTALL_SCRIPT=$(TOP)/common/install-sh -c |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
255 |
|
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
256 |
# 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
|
257 |
GNUMAKE = gmake |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
258 |
|
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
259 |
# Some modules use lndir to merge in sources from Sun specific directories |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
260 |
LNDIR=$(PROTODIR)/usr/X11/bin/lndir |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
261 |
|
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
262 |
# Tools needed to build docbook documentation |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
263 |
DOCBOOKUTIL_BINDIR=$(PROTODIR)$(TOOLS_DIR)/bin |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
264 |
DOCBOOK2HTML=$(DOCBOOKUTIL_BINDIR)/docbook2html |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
265 |
DOCBOOK2TXT=$(DOCBOOKUTIL_BINDIR)/docbook2txt |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
266 |
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
|
267 |
|
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
|
268 |
# Commands to run font utilities from proto area |
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
|
269 |
MKFONTDIR=$(PROTODIR)$(X11_DIR)/bin/mkfontdir |
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
|
270 |
MKFONTSCALE=$(PROTODIR)$(X11_DIR)/bin/mkfontscale |
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
|
271 |
INSTALLALIAS=$(PROTODIR)$(X11_DIR)/lib/installalias |
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
|
272 |
|
493
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
273 |
### Sources, in-tree and upstream |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
274 |
|
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
275 |
TARBALLDIR=$(TOP)/tarballs |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
276 |
WGET=/usr/sfw/bin/wget --no-check-certificate |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
277 |
GIT=git |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
278 |
|
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
279 |
# 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
|
280 |
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
|
281 |
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
|
282 |
|
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
283 |
# 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
|
284 |
FDO_GIT_URL=http://anongit.freedesktop.org/git |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
285 |
XORG_GIT_URL=$(FDO_GIT_URL)/xorg |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
286 |
|
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
287 |
# Target created when sources are unpacked |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
288 |
UNPACK_FILE = .unpack_done |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
289 |
UNPACK_TARGET = $(BUILD_DIR)/$(UNPACK_FILE) |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
290 |
|
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
291 |
### Dependencies |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
292 |
# Need to define more dependencies to enable simpler builds of subtree portions |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
293 |
|
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
294 |
# Almost everything depends on the headers in xproto |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
295 |
XPROTO_DEP=$(PROTODIR)/usr/lib/$(ARCHLIBSUBDIR)/pkgconfig/xproto.pc |