author | Jon Tibble <meths@btinternet.com> |
Thu, 09 Dec 2010 22:32:39 +0100 | |
changeset 13255 | 4afa820d78b9 |
parent 13187 | 36a51d4e554c |
child 13689 | 125d1b3a6fa8 |
permissions | -rw-r--r-- |
0 | 1 |
# |
2 |
# CDDL HEADER START |
|
3 |
# |
|
4 |
# The contents of this file are subject to the terms of the |
|
580 | 5 |
# Common Development and Distribution License (the "License"). |
6 |
# You may not use this file except in compliance with the License. |
|
0 | 7 |
# |
8 |
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE |
|
9 |
# or http://www.opensolaris.org/os/licensing. |
|
10 |
# See the License for the specific language governing permissions |
|
11 |
# and limitations under the License. |
|
12 |
# |
|
13 |
# When distributing Covered Code, include this CDDL HEADER in each |
|
14 |
# file and include the License file at usr/src/OPENSOLARIS.LICENSE. |
|
15 |
# If applicable, add the following below this CDDL HEADER, with the |
|
16 |
# fields enclosed by brackets "[]" replaced with your own identifying |
|
17 |
# information: Portions Copyright [yyyy] [name of copyright owner] |
|
18 |
# |
|
19 |
# CDDL HEADER END |
|
20 |
# |
|
580 | 21 |
|
0 | 22 |
# |
12210
436b06ce515d
6593513 make nightly -O cheaper
jmcp <James.McPherson@Sun.COM>
parents:
11921
diff
changeset
|
23 |
# Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved. |
0 | 24 |
# |
580 | 25 |
# |
0 | 26 |
# Makefile.master, global definitions for system source |
27 |
# |
|
28 |
ROOT= /proto |
|
29 |
||
30 |
# |
|
10207
87c40ea3fc4b
6864230 hiho, hiho, it'ch chtime for CH to go
jmcp <James.McPherson@Sun.COM>
parents:
10030
diff
changeset
|
31 |
# RELEASE_BUILD should be cleared for final release builds. |
87c40ea3fc4b
6864230 hiho, hiho, it'ch chtime for CH to go
jmcp <James.McPherson@Sun.COM>
parents:
10030
diff
changeset
|
32 |
# NOT_RELEASE_BUILD is exactly what the name implies. |
0 | 33 |
# |
34 |
# INTERNAL_RELEASE_BUILD is a subset of RELEASE_BUILD. It mostly controls |
|
35 |
# identification strings. Enabling RELEASE_BUILD automatically enables |
|
36 |
# INTERNAL_RELEASE_BUILD. |
|
37 |
# |
|
38 |
# EXPORT_RELEASE_BUILD controls whether binaries are built in a form that |
|
39 |
# can be released for export under a binary license. It is orthogonal to |
|
1167 | 40 |
# the other *RELEASE_BUILD settings. ("#" means do an export release |
41 |
# build, "" means do a normal build.) |
|
42 |
# |
|
43 |
# CLOSED_BUILD controls whether we try to build files under |
|
44 |
# usr/closed. ("" means to build closed code, "#" means don't try to |
|
45 |
# build it.) Skipping the closed code implies doing an export release |
|
46 |
# build. |
|
0 | 47 |
# |
48 |
# STRIP_COMMENTS toggles comment section striping. Generally the same setting |
|
49 |
# as INTERNAL_RELEASE_BUILD. |
|
50 |
# |
|
51 |
# __GNUC toggles the building of ON components using gcc and related tools. |
|
52 |
# Normally set to `#', set it to `' to do gcc build. |
|
53 |
# |
|
54 |
# The declaration POUND_SIGN is always '#'. This is needed to get around the |
|
55 |
# make feature that '#' is always a comment delimiter, even when escaped or |
|
10738
6cd5e5169fec
6880460 some root-build bits were missed by 6864230
jmcp <James.McPherson@Sun.COM>
parents:
10696
diff
changeset
|
56 |
# quoted. We use this macro expansion method to get POUND_SIGN rather than |
6cd5e5169fec
6880460 some root-build bits were missed by 6864230
jmcp <James.McPherson@Sun.COM>
parents:
10696
diff
changeset
|
57 |
# always breaking out a shell because the general case can cause a noticable |
6cd5e5169fec
6880460 some root-build bits were missed by 6864230
jmcp <James.McPherson@Sun.COM>
parents:
10696
diff
changeset
|
58 |
# slowdown in build times when so many Makefiles include Makefile.master. |
0 | 59 |
# |
10738
6cd5e5169fec
6880460 some root-build bits were missed by 6864230
jmcp <James.McPherson@Sun.COM>
parents:
10696
diff
changeset
|
60 |
# While the majority of users are expected to override the setting below |
6cd5e5169fec
6880460 some root-build bits were missed by 6864230
jmcp <James.McPherson@Sun.COM>
parents:
10696
diff
changeset
|
61 |
# with an env file (via nightly or bldenv), if you aren't building that way |
6cd5e5169fec
6880460 some root-build bits were missed by 6864230
jmcp <James.McPherson@Sun.COM>
parents:
10696
diff
changeset
|
62 |
# (ie, you're using "ws" or some other bootstrapping method) then you need |
6cd5e5169fec
6880460 some root-build bits were missed by 6864230
jmcp <James.McPherson@Sun.COM>
parents:
10696
diff
changeset
|
63 |
# this definition in order to avoid the subshell invocation mentioned above. |
6cd5e5169fec
6880460 some root-build bits were missed by 6864230
jmcp <James.McPherson@Sun.COM>
parents:
10696
diff
changeset
|
64 |
# |
6cd5e5169fec
6880460 some root-build bits were missed by 6864230
jmcp <James.McPherson@Sun.COM>
parents:
10696
diff
changeset
|
65 |
|
6cd5e5169fec
6880460 some root-build bits were missed by 6864230
jmcp <James.McPherson@Sun.COM>
parents:
10696
diff
changeset
|
66 |
PRE_POUND= pre\# |
6cd5e5169fec
6880460 some root-build bits were missed by 6864230
jmcp <James.McPherson@Sun.COM>
parents:
10696
diff
changeset
|
67 |
POUND_SIGN= $(PRE_POUND:pre\%=%) |
0 | 68 |
|
69 |
NOT_RELEASE_BUILD= |
|
70 |
INTERNAL_RELEASE_BUILD= $(POUND_SIGN) |
|
71 |
RELEASE_BUILD= $(POUND_SIGN) |
|
72 |
$(RELEASE_BUILD)NOT_RELEASE_BUILD= $(POUND_SIGN) |
|
73 |
$(RELEASE_BUILD)INTERNAL_RELEASE_BUILD= |
|
74 |
PATCH_BUILD= $(POUND_SIGN) |
|
75 |
||
1167 | 76 |
# If CLOSED_IS_PRESENT is not set, assume the closed tree is present. |
77 |
CLOSED_BUILD_1= $(CLOSED_IS_PRESENT:yes=) |
|
78 |
CLOSED_BUILD= $(CLOSED_BUILD_1:no=$(POUND_SIGN)) |
|
79 |
||
80 |
EXPORT_RELEASE_BUILD= $(POUND_SIGN) |
|
81 |
$(CLOSED_BUILD)EXPORT_RELEASE_BUILD= |
|
82 |
||
0 | 83 |
# SPARC_BLD is '#' for an Intel build. |
84 |
# INTEL_BLD is '#' for a Sparc build. |
|
85 |
SPARC_BLD_1= $(MACH:i386=$(POUND_SIGN)) |
|
86 |
SPARC_BLD= $(SPARC_BLD_1:sparc=) |
|
87 |
INTEL_BLD_1= $(MACH:sparc=$(POUND_SIGN)) |
|
88 |
INTEL_BLD= $(INTEL_BLD_1:i386=) |
|
89 |
||
90 |
STRIP_COMMENTS= $(INTERNAL_RELEASE_BUILD) |
|
91 |
||
12210
436b06ce515d
6593513 make nightly -O cheaper
jmcp <James.McPherson@Sun.COM>
parents:
11921
diff
changeset
|
92 |
# Are we building tonic closedbins? Unless you have used the |
436b06ce515d
6593513 make nightly -O cheaper
jmcp <James.McPherson@Sun.COM>
parents:
11921
diff
changeset
|
93 |
# -O flag to nightly or bldenv, leave the definition of TONICBUILD |
436b06ce515d
6593513 make nightly -O cheaper
jmcp <James.McPherson@Sun.COM>
parents:
11921
diff
changeset
|
94 |
# as $(POUND_SIGN). |
436b06ce515d
6593513 make nightly -O cheaper
jmcp <James.McPherson@Sun.COM>
parents:
11921
diff
changeset
|
95 |
# |
436b06ce515d
6593513 make nightly -O cheaper
jmcp <James.McPherson@Sun.COM>
parents:
11921
diff
changeset
|
96 |
# IF YOU CHANGE CLOSEDROOT, you MUST change install.bin |
436b06ce515d
6593513 make nightly -O cheaper
jmcp <James.McPherson@Sun.COM>
parents:
11921
diff
changeset
|
97 |
# to match the new definition. |
436b06ce515d
6593513 make nightly -O cheaper
jmcp <James.McPherson@Sun.COM>
parents:
11921
diff
changeset
|
98 |
TONICBUILD= $(POUND_SIGN) |
436b06ce515d
6593513 make nightly -O cheaper
jmcp <James.McPherson@Sun.COM>
parents:
11921
diff
changeset
|
99 |
$(TONICBUILD)CLOSEDROOT= $(ROOT)-closed |
436b06ce515d
6593513 make nightly -O cheaper
jmcp <James.McPherson@Sun.COM>
parents:
11921
diff
changeset
|
100 |
|
436b06ce515d
6593513 make nightly -O cheaper
jmcp <James.McPherson@Sun.COM>
parents:
11921
diff
changeset
|
101 |
|
0 | 102 |
# set __GNUC= in the environment to build 32-bit with the gcc compiler. |
2886
be6558533f55
6470487 ld relocation errors occur when building the amd64 kernel for nevada with mars build 30
petede
parents:
2745
diff
changeset
|
103 |
# The default is to use the Sun Studio compiler for all processor types. |
0 | 104 |
__GNUC= $(POUND_SIGN) |
105 |
||
499
3fe4d3ff5864
6316914 changes in ON needed for Vulcan (SunStudio 10) compiler switch
petede
parents:
411
diff
changeset
|
106 |
# set __GNUC64= in the environment to build 64-bit with the gcc compiler. |
2886
be6558533f55
6470487 ld relocation errors occur when building the amd64 kernel for nevada with mars build 30
petede
parents:
2745
diff
changeset
|
107 |
# Inherit the __GNUC value by default, and if that is set to $(POUND_SIGN) |
be6558533f55
6470487 ld relocation errors occur when building the amd64 kernel for nevada with mars build 30
petede
parents:
2745
diff
changeset
|
108 |
# then this means use the Sun Studio compiler. |
499
3fe4d3ff5864
6316914 changes in ON needed for Vulcan (SunStudio 10) compiler switch
petede
parents:
411
diff
changeset
|
109 |
__GNUC64= $(__GNUC) |
0 | 110 |
|
2886
be6558533f55
6470487 ld relocation errors occur when building the amd64 kernel for nevada with mars build 30
petede
parents:
2745
diff
changeset
|
111 |
# set __SSNEXT= in the enviroment to build with the 'next' release of |
be6558533f55
6470487 ld relocation errors occur when building the amd64 kernel for nevada with mars build 30
petede
parents:
2745
diff
changeset
|
112 |
# the Sun Studio compiler. This will cause command line options specific |
be6558533f55
6470487 ld relocation errors occur when building the amd64 kernel for nevada with mars build 30
petede
parents:
2745
diff
changeset
|
113 |
# to the 'next' version of the Sun Studio compiler to be used. |
be6558533f55
6470487 ld relocation errors occur when building the amd64 kernel for nevada with mars build 30
petede
parents:
2745
diff
changeset
|
114 |
__SSNEXT= $(POUND_SIGN) |
be6558533f55
6470487 ld relocation errors occur when building the amd64 kernel for nevada with mars build 30
petede
parents:
2745
diff
changeset
|
115 |
|
1167 | 116 |
# CLOSED is the root of the tree that contains source which isn't released |
117 |
# as open source |
|
118 |
CLOSED= $(SRC)/../closed |
|
119 |
||
0 | 120 |
# BUILD_TOOLS is the root of all tools including compilers. |
121 |
# ONBLD_TOOLS is the root of all the tools that are part of SUNWonbld. |
|
122 |
||
123 |
BUILD_TOOLS= /ws/onnv-tools |
|
124 |
ONBLD_TOOLS= $(BUILD_TOOLS)/onbld |
|
125 |
||
126 |
JAVA_ROOT= /usr/java |
|
127 |
||
128 |
SFW_ROOT= /usr/sfw |
|
39
dc9b7493e881
6287497 openssl cpp flags needs to be adjusted for export builds
dinak
parents:
0
diff
changeset
|
129 |
SFWINCDIR= $(SFW_ROOT)/include |
0 | 130 |
SFWLIBDIR= $(SFW_ROOT)/lib |
131 |
SFWLIBDIR64= $(SFW_ROOT)/lib/$(MACH64) |
|
132 |
||
133 |
RPCGEN= /usr/bin/rpcgen |
|
134 |
STABS= $(ONBLD_TOOLS)/bin/$(MACH)/stabs |
|
3446 | 135 |
ELFEXTRACT= $(ONBLD_TOOLS)/bin/$(MACH)/elfextract |
136 |
MBH_PATCH= $(ONBLD_TOOLS)/bin/$(MACH)/mbh_patch |
|
0 | 137 |
ECHO= echo |
138 |
INS= install |
|
139 |
TRUE= true |
|
140 |
SYMLINK= /usr/bin/ln -s |
|
141 |
LN= /usr/bin/ln |
|
142 |
CHMOD= /usr/bin/chmod |
|
143 |
MV= /usr/bin/mv -f |
|
144 |
RM= /usr/bin/rm -f |
|
3448 | 145 |
CUT= /usr/bin/cut |
146 |
NM= /usr/ccs/bin/nm |
|
147 |
DIFF= /usr/bin/diff |
|
0 | 148 |
GREP= /usr/bin/grep |
1792
7e25f1c5948e
6406661 nightly doesn't tell about the shadow compiler
wesolows
parents:
1717
diff
changeset
|
149 |
EGREP= /usr/bin/egrep |
10696
cd0f390dd9e2
PSARC 2008/672 thebe SAS/SATA driver
dh142964 <David.Hollister@Sun.COM>
parents:
10207
diff
changeset
|
150 |
ELFWRAP= /usr/bin/elfwrap |
6510
1c846e50b601
6690251 copyright file generation should exclude duplicate licenses
mjnelson
parents:
6350
diff
changeset
|
151 |
KSH93= /usr/bin/ksh93 |
0 | 152 |
SED= /usr/bin/sed |
153 |
NAWK= /usr/bin/nawk |
|
154 |
CP= /usr/bin/cp -f |
|
155 |
MCS= /usr/ccs/bin/mcs |
|
156 |
CAT= /usr/bin/cat |
|
4271
dda1ded496b7
6455532 OSNet cleanup required in preparation for direct bindings
rie
parents:
3667
diff
changeset
|
157 |
ELFDUMP= /usr/ccs/bin/elfdump |
0 | 158 |
M4= /usr/ccs/bin/m4 |
159 |
STRIP= /usr/ccs/bin/strip |
|
160 |
LEX= /usr/ccs/bin/lex |
|
5184 | 161 |
FLEX= $(SFW_ROOT)/bin/flex |
0 | 162 |
YACC= /usr/ccs/bin/yacc |
163 |
CPP= /usr/lib/cpp |
|
164 |
JAVAC= $(JAVA_ROOT)/bin/javac |
|
165 |
JAVAH= $(JAVA_ROOT)/bin/javah |
|
166 |
JAVADOC= $(JAVA_ROOT)/bin/javadoc |
|
167 |
RMIC= $(JAVA_ROOT)/bin/rmic |
|
168 |
JAR= $(JAVA_ROOT)/bin/jar |
|
169 |
CTFCONVERT= $(ONBLD_TOOLS)/bin/$(MACH)/ctfconvert |
|
170 |
CTFMERGE= $(ONBLD_TOOLS)/bin/$(MACH)/ctfmerge |
|
171 |
CTFSTABS= $(ONBLD_TOOLS)/bin/$(MACH)/ctfstabs |
|
5311 | 172 |
NDRGEN= $(ONBLD_TOOLS)/bin/$(MACH)/ndrgen |
0 | 173 |
GENOFFSETS= $(ONBLD_TOOLS)/bin/genoffsets |
174 |
CTFCVTPTBL= $(ONBLD_TOOLS)/bin/ctfcvtptbl |
|
175 |
CTFFINDMOD= $(ONBLD_TOOLS)/bin/ctffindmod |
|
176 |
XREF= $(ONBLD_TOOLS)/bin/xref |
|
177 |
FIND= /usr/bin/find |
|
178 |
PERL= /usr/bin/perl |
|
12216
5167f302c8cf
6915602 onbld python modules should install into python version specific directories
Richard Lowe <richlowe@richlowe.net>
parents:
12210
diff
changeset
|
179 |
PYTHON_24= /usr/bin/python2.4 |
5167f302c8cf
6915602 onbld python modules should install into python version specific directories
Richard Lowe <richlowe@richlowe.net>
parents:
12210
diff
changeset
|
180 |
PYTHON_26= /usr/bin/python2.6 |
5167f302c8cf
6915602 onbld python modules should install into python version specific directories
Richard Lowe <richlowe@richlowe.net>
parents:
12210
diff
changeset
|
181 |
PYTHON= $(PYTHON_24) |
0 | 182 |
SORT= /usr/bin/sort |
183 |
TOUCH= /usr/bin/touch |
|
184 |
WC= /usr/bin/wc |
|
185 |
XARGS= /usr/bin/xargs |
|
5543
337e2ea9ef8e
6332924 snv_24 /usr/ccs/bin/as adds new HWCAP tags to previously untagged objects
darrenm
parents:
5311
diff
changeset
|
186 |
ELFEDIT= /usr/bin/elfedit |
0 | 187 |
ELFSIGN= /usr/bin/elfsign |
188 |
DTRACE= /usr/sbin/dtrace |
|
7144 | 189 |
UNIQ= /usr/bin/uniq |
13187
36a51d4e554c
188 should keep unused closed-bins out of the proto area
Garrett D'Amore <garrett@nexenta.com>
parents:
12692
diff
changeset
|
190 |
TAR= /usr/bin/tar |
0 | 191 |
|
192 |
FILEMODE= 644 |
|
193 |
DIRMODE= 755 |
|
194 |
||
195 |
# |
|
196 |
# The version of the patch makeup table optimized for build-time use. Used |
|
197 |
# during patch builds only. |
|
198 |
$(PATCH_BUILD)PMTMO_FILE=$(SRC)/patch_makeup_table.mo |
|
199 |
||
200 |
# Declare that nothing should be built in parallel. |
|
201 |
# Individual Makefiles can use the .PARALLEL target to declare otherwise. |
|
202 |
.NO_PARALLEL: |
|
203 |
||
204 |
# For stylistic checks |
|
205 |
# |
|
206 |
# Note that the X and C checks are not used at this time and may need |
|
207 |
# modification when they are actually used. |
|
208 |
# |
|
7078
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6812
diff
changeset
|
209 |
CSTYLE= $(ONBLD_TOOLS)/bin/cstyle |
0 | 210 |
CSTYLE_TAIL= |
7078
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6812
diff
changeset
|
211 |
HDRCHK= $(ONBLD_TOOLS)/bin/hdrchk |
0 | 212 |
HDRCHK_TAIL= |
7078
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6812
diff
changeset
|
213 |
JSTYLE= $(ONBLD_TOOLS)/bin/jstyle |
0 | 214 |
|
215 |
DOT_H_CHECK= \ |
|
216 |
@$(ECHO) "checking $<"; $(CSTYLE) $< $(CSTYLE_TAIL); \ |
|
217 |
$(HDRCHK) $< $(HDRCHK_TAIL) |
|
218 |
||
219 |
DOT_X_CHECK= \ |
|
220 |
@$(ECHO) "checking $<"; $(RPCGEN) -C -h $< | $(CSTYLE) $(CSTYLE_TAIL); \ |
|
221 |
$(RPCGEN) -C -h $< | $(HDRCHK) $< $(HDRCHK_TAIL) |
|
222 |
||
223 |
DOT_C_CHECK= \ |
|
224 |
@$(ECHO) "checking $<"; $(CSTYLE) $< $(CSTYLE_TAIL) |
|
225 |
||
226 |
MANIFEST_CHECK= \ |
|
227 |
@$(ECHO) "checking $<"; \ |
|
228 |
SVCCFG_DTD=$(SRC)/cmd/svc/dtd/service_bundle.dtd.1 \ |
|
7887
b6618727fabf
PSARC/2008/350 SMF Template Extensions
Liane Praza <Liane.Praza@Sun.COM>
parents:
7684
diff
changeset
|
229 |
SVCCFG_REPOSITORY=$(SRC)/cmd/svc/seed/global.db \ |
b6618727fabf
PSARC/2008/350 SMF Template Extensions
Liane Praza <Liane.Praza@Sun.COM>
parents:
7684
diff
changeset
|
230 |
SVCCFG_CONFIGD_PATH=$(SRC)/cmd/svc/configd/svc.configd-native \ |
0 | 231 |
$(SRC)/cmd/svc/svccfg/svccfg-native validate $< |
232 |
||
12210
436b06ce515d
6593513 make nightly -O cheaper
jmcp <James.McPherson@Sun.COM>
parents:
11921
diff
changeset
|
233 |
# |
436b06ce515d
6593513 make nightly -O cheaper
jmcp <James.McPherson@Sun.COM>
parents:
11921
diff
changeset
|
234 |
# IMPORTANT:: If you change any of INS.file, INS.dir, INS.rename, |
436b06ce515d
6593513 make nightly -O cheaper
jmcp <James.McPherson@Sun.COM>
parents:
11921
diff
changeset
|
235 |
# INS.link or INS.symlink here, then you must also change the |
436b06ce515d
6593513 make nightly -O cheaper
jmcp <James.McPherson@Sun.COM>
parents:
11921
diff
changeset
|
236 |
# corresponding override definitions in $CLOSED/Makefile.tonic. |
436b06ce515d
6593513 make nightly -O cheaper
jmcp <James.McPherson@Sun.COM>
parents:
11921
diff
changeset
|
237 |
# If you do not do this, then the closedbins build for the OpenSolaris |
436b06ce515d
6593513 make nightly -O cheaper
jmcp <James.McPherson@Sun.COM>
parents:
11921
diff
changeset
|
238 |
# community will break. PS, the gatekeepers will be upset too. |
0 | 239 |
INS.file= $(RM) $@; $(INS) -s -m $(FILEMODE) -f $(@D) $< |
240 |
INS.dir= $(INS) -s -d -m $(DIRMODE) $@ |
|
241 |
# installs and renames at once |
|
242 |
# |
|
243 |
INS.rename= $(INS.file); $(MV) $(@D)/$(<F) $@ |
|
244 |
||
245 |
# install a link |
|
246 |
INSLINKTARGET= $< |
|
247 |
INS.link= $(RM) $@; $(LN) $(INSLINKTARGET) $@ |
|
12210
436b06ce515d
6593513 make nightly -O cheaper
jmcp <James.McPherson@Sun.COM>
parents:
11921
diff
changeset
|
248 |
INS.symlink= $(RM) $@; $(SYMLINK) $(INSLINKTARGET) $@ |
436b06ce515d
6593513 make nightly -O cheaper
jmcp <James.McPherson@Sun.COM>
parents:
11921
diff
changeset
|
249 |
|
7078
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6812
diff
changeset
|
250 |
# |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6812
diff
changeset
|
251 |
# Python bakes the mtime of the .py file into the compiled .pyc and |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6812
diff
changeset
|
252 |
# rebuilds if the baked-in mtime != the mtime of the source file |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6812
diff
changeset
|
253 |
# (rather than only if it's less than), thus when installing python |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6812
diff
changeset
|
254 |
# files we must make certain to not adjust the mtime of the source |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6812
diff
changeset
|
255 |
# (.py) file. |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6812
diff
changeset
|
256 |
# |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6812
diff
changeset
|
257 |
INS.pyfile= $(INS.file); $(TOUCH) -r $< $@ |
0 | 258 |
|
259 |
# MACH must be set in the shell environment per uname -p on the build host |
|
260 |
# More specific architecture variables should be set in lower makefiles. |
|
261 |
# |
|
262 |
# MACH64 is derived from MACH, and BUILD64 is set to `#' for |
|
263 |
# architectures on which we do not build 64-bit versions. |
|
264 |
# (There are no such architectures at the moment.) |
|
265 |
# |
|
266 |
# Set BUILD64=# in the environment to disable 64-bit amd64 |
|
267 |
# builds on i386 machines. |
|
268 |
||
269 |
MACH64_1= $(MACH:sparc=sparcv9) |
|
270 |
MACH64= $(MACH64_1:i386=amd64) |
|
271 |
||
272 |
MACH32_1= $(MACH:sparc=sparcv7) |
|
273 |
MACH32= $(MACH32_1:i386=i86) |
|
274 |
||
275 |
sparc_BUILD64= |
|
276 |
i386_BUILD64= |
|
277 |
BUILD64= $($(MACH)_BUILD64) |
|
278 |
||
279 |
# |
|
280 |
# C compiler mode. Future compilers may change the default on us, |
|
281 |
# so force extended ANSI mode globally. Lower level makefiles can |
|
282 |
# override this by setting CCMODE. |
|
283 |
# |
|
284 |
CCMODE= -Xa |
|
285 |
CCMODE64= -Xa |
|
286 |
||
287 |
# |
|
288 |
# C compiler verbose mode. This is so we can enable it globally, |
|
289 |
# but turn it off in the lower level makefiles of things we cannot |
|
290 |
# (or aren't going to) fix. |
|
291 |
# |
|
292 |
CCVERBOSE= -v |
|
293 |
||
294 |
# set this to the secret flag "-Wc,-Qiselect-v9abiwarn=1" to get warnings |
|
295 |
# from the compiler about places the -xarch=v9 may differ from -xarch=v9c. |
|
296 |
V9ABIWARN= |
|
297 |
||
298 |
# set this to the secret flag "-Wc,-Qiselect-regsym=0" to disable register |
|
299 |
# symbols (used to detect conflicts between objects that use global registers) |
|
300 |
# we disable this now for safety, and because genunix doesn't link with |
|
301 |
# this feature (the v9 default) enabled. |
|
302 |
# |
|
303 |
# REGSYM is separate since the C++ driver syntax is different. |
|
304 |
CCREGSYM= -Wc,-Qiselect-regsym=0 |
|
305 |
CCCREGSYM= -Qoption cg -Qiselect-regsym=0 |
|
306 |
||
2745
4634a7101488
6467071 mdb modules are not finding expected static declarations in userland objects
petede
parents:
2712
diff
changeset
|
307 |
# Prevent the removal of static symbols by the SPARC code generator (cg). |
4634a7101488
6467071 mdb modules are not finding expected static declarations in userland objects
petede
parents:
2712
diff
changeset
|
308 |
# The x86 code generator (ube) does not remove such symbols and as such |
4634a7101488
6467071 mdb modules are not finding expected static declarations in userland objects
petede
parents:
2712
diff
changeset
|
309 |
# using this workaround is not applicable for x86. |
4634a7101488
6467071 mdb modules are not finding expected static declarations in userland objects
petede
parents:
2712
diff
changeset
|
310 |
# |
2605
ec6c9a1440fb
6311077 Enabling ON compilation with Sun Studio 11 (Venus)
petede
parents:
2543
diff
changeset
|
311 |
CCSTATICSYM= -Wc,-Qassembler-ounrefsym=0 |
0 | 312 |
# |
313 |
# generate 32-bit addresses in the v9 kernel. Saves memory. |
|
314 |
CCABS32= -Wc,-xcode=abs32 |
|
315 |
||
316 |
# One optimization the compiler might perform is to turn this: |
|
317 |
# #pragma weak foo |
|
318 |
# extern int foo; |
|
319 |
# if (&foo) |
|
320 |
# foo = 5; |
|
321 |
# into |
|
322 |
# foo = 5; |
|
323 |
# Since we do some of this (foo might be referenced in common kernel code |
|
324 |
# but provided only for some cpu modules or platforms), we disable this |
|
325 |
# optimization. |
|
326 |
# |
|
327 |
sparc_CCUNBOUND = -Wd,-xsafe=unboundsym |
|
328 |
i386_CCUNBOUND = |
|
329 |
CCUNBOUND = $($(MACH)_CCUNBOUND) |
|
330 |
||
331 |
# |
|
332 |
# compiler '-xarch' flag. This is here to centralize it and make it |
|
333 |
# overridable for testing. |
|
7684
cdccab274861
6659940 ON makefiles use wrong options for Sun Studio 12 compiler and lint.
Nick Todd <Nick.Todd@Sun.COM>
parents:
7144
diff
changeset
|
334 |
sparc_XARCH= -m32 |
cdccab274861
6659940 ON makefiles use wrong options for Sun Studio 12 compiler and lint.
Nick Todd <Nick.Todd@Sun.COM>
parents:
7144
diff
changeset
|
335 |
sparcv9_XARCH= -m64 |
0 | 336 |
i386_XARCH= |
7684
cdccab274861
6659940 ON makefiles use wrong options for Sun Studio 12 compiler and lint.
Nick Todd <Nick.Todd@Sun.COM>
parents:
7144
diff
changeset
|
337 |
amd64_XARCH= -m64 -Ui386 -U__i386 |
0 | 338 |
|
339 |
# assembler '-xarch' flag. Different from compiler '-xarch' flag. |
|
2037
132880d31aba
6268715 port_getn(3C) and port_sendn(3C) not working on Solaris x86
craigm
parents:
1810
diff
changeset
|
340 |
sparc_AS_XARCH= -xarch=v8plus |
0 | 341 |
sparcv9_AS_XARCH= -xarch=v9 |
342 |
i386_AS_XARCH= |
|
343 |
amd64_AS_XARCH= -xarch=amd64 -P -Ui386 -U__i386 |
|
344 |
||
345 |
# |
|
346 |
# These flags define what we need to be 'standalone' i.e. -not- part |
|
347 |
# of the rather more cosy userland environment. This basically means |
|
348 |
# the kernel. |
|
349 |
# |
|
350 |
# XX64 future versions of gcc will make -mcmodel=kernel imply -mno-red-zone |
|
351 |
# |
|
580 | 352 |
sparc_STAND_FLAGS= -_gcc=-ffreestanding |
353 |
sparcv9_STAND_FLAGS= -_gcc=-ffreestanding |
|
0 | 354 |
i386_STAND_FLAGS= -_gcc=-ffreestanding |
7684
cdccab274861
6659940 ON makefiles use wrong options for Sun Studio 12 compiler and lint.
Nick Todd <Nick.Todd@Sun.COM>
parents:
7144
diff
changeset
|
355 |
amd64_STAND_FLAGS= -xmodel=kernel |
0 | 356 |
|
357 |
SAVEARGS= -Wu,-save_args |
|
358 |
amd64_STAND_FLAGS += $(SAVEARGS) |
|
359 |
||
360 |
STAND_FLAGS_32 = $($(MACH)_STAND_FLAGS) |
|
361 |
STAND_FLAGS_64 = $($(MACH64)_STAND_FLAGS) |
|
362 |
||
363 |
# |
|
364 |
# disable the incremental linker |
|
365 |
ILDOFF= -xildoff |
|
366 |
# |
|
367 |
XDEPEND= -xdepend |
|
5827 | 368 |
XFFLAG= -xF=%all |
0 | 369 |
XESS= -xs |
370 |
XSTRCONST= -xstrconst |
|
371 |
||
372 |
# |
|
373 |
# turn warnings into errors (C) |
|
374 |
CERRWARN = -errtags=yes -errwarn=%all |
|
375 |
CERRWARN += -erroff=E_EMPTY_TRANSLATION_UNIT |
|
376 |
CERRWARN += -erroff=E_STATEMENT_NOT_REACHED |
|
377 |
||
378 |
# |
|
379 |
# turn warnings into errors (C++) |
|
380 |
CCERRWARN= -xwe |
|
381 |
||
382 |
# C99 mode |
|
383 |
C99_ENABLE= -xc99=%all |
|
384 |
C99_DISABLE= -xc99=%none |
|
385 |
C99MODE= $(C99_DISABLE) |
|
65
590fbd3d0588
6289474 C99LMODE should derive automatically from C99MODE
mike_s
parents:
39
diff
changeset
|
386 |
C99LMODE= $(C99MODE:-xc99%=-Xc99%) |
0 | 387 |
|
388 |
# In most places, assignments to these macros should be appended with += |
|
389 |
# (CPPFLAGS.master allows values to be prepended to CPPFLAGS). |
|
2745
4634a7101488
6467071 mdb modules are not finding expected static declarations in userland objects
petede
parents:
2712
diff
changeset
|
390 |
sparc_CFLAGS= $(sparc_XARCH) $(CCSTATICSYM) |
2605
ec6c9a1440fb
6311077 Enabling ON compilation with Sun Studio 11 (Venus)
petede
parents:
2543
diff
changeset
|
391 |
sparcv9_CFLAGS= $(sparcv9_XARCH) -dalign $(CCVERBOSE) $(V9ABIWARN) $(CCREGSYM) \ |
ec6c9a1440fb
6311077 Enabling ON compilation with Sun Studio 11 (Venus)
petede
parents:
2543
diff
changeset
|
392 |
$(CCSTATICSYM) |
0 | 393 |
i386_CFLAGS= $(i386_XARCH) |
394 |
amd64_CFLAGS= $(amd64_XARCH) |
|
395 |
||
396 |
sparc_ASFLAGS= $(sparc_AS_XARCH) |
|
397 |
sparcv9_ASFLAGS=$(sparcv9_AS_XARCH) |
|
398 |
i386_ASFLAGS= $(i386_AS_XARCH) |
|
399 |
amd64_ASFLAGS= $(amd64_AS_XARCH) |
|
400 |
||
401 |
# |
|
402 |
sparc_COPTFLAG= -xO3 |
|
403 |
sparcv9_COPTFLAG= -xO3 |
|
404 |
i386_COPTFLAG= -O |
|
282
1ba7cc96bbc5
6305107 Reduction in optimisation level hurts performance
sherrym
parents:
224
diff
changeset
|
405 |
amd64_COPTFLAG= -xO3 |
0 | 406 |
|
407 |
COPTFLAG= $($(MACH)_COPTFLAG) |
|
408 |
COPTFLAG64= $($(MACH64)_COPTFLAG) |
|
409 |
||
410 |
# When -g is used, the compiler globalizes static objects |
|
411 |
# (gives them a unique prefix). Disable that. |
|
412 |
CNOGLOBAL= -W0,-noglobal |
|
413 |
||
2538
b5894d78c55a
5016095 nightly should help determine what really changes from build to build
esaxe
parents:
2437
diff
changeset
|
414 |
# Direct the Sun Studio compiler to use a static globalization prefix based on the |
b5894d78c55a
5016095 nightly should help determine what really changes from build to build
esaxe
parents:
2437
diff
changeset
|
415 |
# name of the module rather than something unique. Otherwise, objects |
b5894d78c55a
5016095 nightly should help determine what really changes from build to build
esaxe
parents:
2437
diff
changeset
|
416 |
# will not build deterministically, as subsequent compilations of identical |
b5894d78c55a
5016095 nightly should help determine what really changes from build to build
esaxe
parents:
2437
diff
changeset
|
417 |
# source will yeild objects that always look different. |
b5894d78c55a
5016095 nightly should help determine what really changes from build to build
esaxe
parents:
2437
diff
changeset
|
418 |
# |
b5894d78c55a
5016095 nightly should help determine what really changes from build to build
esaxe
parents:
2437
diff
changeset
|
419 |
# In the same spirit, this will also remove the date from the N_OPT stab. |
b5894d78c55a
5016095 nightly should help determine what really changes from build to build
esaxe
parents:
2437
diff
changeset
|
420 |
CGLOBALSTATIC= -W0,-xglobalstatic |
b5894d78c55a
5016095 nightly should help determine what really changes from build to build
esaxe
parents:
2437
diff
changeset
|
421 |
|
580 | 422 |
# Normally, gcc uses indirect DWARF strings to save space. However, |
423 |
# this causes relocations that ctfconvert cannot handle. Disable this. |
|
424 |
CDWARFSTR= -_gcc=-fno-dwarf2-indirect-strings |
|
425 |
||
426 |
# Sometimes we want all symbols and types in debugging information even |
|
427 |
# if they aren't used. |
|
428 |
CALLSYMS= -W0,-xdbggen=no%usedonly |
|
429 |
||
0 | 430 |
# |
2605
ec6c9a1440fb
6311077 Enabling ON compilation with Sun Studio 11 (Venus)
petede
parents:
2543
diff
changeset
|
431 |
# Default debug format for Sun Studio 11 is dwarf, so force it to |
ec6c9a1440fb
6311077 Enabling ON compilation with Sun Studio 11 (Venus)
petede
parents:
2543
diff
changeset
|
432 |
# generate stabs. |
ec6c9a1440fb
6311077 Enabling ON compilation with Sun Studio 11 (Venus)
petede
parents:
2543
diff
changeset
|
433 |
# |
ec6c9a1440fb
6311077 Enabling ON compilation with Sun Studio 11 (Venus)
petede
parents:
2543
diff
changeset
|
434 |
DEBUGFORMAT= -xdebugformat=stabs |
ec6c9a1440fb
6311077 Enabling ON compilation with Sun Studio 11 (Venus)
petede
parents:
2543
diff
changeset
|
435 |
|
ec6c9a1440fb
6311077 Enabling ON compilation with Sun Studio 11 (Venus)
petede
parents:
2543
diff
changeset
|
436 |
# |
0 | 437 |
# Flags used to build in debug mode for ctf generation. Bugs in the Devpro |
438 |
# compilers currently prevent us from building with cc-emitted DWARF. |
|
439 |
# |
|
580 | 440 |
CTF_FLAGS_sparc = -g -Wc,-Qiselect-T1 $(C99MODE) $(CNOGLOBAL) $(CDWARFSTR) |
441 |
CTF_FLAGS_i386 = -g $(C99MODE) $(CNOGLOBAL) $(CDWARFSTR) |
|
2605
ec6c9a1440fb
6311077 Enabling ON compilation with Sun Studio 11 (Venus)
petede
parents:
2543
diff
changeset
|
442 |
CTF_FLAGS = $(CTF_FLAGS_$(MACH)) $(DEBUGFORMAT) |
0 | 443 |
|
444 |
# |
|
445 |
# Flags used with genoffsets |
|
446 |
# |
|
224 | 447 |
GOFLAGS = -_noecho \ |
580 | 448 |
$(CALLSYMS) \ |
449 |
$(CDWARFSTR) |
|
0 | 450 |
|
451 |
OFFSETS_CREATE = $(GENOFFSETS) -s $(CTFSTABS) -r $(CTFCONVERT) \ |
|
452 |
$(CC) $(GOFLAGS) $(CFLAGS) $(CPPFLAGS) |
|
453 |
||
454 |
OFFSETS_CREATE64 = $(GENOFFSETS) -s $(CTFSTABS) -r $(CTFCONVERT) \ |
|
455 |
$(CC) $(GOFLAGS) $(CFLAGS64) $(CPPFLAGS) |
|
456 |
||
457 |
# |
|
458 |
# tradeoff time for space (smaller is better) |
|
459 |
# |
|
2605
ec6c9a1440fb
6311077 Enabling ON compilation with Sun Studio 11 (Venus)
petede
parents:
2543
diff
changeset
|
460 |
sparc_SPACEFLAG = -xspace -W0,-Lt |
ec6c9a1440fb
6311077 Enabling ON compilation with Sun Studio 11 (Venus)
petede
parents:
2543
diff
changeset
|
461 |
sparcv9_SPACEFLAG = -xspace -W0,-Lt |
0 | 462 |
i386_SPACEFLAG = -xspace |
463 |
amd64_SPACEFLAG = |
|
464 |
||
465 |
SPACEFLAG = $($(MACH)_SPACEFLAG) |
|
466 |
SPACEFLAG64 = $($(MACH64)_SPACEFLAG) |
|
467 |
||
2605
ec6c9a1440fb
6311077 Enabling ON compilation with Sun Studio 11 (Venus)
petede
parents:
2543
diff
changeset
|
468 |
# |
ec6c9a1440fb
6311077 Enabling ON compilation with Sun Studio 11 (Venus)
petede
parents:
2543
diff
changeset
|
469 |
# The Sun Studio 11 compiler has changed the behaviour of integer |
ec6c9a1440fb
6311077 Enabling ON compilation with Sun Studio 11 (Venus)
petede
parents:
2543
diff
changeset
|
470 |
# wrap arounds and so a flag is needed to use the legacy behaviour |
ec6c9a1440fb
6311077 Enabling ON compilation with Sun Studio 11 (Venus)
petede
parents:
2543
diff
changeset
|
471 |
# (without this flag panics/hangs could be exposed within the source). |
ec6c9a1440fb
6311077 Enabling ON compilation with Sun Studio 11 (Venus)
petede
parents:
2543
diff
changeset
|
472 |
# |
ec6c9a1440fb
6311077 Enabling ON compilation with Sun Studio 11 (Venus)
petede
parents:
2543
diff
changeset
|
473 |
sparc_IROPTFLAG = -W2,-xwrap_int |
ec6c9a1440fb
6311077 Enabling ON compilation with Sun Studio 11 (Venus)
petede
parents:
2543
diff
changeset
|
474 |
sparcv9_IROPTFLAG = -W2,-xwrap_int |
ec6c9a1440fb
6311077 Enabling ON compilation with Sun Studio 11 (Venus)
petede
parents:
2543
diff
changeset
|
475 |
i386_IROPTFLAG = |
ec6c9a1440fb
6311077 Enabling ON compilation with Sun Studio 11 (Venus)
petede
parents:
2543
diff
changeset
|
476 |
amd64_IROPTFLAG = |
ec6c9a1440fb
6311077 Enabling ON compilation with Sun Studio 11 (Venus)
petede
parents:
2543
diff
changeset
|
477 |
|
ec6c9a1440fb
6311077 Enabling ON compilation with Sun Studio 11 (Venus)
petede
parents:
2543
diff
changeset
|
478 |
IROPTFLAG = $($(MACH)_IROPTFLAG) |
ec6c9a1440fb
6311077 Enabling ON compilation with Sun Studio 11 (Venus)
petede
parents:
2543
diff
changeset
|
479 |
IROPTFLAG64 = $($(MACH64)_IROPTFLAG) |
ec6c9a1440fb
6311077 Enabling ON compilation with Sun Studio 11 (Venus)
petede
parents:
2543
diff
changeset
|
480 |
|
0 | 481 |
sparc_XREGSFLAG = -xregs=no%appl |
482 |
sparcv9_XREGSFLAG = -xregs=no%appl |
|
483 |
i386_XREGSFLAG = |
|
484 |
amd64_XREGSFLAG = |
|
485 |
||
486 |
XREGSFLAG = $($(MACH)_XREGSFLAG) |
|
487 |
XREGSFLAG64 = $($(MACH64)_XREGSFLAG) |
|
488 |
||
489 |
CFLAGS= $(COPTFLAG) $($(MACH)_CFLAGS) $(SPACEFLAG) $(CCMODE) \ |
|
2605
ec6c9a1440fb
6311077 Enabling ON compilation with Sun Studio 11 (Venus)
petede
parents:
2543
diff
changeset
|
490 |
$(ILDOFF) $(CERRWARN) $(C99MODE) $(CCUNBOUND) $(IROPTFLAG) \ |
2538
b5894d78c55a
5016095 nightly should help determine what really changes from build to build
esaxe
parents:
2437
diff
changeset
|
491 |
$(CGLOBALSTATIC) |
0 | 492 |
CFLAGS64= $(COPTFLAG64) $($(MACH64)_CFLAGS) $(SPACEFLAG64) $(CCMODE64) \ |
2605
ec6c9a1440fb
6311077 Enabling ON compilation with Sun Studio 11 (Venus)
petede
parents:
2543
diff
changeset
|
493 |
$(ILDOFF) $(CERRWARN) $(C99MODE) $(CCUNBOUND) $(IROPTFLAG64) \ |
2538
b5894d78c55a
5016095 nightly should help determine what really changes from build to build
esaxe
parents:
2437
diff
changeset
|
494 |
$(CGLOBALSTATIC) |
2605
ec6c9a1440fb
6311077 Enabling ON compilation with Sun Studio 11 (Venus)
petede
parents:
2543
diff
changeset
|
495 |
# |
ec6c9a1440fb
6311077 Enabling ON compilation with Sun Studio 11 (Venus)
petede
parents:
2543
diff
changeset
|
496 |
# Flags that are used to build parts of the code that are subsequently |
ec6c9a1440fb
6311077 Enabling ON compilation with Sun Studio 11 (Venus)
petede
parents:
2543
diff
changeset
|
497 |
# run on the build machine (also known as the NATIVE_BUILD). |
ec6c9a1440fb
6311077 Enabling ON compilation with Sun Studio 11 (Venus)
petede
parents:
2543
diff
changeset
|
498 |
# |
0 | 499 |
NATIVE_CFLAGS= $(COPTFLAG) $($(NATIVE_MACH)_CFLAGS) $(CCMODE) \ |
2538
b5894d78c55a
5016095 nightly should help determine what really changes from build to build
esaxe
parents:
2437
diff
changeset
|
500 |
$(ILDOFF) $(CERRWARN) $(C99MODE) $($(NATIVE_MACH)_CCUNBOUND) \ |
2605
ec6c9a1440fb
6311077 Enabling ON compilation with Sun Studio 11 (Venus)
petede
parents:
2543
diff
changeset
|
501 |
$(IROPTFLAG) $(CGLOBALSTATIC) |
0 | 502 |
|
503 |
DTEXTDOM=-DTEXT_DOMAIN=\"$(TEXT_DOMAIN)\" # For messaging. |
|
504 |
DTS_ERRNO=-D_TS_ERRNO |
|
505 |
CPPFLAGS.master=$(DTEXTDOM) $(DTS_ERRNO) \ |
|
506 |
$(ENVCPPFLAGS1) $(ENVCPPFLAGS2) $(ENVCPPFLAGS3) $(ENVCPPFLAGS4) |
|
13255
4afa820d78b9
298 SPARC build fails in smt_pause.o
Jon Tibble <meths@btinternet.com>
parents:
13187
diff
changeset
|
507 |
CPPFLAGS.native=$(ENVCPPFLAGS1) $(ENVCPPFLAGS2) $(ENVCPPFLAGS3) $(ENVCPPFLAGS4) |
0 | 508 |
CPPFLAGS= $(CPPFLAGS.master) |
509 |
AS_CPPFLAGS= $(CPPFLAGS.master) |
|
510 |
JAVAFLAGS= -deprecation |
|
511 |
||
512 |
# |
|
513 |
# For source message catalogue |
|
514 |
# |
|
515 |
.SUFFIXES: $(SUFFIXES) .i .po |
|
516 |
MSGROOT= $(ROOT)/catalog |
|
517 |
MSGDOMAIN= $(MSGROOT)/$(TEXT_DOMAIN) |
|
518 |
MSGDOMAINPOFILE = $(MSGDOMAIN)/$(POFILE) |
|
519 |
DCMSGDOMAIN= $(MSGROOT)/LC_TIME/$(TEXT_DOMAIN) |
|
520 |
DCMSGDOMAINPOFILE = $(DCMSGDOMAIN)/$(DCFILE:.dc=.po) |
|
521 |
||
522 |
CLOBBERFILES += $(POFILE) $(POFILES) |
|
523 |
COMPILE.cpp= $(CC) -E -C $(CFLAGS) $(CPPFLAGS) |
|
524 |
XGETTEXT= /usr/bin/xgettext |
|
525 |
XGETFLAGS= -c TRANSLATION_NOTE |
|
9396
f41cf682d0d3
PSARC/2009/204 ZFS user/group quotas & space accounting
Matthew Ahrens <Matthew.Ahrens@Sun.COM>
parents:
8731
diff
changeset
|
526 |
GNUXGETTEXT= /usr/gnu/bin/xgettext |
f41cf682d0d3
PSARC/2009/204 ZFS user/group quotas & space accounting
Matthew Ahrens <Matthew.Ahrens@Sun.COM>
parents:
8731
diff
changeset
|
527 |
GNUXGETFLAGS= --add-comments=TRANSLATION_NOTE --keyword=_ \ |
f41cf682d0d3
PSARC/2009/204 ZFS user/group quotas & space accounting
Matthew Ahrens <Matthew.Ahrens@Sun.COM>
parents:
8731
diff
changeset
|
528 |
--strict --no-location --omit-header |
0 | 529 |
BUILD.po= $(XGETTEXT) $(XGETFLAGS) -d $(<F) $<.i ;\ |
530 |
$(RM) $@ ;\ |
|
6350
aec7d1368710
6680948 ON could use some common Perl and Python build rules
carlsonj
parents:
5827
diff
changeset
|
531 |
$(SED) "/^domain/d" < $(<F).po > $@ ;\ |
0 | 532 |
$(RM) $(<F).po $<.i |
6350
aec7d1368710
6680948 ON could use some common Perl and Python build rules
carlsonj
parents:
5827
diff
changeset
|
533 |
|
0 | 534 |
# |
535 |
# This is overwritten by local Makefile when PROG is a list. |
|
536 |
# |
|
537 |
POFILE= $(PROG).po |
|
538 |
||
539 |
sparc_CCFLAGS= -cg92 -compat=4 \ |
|
540 |
-Qoption ccfe -messages=no%anachronism \ |
|
541 |
$(CCERRWARN) |
|
542 |
sparcv9_CCFLAGS= $(sparcv9_XARCH) -dalign -compat=5 \ |
|
543 |
-Qoption ccfe -messages=no%anachronism \ |
|
544 |
-Qoption ccfe -features=no%conststrings \ |
|
545 |
$(CCCREGSYM) \ |
|
546 |
$(CCERRWARN) |
|
547 |
i386_CCFLAGS= -compat=4 \ |
|
548 |
-Qoption ccfe -messages=no%anachronism \ |
|
549 |
-Qoption ccfe -features=no%conststrings \ |
|
550 |
$(CCERRWARN) |
|
551 |
amd64_CCFLAGS= $(amd64_XARCH) -compat=5 \ |
|
552 |
-Qoption ccfe -messages=no%anachronism \ |
|
553 |
-Qoption ccfe -features=no%conststrings \ |
|
554 |
$(CCERRWARN) |
|
555 |
||
556 |
sparc_CCOPTFLAG= -O |
|
557 |
sparcv9_CCOPTFLAG= -O |
|
558 |
i386_CCOPTFLAG= -O |
|
559 |
amd64_CCOPTFLAG= -O |
|
560 |
||
561 |
CCOPTFLAG= $($(MACH)_CCOPTFLAG) |
|
562 |
CCOPTFLAG64= $($(MACH64)_CCOPTFLAG) |
|
563 |
CCFLAGS= $(CCOPTFLAG) $($(MACH)_CCFLAGS) |
|
564 |
CCFLAGS64= $(CCOPTFLAG64) $($(MACH64)_CCFLAGS) |
|
4271
dda1ded496b7
6455532 OSNet cleanup required in preparation for direct bindings
rie
parents:
3667
diff
changeset
|
565 |
|
0 | 566 |
# |
10696
cd0f390dd9e2
PSARC 2008/672 thebe SAS/SATA driver
dh142964 <David.Hollister@Sun.COM>
parents:
10207
diff
changeset
|
567 |
# |
cd0f390dd9e2
PSARC 2008/672 thebe SAS/SATA driver
dh142964 <David.Hollister@Sun.COM>
parents:
10207
diff
changeset
|
568 |
# |
cd0f390dd9e2
PSARC 2008/672 thebe SAS/SATA driver
dh142964 <David.Hollister@Sun.COM>
parents:
10207
diff
changeset
|
569 |
ELFWRAP_FLAGS = |
cd0f390dd9e2
PSARC 2008/672 thebe SAS/SATA driver
dh142964 <David.Hollister@Sun.COM>
parents:
10207
diff
changeset
|
570 |
ELFWRAP_FLAGS64 = -64 |
cd0f390dd9e2
PSARC 2008/672 thebe SAS/SATA driver
dh142964 <David.Hollister@Sun.COM>
parents:
10207
diff
changeset
|
571 |
|
cd0f390dd9e2
PSARC 2008/672 thebe SAS/SATA driver
dh142964 <David.Hollister@Sun.COM>
parents:
10207
diff
changeset
|
572 |
# |
4271
dda1ded496b7
6455532 OSNet cleanup required in preparation for direct bindings
rie
parents:
3667
diff
changeset
|
573 |
# Various mapfiles that are used throughout the build, and delivered to |
dda1ded496b7
6455532 OSNet cleanup required in preparation for direct bindings
rie
parents:
3667
diff
changeset
|
574 |
# /usr/lib/ld. |
dda1ded496b7
6455532 OSNet cleanup required in preparation for direct bindings
rie
parents:
3667
diff
changeset
|
575 |
# |
12692
4341b447c069
6916796 OSnet mapfiles should use version 2 link-editor syntax
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
12216
diff
changeset
|
576 |
MAPFILE.NED_i386 = $(SRC)/common/mapfiles/common/map.noexdata |
4271
dda1ded496b7
6455532 OSNet cleanup required in preparation for direct bindings
rie
parents:
3667
diff
changeset
|
577 |
MAPFILE.NED_sparc = |
dda1ded496b7
6455532 OSNet cleanup required in preparation for direct bindings
rie
parents:
3667
diff
changeset
|
578 |
MAPFILE.NED = $(MAPFILE.NED_$(MACH)) |
12692
4341b447c069
6916796 OSnet mapfiles should use version 2 link-editor syntax
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
12216
diff
changeset
|
579 |
MAPFILE.PGA = $(SRC)/common/mapfiles/common/map.pagealign |
4271
dda1ded496b7
6455532 OSNet cleanup required in preparation for direct bindings
rie
parents:
3667
diff
changeset
|
580 |
MAPFILE.NES = $(SRC)/common/mapfiles/common/map.noexstk |
dda1ded496b7
6455532 OSNet cleanup required in preparation for direct bindings
rie
parents:
3667
diff
changeset
|
581 |
MAPFILE.FLT = $(SRC)/common/mapfiles/common/map.filter |
4947 | 582 |
MAPFILE.LEX = $(SRC)/common/mapfiles/common/map.lex.yy |
4271
dda1ded496b7
6455532 OSNet cleanup required in preparation for direct bindings
rie
parents:
3667
diff
changeset
|
583 |
|
dda1ded496b7
6455532 OSNet cleanup required in preparation for direct bindings
rie
parents:
3667
diff
changeset
|
584 |
# |
dda1ded496b7
6455532 OSNet cleanup required in preparation for direct bindings
rie
parents:
3667
diff
changeset
|
585 |
# Generated mapfiles that are compiler specific, and used throughout the |
dda1ded496b7
6455532 OSNet cleanup required in preparation for direct bindings
rie
parents:
3667
diff
changeset
|
586 |
# build. These mapfiles are not delivered in /usr/lib/ld. |
0 | 587 |
# |
4271
dda1ded496b7
6455532 OSNet cleanup required in preparation for direct bindings
rie
parents:
3667
diff
changeset
|
588 |
MAPFILE.NGB_sparc= $(SRC)/common/mapfiles/gen/sparc_cc_map.noexeglobs |
dda1ded496b7
6455532 OSNet cleanup required in preparation for direct bindings
rie
parents:
3667
diff
changeset
|
589 |
$(__GNUC64)MAPFILE.NGB_sparc= \ |
dda1ded496b7
6455532 OSNet cleanup required in preparation for direct bindings
rie
parents:
3667
diff
changeset
|
590 |
$(SRC)/common/mapfiles/gen/sparc_gcc_map.noexeglobs |
dda1ded496b7
6455532 OSNet cleanup required in preparation for direct bindings
rie
parents:
3667
diff
changeset
|
591 |
MAPFILE.NGB_sparcv9= $(SRC)/common/mapfiles/gen/sparcv9_cc_map.noexeglobs |
dda1ded496b7
6455532 OSNet cleanup required in preparation for direct bindings
rie
parents:
3667
diff
changeset
|
592 |
$(__GNUC64)MAPFILE.NGB_sparcv9= \ |
dda1ded496b7
6455532 OSNet cleanup required in preparation for direct bindings
rie
parents:
3667
diff
changeset
|
593 |
$(SRC)/common/mapfiles/gen/sparcv9_gcc_map.noexeglobs |
dda1ded496b7
6455532 OSNet cleanup required in preparation for direct bindings
rie
parents:
3667
diff
changeset
|
594 |
MAPFILE.NGB_i386= $(SRC)/common/mapfiles/gen/i386_cc_map.noexeglobs |
dda1ded496b7
6455532 OSNet cleanup required in preparation for direct bindings
rie
parents:
3667
diff
changeset
|
595 |
$(__GNUC64)MAPFILE.NGB_i386= \ |
dda1ded496b7
6455532 OSNet cleanup required in preparation for direct bindings
rie
parents:
3667
diff
changeset
|
596 |
$(SRC)/common/mapfiles/gen/i386_gcc_map.noexeglobs |
dda1ded496b7
6455532 OSNet cleanup required in preparation for direct bindings
rie
parents:
3667
diff
changeset
|
597 |
MAPFILE.NGB_amd64= $(SRC)/common/mapfiles/gen/amd64_cc_map.noexeglobs |
dda1ded496b7
6455532 OSNet cleanup required in preparation for direct bindings
rie
parents:
3667
diff
changeset
|
598 |
$(__GNUC64)MAPFILE.NGB_amd64= \ |
dda1ded496b7
6455532 OSNet cleanup required in preparation for direct bindings
rie
parents:
3667
diff
changeset
|
599 |
$(SRC)/common/mapfiles/gen/amd64_gcc_map.noexeglobs |
dda1ded496b7
6455532 OSNet cleanup required in preparation for direct bindings
rie
parents:
3667
diff
changeset
|
600 |
MAPFILE.NGB = $(MAPFILE.NGB_$(MACH)) |
dda1ded496b7
6455532 OSNet cleanup required in preparation for direct bindings
rie
parents:
3667
diff
changeset
|
601 |
|
0 | 602 |
# |
4271
dda1ded496b7
6455532 OSNet cleanup required in preparation for direct bindings
rie
parents:
3667
diff
changeset
|
603 |
# A generic interface mapfile name, used by various dynamic objects to define |
dda1ded496b7
6455532 OSNet cleanup required in preparation for direct bindings
rie
parents:
3667
diff
changeset
|
604 |
# the interfaces and interposers the object must export. |
dda1ded496b7
6455532 OSNet cleanup required in preparation for direct bindings
rie
parents:
3667
diff
changeset
|
605 |
# |
dda1ded496b7
6455532 OSNet cleanup required in preparation for direct bindings
rie
parents:
3667
diff
changeset
|
606 |
MAPFILE.INT = mapfile-intf |
dda1ded496b7
6455532 OSNet cleanup required in preparation for direct bindings
rie
parents:
3667
diff
changeset
|
607 |
|
0 | 608 |
# |
609 |
# LDLIBS32 can be set in the environment to override the following assignment. |
|
610 |
# LDLIBS64 can be set to override the assignment made in Makefile.master.64. |
|
611 |
# These environment settings make sure that no libraries are searched outside |
|
612 |
# of the local workspace proto area: |
|
613 |
# LDLIBS32=-YP,$ROOT/lib:$ROOT/usr/lib |
|
614 |
# LDLIBS64=-YP,$ROOT/lib/$MACH64:$ROOT/usr/lib/$MACH64 |
|
615 |
# |
|
616 |
LDLIBS32 = $(ENVLDLIBS1) $(ENVLDLIBS2) $(ENVLDLIBS3) |
|
617 |
LDLIBS.cmd = $(LDLIBS32) |
|
618 |
LDLIBS.lib = $(LDLIBS32) |
|
619 |
# |
|
620 |
# Define compilation macros. |
|
621 |
# |
|
622 |
COMPILE.c= $(CC) $(CFLAGS) $(CPPFLAGS) -c |
|
623 |
COMPILE64.c= $(CC) $(CFLAGS64) $(CPPFLAGS) -c |
|
624 |
COMPILE.cc= $(CCC) $(CCFLAGS) $(CPPFLAGS) -c |
|
625 |
COMPILE64.cc= $(CCC) $(CCFLAGS64) $(CPPFLAGS) -c |
|
626 |
COMPILE.s= $(AS) $(ASFLAGS) $(AS_CPPFLAGS) |
|
627 |
COMPILE64.s= $(AS) $(ASFLAGS) $($(MACH64)_AS_XARCH) $(AS_CPPFLAGS) |
|
628 |
COMPILE.d= $(DTRACE) -G -32 |
|
629 |
COMPILE64.d= $(DTRACE) -G -64 |
|
10696
cd0f390dd9e2
PSARC 2008/672 thebe SAS/SATA driver
dh142964 <David.Hollister@Sun.COM>
parents:
10207
diff
changeset
|
630 |
COMPILE.b= $(ELFWRAP) $(ELFWRAP_FLAGS$(CLASS)) |
cd0f390dd9e2
PSARC 2008/672 thebe SAS/SATA driver
dh142964 <David.Hollister@Sun.COM>
parents:
10207
diff
changeset
|
631 |
COMPILE64.b= $(ELFWRAP) $(ELFWRAP_FLAGS$(CLASS)) |
0 | 632 |
|
633 |
CLASSPATH= . |
|
634 |
COMPILE.java= $(JAVAC) $(JAVAFLAGS) -classpath $(CLASSPATH) |
|
635 |
||
636 |
# |
|
637 |
# Link time macros |
|
638 |
# |
|
639 |
CCNEEDED = -lC |
|
411
ae71859f7fc8
6302154 fix for 6297567 introduces some undesirable output changes
wesolows
parents:
376
diff
changeset
|
640 |
$(__GNUC)CCNEEDED = -L$(SFWLIBDIR) -R$(SFWLIBDIR) -lstdc++ -lgcc_s |
0 | 641 |
|
642 |
LINK.c= $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) |
|
643 |
LINK64.c= $(CC) $(CFLAGS64) $(CPPFLAGS) $(LDFLAGS) |
|
644 |
NORUNPATH= -norunpath -nolib |
|
645 |
LINK.cc= $(CCC) $(CCFLAGS) $(CPPFLAGS) $(NORUNPATH) \ |
|
646 |
$(LDFLAGS) $(CCNEEDED) |
|
647 |
LINK64.cc= $(CCC) $(CCFLAGS64) $(CPPFLAGS) $(NORUNPATH) \ |
|
648 |
$(LDFLAGS) $(CCNEEDED) |
|
649 |
||
650 |
# |
|
651 |
# lint macros |
|
652 |
# |
|
653 |
# Note that the undefine of __PRAGMA_REDEFINE_EXTNAME can be removed once |
|
654 |
# ON is built with a version of lint that has the fix for 4484186. |
|
655 |
# |
|
656 |
ALWAYS_LINT_DEFS = -errtags=yes -s |
|
657 |
ALWAYS_LINT_DEFS += -erroff=E_PTRDIFF_OVERFLOW |
|
658 |
ALWAYS_LINT_DEFS += -erroff=E_ASSIGN_NARROW_CONV |
|
659 |
ALWAYS_LINT_DEFS += -U__PRAGMA_REDEFINE_EXTNAME |
|
660 |
ALWAYS_LINT_DEFS += $(C99LMODE) |
|
661 |
ALWAYS_LINT_DEFS += -errsecurity=$(SECLEVEL) |
|
662 |
ALWAYS_LINT_DEFS += -erroff=E_SEC_CREAT_WITHOUT_EXCL |
|
663 |
ALWAYS_LINT_DEFS += -erroff=E_SEC_FORBIDDEN_WARN_CREAT |
|
664 |
# XX64 -- really only needed for amd64 lint |
|
665 |
ALWAYS_LINT_DEFS += -erroff=E_ASSIGN_INT_TO_SMALL_INT |
|
666 |
ALWAYS_LINT_DEFS += -erroff=E_CAST_INT_CONST_TO_SMALL_INT |
|
667 |
ALWAYS_LINT_DEFS += -erroff=E_CAST_INT_TO_SMALL_INT |
|
668 |
ALWAYS_LINT_DEFS += -erroff=E_CAST_TO_PTR_FROM_INT |
|
669 |
ALWAYS_LINT_DEFS += -erroff=E_COMP_INT_WITH_LARGE_INT |
|
670 |
ALWAYS_LINT_DEFS += -erroff=E_INTEGRAL_CONST_EXP_EXPECTED |
|
671 |
ALWAYS_LINT_DEFS += -erroff=E_PASS_INT_TO_SMALL_INT |
|
672 |
ALWAYS_LINT_DEFS += -erroff=E_PTR_CONV_LOSES_BITS |
|
673 |
||
8731
accad831e993
4875943 NOTE() lint directives don't work in ON
James Carlson <james.d.carlson@sun.com>
parents:
7887
diff
changeset
|
674 |
# This forces lint to pick up note.h and sys/note.h from Devpro rather than |
accad831e993
4875943 NOTE() lint directives don't work in ON
James Carlson <james.d.carlson@sun.com>
parents:
7887
diff
changeset
|
675 |
# from the proto area. The note.h that ON delivers would disable NOTE(). |
accad831e993
4875943 NOTE() lint directives don't work in ON
James Carlson <james.d.carlson@sun.com>
parents:
7887
diff
changeset
|
676 |
ONLY_LINT_DEFS = -I$(SPRO_VROOT)/prod/include/lint |
accad831e993
4875943 NOTE() lint directives don't work in ON
James Carlson <james.d.carlson@sun.com>
parents:
7887
diff
changeset
|
677 |
|
0 | 678 |
SECLEVEL= core |
8731
accad831e993
4875943 NOTE() lint directives don't work in ON
James Carlson <james.d.carlson@sun.com>
parents:
7887
diff
changeset
|
679 |
LINT.c= $(LINT) $(ONLY_LINT_DEFS) $(LINTFLAGS) $(CPPFLAGS) \ |
accad831e993
4875943 NOTE() lint directives don't work in ON
James Carlson <james.d.carlson@sun.com>
parents:
7887
diff
changeset
|
680 |
$(ALWAYS_LINT_DEFS) |
accad831e993
4875943 NOTE() lint directives don't work in ON
James Carlson <james.d.carlson@sun.com>
parents:
7887
diff
changeset
|
681 |
LINT64.c= $(LINT) $(ONLY_LINT_DEFS) $(LINTFLAGS64) $(CPPFLAGS) \ |
accad831e993
4875943 NOTE() lint directives don't work in ON
James Carlson <james.d.carlson@sun.com>
parents:
7887
diff
changeset
|
682 |
$(ALWAYS_LINT_DEFS) |
0 | 683 |
LINT.s= $(LINT.c) |
684 |
||
685 |
# For some future builds, NATIVE_MACH and MACH might be different. |
|
686 |
# Therefore, NATIVE_MACH needs to be redefined in the |
|
687 |
# environment as `uname -p` to override this macro. |
|
688 |
# |
|
689 |
# For now at least, we cross-compile amd64 on i386 machines. |
|
690 |
NATIVE_MACH= $(MACH:amd64=i386) |
|
691 |
||
692 |
# Define native compilation macros |
|
693 |
# |
|
694 |
||
695 |
# Base directory where compilers are loaded. |
|
696 |
# Defined here so it can be overridden by developer. |
|
697 |
# |
|
698 |
SPRO_ROOT= $(BUILD_TOOLS)/SUNWspro |
|
7684
cdccab274861
6659940 ON makefiles use wrong options for Sun Studio 12 compiler and lint.
Nick Todd <Nick.Todd@Sun.COM>
parents:
7144
diff
changeset
|
699 |
SPRO_VROOT= $(SPRO_ROOT)/SS12 |
0 | 700 |
GNU_ROOT= $(SFW_ROOT) |
701 |
||
11921
74c9e6232edb
6934378 ss12u1 lint should be picked up by default rather than driven through developer script
Surya Prakki <Surya.Prakki@Sun.COM>
parents:
11838
diff
changeset
|
702 |
# Till SS12u1 formally becomes the NV CBE, LINT is hard |
74c9e6232edb
6934378 ss12u1 lint should be picked up by default rather than driven through developer script
Surya Prakki <Surya.Prakki@Sun.COM>
parents:
11838
diff
changeset
|
703 |
# coded to be picked up from the $SPRO_ROOT/sunstudio12.1/ |
74c9e6232edb
6934378 ss12u1 lint should be picked up by default rather than driven through developer script
Surya Prakki <Surya.Prakki@Sun.COM>
parents:
11838
diff
changeset
|
704 |
# location. Impacted variables are sparc_LINT, sparcv9_LINT, |
74c9e6232edb
6934378 ss12u1 lint should be picked up by default rather than driven through developer script
Surya Prakki <Surya.Prakki@Sun.COM>
parents:
11838
diff
changeset
|
705 |
# i386_LINT, amd64_LINT. |
74c9e6232edb
6934378 ss12u1 lint should be picked up by default rather than driven through developer script
Surya Prakki <Surya.Prakki@Sun.COM>
parents:
11838
diff
changeset
|
706 |
# Reset them when SS12u1 is rolled out. |
74c9e6232edb
6934378 ss12u1 lint should be picked up by default rather than driven through developer script
Surya Prakki <Surya.Prakki@Sun.COM>
parents:
11838
diff
changeset
|
707 |
# |
74c9e6232edb
6934378 ss12u1 lint should be picked up by default rather than driven through developer script
Surya Prakki <Surya.Prakki@Sun.COM>
parents:
11838
diff
changeset
|
708 |
|
0 | 709 |
# Specify platform compiler versions for languages |
710 |
# that we use (currently only c and c++). |
|
711 |
# |
|
224 | 712 |
sparc_CC= $(ONBLD_TOOLS)/bin/$(MACH)/cw -_cc |
713 |
$(__GNUC)sparc_CC= $(ONBLD_TOOLS)/bin/$(MACH)/cw -_gcc |
|
714 |
sparc_CCC= $(ONBLD_TOOLS)/bin/$(MACH)/cw -_CC |
|
715 |
$(__GNUC)sparc_CCC= $(ONBLD_TOOLS)/bin/$(MACH)/cw -_g++ |
|
0 | 716 |
sparc_CPP= /usr/ccs/lib/cpp |
717 |
sparc_AS= /usr/ccs/bin/as -xregsym=no |
|
718 |
sparc_LD= /usr/ccs/bin/ld |
|
11921
74c9e6232edb
6934378 ss12u1 lint should be picked up by default rather than driven through developer script
Surya Prakki <Surya.Prakki@Sun.COM>
parents:
11838
diff
changeset
|
719 |
sparc_LINT= $(SPRO_ROOT)/sunstudio12.1/bin/lint |
0 | 720 |
|
224 | 721 |
sparcv9_CC= $(ONBLD_TOOLS)/bin/$(MACH)/cw -_cc |
722 |
$(__GNUC64)sparcv9_CC= $(ONBLD_TOOLS)/bin/$(MACH)/cw -_gcc |
|
723 |
sparcv9_CCC= $(ONBLD_TOOLS)/bin/$(MACH)/cw -_CC |
|
724 |
$(__GNUC64)sparcv9_CCC= $(ONBLD_TOOLS)/bin/$(MACH)/cw -_g++ |
|
0 | 725 |
sparcv9_CPP= /usr/ccs/lib/cpp |
726 |
sparcv9_AS= /usr/ccs/bin/as -xregsym=no |
|
727 |
sparcv9_LD= /usr/ccs/bin/ld |
|
11921
74c9e6232edb
6934378 ss12u1 lint should be picked up by default rather than driven through developer script
Surya Prakki <Surya.Prakki@Sun.COM>
parents:
11838
diff
changeset
|
728 |
sparcv9_LINT= $(SPRO_ROOT)/sunstudio12.1/bin/lint |
0 | 729 |
|
730 |
# We compile 32-bit objects with cc by default |
|
731 |
i386_CC= $(ONBLD_TOOLS)/bin/$(MACH)/cw -_cc |
|
732 |
$(__GNUC)i386_CC= $(ONBLD_TOOLS)/bin/$(MACH)/cw -_gcc |
|
733 |
i386_CCC= $(ONBLD_TOOLS)/bin/$(MACH)/cw -_CC |
|
734 |
$(__GNUC)i386_CCC= $(ONBLD_TOOLS)/bin/$(MACH)/cw -_g++ |
|
735 |
i386_CPP= /usr/ccs/lib/cpp |
|
736 |
i386_AS= /usr/ccs/bin/as |
|
737 |
$(__GNUC)i386_AS= $(ONBLD_TOOLS)/bin/$(MACH)/aw |
|
738 |
i386_LD= /usr/ccs/bin/ld |
|
11921
74c9e6232edb
6934378 ss12u1 lint should be picked up by default rather than driven through developer script
Surya Prakki <Surya.Prakki@Sun.COM>
parents:
11838
diff
changeset
|
739 |
i386_LINT= $(SPRO_ROOT)/sunstudio12.1/bin/lint |
0 | 740 |
|
741 |
# We compile 64-bit objects with gcc |
|
742 |
amd64_CC= $(ONBLD_TOOLS)/bin/$(MACH)/cw -_cc |
|
743 |
$(__GNUC64)amd64_CC= $(ONBLD_TOOLS)/bin/$(MACH)/cw -_gcc |
|
744 |
amd64_CCC= $(ONBLD_TOOLS)/bin/$(MACH)/cw -_CC |
|
745 |
$(__GNUC64)amd64_CCC= $(ONBLD_TOOLS)/bin/$(MACH)/cw -_g++ |
|
746 |
amd64_CPP= /usr/ccs/lib/cpp |
|
747 |
amd64_AS= $(ONBLD_TOOLS)/bin/$(MACH)/aw |
|
748 |
amd64_LD= /usr/ccs/bin/ld |
|
11921
74c9e6232edb
6934378 ss12u1 lint should be picked up by default rather than driven through developer script
Surya Prakki <Surya.Prakki@Sun.COM>
parents:
11838
diff
changeset
|
749 |
amd64_LINT= $(SPRO_ROOT)/sunstudio12.1/bin/lint |
0 | 750 |
|
751 |
NATIVECC= $($(NATIVE_MACH)_CC) |
|
752 |
NATIVECCC= $($(NATIVE_MACH)_CCC) |
|
753 |
NATIVECPP= $($(NATIVE_MACH)_CPP) |
|
754 |
NATIVEAS= $($(NATIVE_MACH)_AS) |
|
755 |
NATIVELD= $($(NATIVE_MACH)_LD) |
|
756 |
NATIVELINT= $($(NATIVE_MACH)_LINT) |
|
757 |
||
758 |
# |
|
759 |
# Makefile.master.64 overrides these settings |
|
760 |
# |
|
761 |
CC= $(NATIVECC) |
|
762 |
CCC= $(NATIVECCC) |
|
763 |
CPP= $(NATIVECPP) |
|
764 |
AS= $(NATIVEAS) |
|
765 |
LD= $(NATIVELD) |
|
766 |
LINT= $(NATIVELINT) |
|
767 |
||
580 | 768 |
# The real compilers used for this build |
769 |
CW_CC_CMD= $(CC) -_compiler |
|
770 |
CW_CCC_CMD= $(CCC) -_compiler |
|
771 |
REAL_CC= $(CW_CC_CMD:sh) |
|
772 |
REAL_CCC= $(CW_CCC_CMD:sh) |
|
773 |
||
0 | 774 |
# Pass -Y flag to cpp (method of which is release-dependent) |
775 |
CCYFLAG= -Y I, |
|
776 |
||
777 |
BDIRECT= -Bdirect |
|
778 |
BDYNAMIC= -Bdynamic |
|
779 |
BLOCAL= -Blocal |
|
4271
dda1ded496b7
6455532 OSNet cleanup required in preparation for direct bindings
rie
parents:
3667
diff
changeset
|
780 |
BNODIRECT= -Bnodirect |
0 | 781 |
BREDUCE= -Breduce |
782 |
BSTATIC= -Bstatic |
|
783 |
||
784 |
ZDEFS= -zdefs |
|
4271
dda1ded496b7
6455532 OSNet cleanup required in preparation for direct bindings
rie
parents:
3667
diff
changeset
|
785 |
ZDIRECT= -zdirect |
0 | 786 |
ZIGNORE= -zignore |
787 |
ZINITFIRST= -zinitfirst |
|
788 |
ZINTERPOSE= -zinterpose |
|
789 |
ZLAZYLOAD= -zlazyload |
|
790 |
ZLOADFLTR= -zloadfltr |
|
791 |
ZMULDEFS= -zmuldefs |
|
792 |
ZNODEFAULTLIB= -znodefaultlib |
|
793 |
ZNODEFS= -znodefs |
|
794 |
ZNODELETE= -znodelete |
|
795 |
ZNODLOPEN= -znodlopen |
|
796 |
ZNODUMP= -znodump |
|
797 |
ZNOLAZYLOAD= -znolazyload |
|
9569
5657927bc642
6806791 filter builds could be optimized
Rod Evans <Rod.Evans@Sun.COM>
parents:
9507
diff
changeset
|
798 |
ZNOLDYNSYM= -znoldynsym |
580 | 799 |
ZNORELOC= -znoreloc |
0 | 800 |
ZNOVERSION= -znoversion |
5827 | 801 |
ZRECORD= -zrecord |
0 | 802 |
ZREDLOCSYM= -zredlocsym |
803 |
ZTEXT= -ztext |
|
4271
dda1ded496b7
6455532 OSNet cleanup required in preparation for direct bindings
rie
parents:
3667
diff
changeset
|
804 |
ZVERBOSE= -zverbose |
0 | 805 |
|
806 |
GSHARED= -G |
|
807 |
CCMT= -mt |
|
808 |
||
809 |
# Handle different PIC models on different ISAs |
|
810 |
# (May be overridden by lower-level Makefiles) |
|
811 |
||
812 |
sparc_C_PICFLAGS = -K pic |
|
813 |
sparcv9_C_PICFLAGS = -K pic |
|
814 |
i386_C_PICFLAGS = -K pic |
|
815 |
amd64_C_PICFLAGS = -K pic |
|
816 |
C_PICFLAGS = $($(MACH)_C_PICFLAGS) |
|
817 |
C_PICFLAGS64 = $($(MACH64)_C_PICFLAGS) |
|
818 |
||
819 |
sparc_C_BIGPICFLAGS = -K PIC |
|
820 |
sparcv9_C_BIGPICFLAGS = -K PIC |
|
821 |
i386_C_BIGPICFLAGS = -K PIC |
|
822 |
amd64_C_BIGPICFLAGS = -K PIC |
|
823 |
C_BIGPICFLAGS = $($(MACH)_C_BIGPICFLAGS) |
|
824 |
C_BIGPICFLAGS64 = $($(MACH64)_C_BIGPICFLAGS) |
|
825 |
||
826 |
# CC requires there to be no space between '-K' and 'pic' or 'PIC'. |
|
827 |
sparc_CC_PICFLAGS = -Kpic |
|
828 |
sparcv9_CC_PICFLAGS = -KPIC |
|
829 |
i386_CC_PICFLAGS = -Kpic |
|
830 |
amd64_CC_PICFLAGS = -Kpic |
|
831 |
CC_PICFLAGS = $($(MACH)_CC_PICFLAGS) |
|
832 |
CC_PICFLAGS64 = $($(MACH64)_CC_PICFLAGS) |
|
833 |
||
834 |
AS_PICFLAGS= $(C_PICFLAGS) |
|
835 |
AS_BIGPICFLAGS= $(C_BIGPICFLAGS) |
|
836 |
||
837 |
# |
|
838 |
# Default label for CTF sections |
|
839 |
# |
|
840 |
CTFCVTFLAGS= -i -L VERSION |
|
841 |
||
842 |
# |
|
843 |
# Override to pass module-specific flags to ctfmerge. Currently used |
|
844 |
# only by krtld to turn on fuzzy matching. |
|
845 |
# |
|
846 |
CTFMRGFLAGS= |
|
847 |
||
848 |
CTFCONVERT_O = $(CTFCONVERT) $(CTFCVTFLAGS) $@ |
|
849 |
||
850 |
ELFSIGN_O= $(TRUE) |
|
851 |
ELFSIGN_CRYPTO= $(ELFSIGN_O) |
|
852 |
ELFSIGN_OBJECT= $(ELFSIGN_O) |
|
1167 | 853 |
$(EXPORT_RELEASE_BUILD)ELFSIGN_O = $(ELFSIGN) |
3667
089a83b5d0bc
6391249 elfsign needs to support Verisign certificate chain
johnz
parents:
3466
diff
changeset
|
854 |
$(EXPORT_RELEASE_BUILD)ELFSIGN_CFNAME = SUNWosnetCF |
1167 | 855 |
$(EXPORT_RELEASE_BUILD)ELFSIGN_KEY = \ |
3667
089a83b5d0bc
6391249 elfsign needs to support Verisign certificate chain
johnz
parents:
3466
diff
changeset
|
856 |
$(CLOSED)/cmd/cmd-crypto/etc/keys/$(ELFSIGN_CFNAME) |
1167 | 857 |
$(EXPORT_RELEASE_BUILD)ELFSIGN_CERT= \ |
3667
089a83b5d0bc
6391249 elfsign needs to support Verisign certificate chain
johnz
parents:
3466
diff
changeset
|
858 |
$(CLOSED)/cmd/cmd-crypto/etc/certs/$(ELFSIGN_CFNAME) |
089a83b5d0bc
6391249 elfsign needs to support Verisign certificate chain
johnz
parents:
3466
diff
changeset
|
859 |
$(EXPORT_RELEASE_BUILD)ELFSIGN_SENAME = SUNWosnetSE |
1167 | 860 |
$(EXPORT_RELEASE_BUILD)ELFSIGN_SEKEY = \ |
3667
089a83b5d0bc
6391249 elfsign needs to support Verisign certificate chain
johnz
parents:
3466
diff
changeset
|
861 |
$(CLOSED)/cmd/cmd-crypto/etc/keys/$(ELFSIGN_SENAME) |
1167 | 862 |
$(EXPORT_RELEASE_BUILD)ELFSIGN_SECERT= \ |
3667
089a83b5d0bc
6391249 elfsign needs to support Verisign certificate chain
johnz
parents:
3466
diff
changeset
|
863 |
$(CLOSED)/cmd/cmd-crypto/etc/certs/$(ELFSIGN_SENAME) |
1167 | 864 |
$(EXPORT_RELEASE_BUILD)ELFSIGN_CRYPTO= $(ELFSIGN_O) sign \ |
865 |
$(ELFSIGN_FORMAT_OPTION) \ |
|
0 | 866 |
-k $(ELFSIGN_KEY) -c $(ELFSIGN_CERT) -e $@ |
1167 | 867 |
$(EXPORT_RELEASE_BUILD)ELFSIGN_OBJECT= $(ELFSIGN_O) sign \ |
868 |
$(ELFSIGN_FORMAT_OPTION) \ |
|
0 | 869 |
-k $(ELFSIGN_SEKEY) -c $(ELFSIGN_SECERT) -e $@ |
870 |
||
871 |
# Rules (normally from make.rules) and macros which are used for post |
|
872 |
# processing files. Normally, these do stripping of the comment section |
|
873 |
# automatically. |
|
874 |
# RELEASE_CM: Should be editted to reflect the release. |
|
875 |
# POST_PROCESS_O: Post-processing for `.o' files. |
|
876 |
# POST_PROCESS_A: Post-processing for `.a' files (currently null). |
|
877 |
# POST_PROCESS_SO: Post-processing for `.so' files. |
|
878 |
# POST_PROCESS: Post-processing for executable files (no suffix). |
|
879 |
# Note that these macros are not completely generalized as they are to be |
|
880 |
# used with the file name to be processed following. |
|
881 |
# |
|
882 |
# It is left as an exercise to Release Engineering to embellish the generation |
|
883 |
# of the release comment string. |
|
884 |
# |
|
885 |
# If this is a standard development build: |
|
886 |
# compress the comment section (mcs -c) |
|
887 |
# add the standard comment (mcs -a $(RELEASE_CM)) |
|
888 |
# add the development specific comment (mcs -a $(DEV_CM)) |
|
889 |
# |
|
890 |
# If this is an installation build: |
|
891 |
# delete the comment section (mcs -d) |
|
892 |
# add the standard comment (mcs -a $(RELEASE_CM)) |
|
893 |
# add the development specific comment (mcs -a $(DEV_CM)) |
|
894 |
# |
|
895 |
# If this is an release build: |
|
896 |
# delete the comment section (mcs -d) |
|
897 |
# add the standard comment (mcs -a $(RELEASE_CM)) |
|
898 |
# |
|
899 |
# The following list of macros are used in the definition of RELEASE_CM |
|
900 |
# which is used to label all binaries in the build: |
|
901 |
# |
|
902 |
# RELEASE Specific release of the build, eg: 5.2 |
|
5303
97e95cb2f469
6599659 Makefiles shouldn't have to tear $(RELEASE) apart
meem
parents:
5184
diff
changeset
|
903 |
# RELEASE_MAJOR Major version number part of $(RELEASE) |
97e95cb2f469
6599659 Makefiles shouldn't have to tear $(RELEASE) apart
meem
parents:
5184
diff
changeset
|
904 |
# RELEASE_MINOR Minor version number part of $(RELEASE) |
0 | 905 |
# VERSION Version of the build (alpha, beta, Generic) |
906 |
# PATCHID If this is a patch this value should contain |
|
907 |
# the patchid value (eg: "Generic 100832-01"), otherwise |
|
908 |
# it will be set to $(VERSION) |
|
909 |
# RELEASE_DATE Date of the Release Build |
|
910 |
# PATCH_DATE Date the patch was created, if this is blank it |
|
911 |
# will default to the RELEASE_DATE |
|
912 |
# |
|
5303
97e95cb2f469
6599659 Makefiles shouldn't have to tear $(RELEASE) apart
meem
parents:
5184
diff
changeset
|
913 |
RELEASE_MAJOR= 5 |
97e95cb2f469
6599659 Makefiles shouldn't have to tear $(RELEASE) apart
meem
parents:
5184
diff
changeset
|
914 |
RELEASE_MINOR= 11 |
97e95cb2f469
6599659 Makefiles shouldn't have to tear $(RELEASE) apart
meem
parents:
5184
diff
changeset
|
915 |
RELEASE= $(RELEASE_MAJOR).$(RELEASE_MINOR) |
0 | 916 |
VERSION= SunOS Development |
917 |
PATCHID= $(VERSION) |
|
10738
6cd5e5169fec
6880460 some root-build bits were missed by 6864230
jmcp <James.McPherson@Sun.COM>
parents:
10696
diff
changeset
|
918 |
RELEASE_DATE= release date not set |
0 | 919 |
PATCH_DATE= $(RELEASE_DATE) |
920 |
RELEASE_CM= "@($(POUND_SIGN))SunOS $(RELEASE) $(PATCHID) $(PATCH_DATE)" |
|
10738
6cd5e5169fec
6880460 some root-build bits were missed by 6864230
jmcp <James.McPherson@Sun.COM>
parents:
10696
diff
changeset
|
921 |
DEV_CM= "@($(POUND_SIGN))SunOS Internal Development: non-nightly build" |
0 | 922 |
|
923 |
PROCESS_COMMENT= @?${MCS} -c -a $(RELEASE_CM) -a $(DEV_CM) |
|
924 |
$(STRIP_COMMENTS)PROCESS_COMMENT= @?${MCS} -d -a $(RELEASE_CM) -a $(DEV_CM) |
|
925 |
$(RELEASE_BUILD)PROCESS_COMMENT= @?${MCS} -d -a $(RELEASE_CM) |
|
926 |
||
927 |
STRIP_STABS= : |
|
928 |
$(RELEASE_BUILD)STRIP_STABS= $(STRIP) -x $@ |
|
929 |
||
930 |
POST_PROCESS_O= $(PROCESS_COMMENT) $@ |
|
931 |
POST_PROCESS_A= |
|
932 |
POST_PROCESS_SO= $(PROCESS_COMMENT) $@ ; $(STRIP_STABS) ; \ |
|
933 |
$(ELFSIGN_OBJECT) |
|
524 | 934 |
POST_PROCESS= $(PROCESS_COMMENT) $@ ; $(STRIP_STABS) ; \ |
935 |
$(ELFSIGN_OBJECT) |
|
0 | 936 |
|
937 |
# |
|
9507
e6271d3ec9f2
6831697 tool to check sun4u bootable modules for reoccurrence of 6828121 needed
Jerry Gilliam <Jerry.Gilliam@Sun.COM>
parents:
9396
diff
changeset
|
938 |
# chk4ubin is a tool that inspects a module for a symbol table |
e6271d3ec9f2
6831697 tool to check sun4u bootable modules for reoccurrence of 6828121 needed
Jerry Gilliam <Jerry.Gilliam@Sun.COM>
parents:
9396
diff
changeset
|
939 |
# ELF section size which can trigger an OBP bug on older platforms. |
e6271d3ec9f2
6831697 tool to check sun4u bootable modules for reoccurrence of 6828121 needed
Jerry Gilliam <Jerry.Gilliam@Sun.COM>
parents:
9396
diff
changeset
|
940 |
# This problem affects only specific sun4u bootable modules. |
e6271d3ec9f2
6831697 tool to check sun4u bootable modules for reoccurrence of 6828121 needed
Jerry Gilliam <Jerry.Gilliam@Sun.COM>
parents:
9396
diff
changeset
|
941 |
# |
e6271d3ec9f2
6831697 tool to check sun4u bootable modules for reoccurrence of 6828121 needed
Jerry Gilliam <Jerry.Gilliam@Sun.COM>
parents:
9396
diff
changeset
|
942 |
CHK4UBIN= $(ONBLD_TOOLS)/bin/$(MACH)/chk4ubin |
e6271d3ec9f2
6831697 tool to check sun4u bootable modules for reoccurrence of 6828121 needed
Jerry Gilliam <Jerry.Gilliam@Sun.COM>
parents:
9396
diff
changeset
|
943 |
CHK4UBINFLAGS= |
e6271d3ec9f2
6831697 tool to check sun4u bootable modules for reoccurrence of 6828121 needed
Jerry Gilliam <Jerry.Gilliam@Sun.COM>
parents:
9396
diff
changeset
|
944 |
CHK4UBINARY= $(CHK4UBIN) $(CHK4UBINFLAGS) $@ |
e6271d3ec9f2
6831697 tool to check sun4u bootable modules for reoccurrence of 6828121 needed
Jerry Gilliam <Jerry.Gilliam@Sun.COM>
parents:
9396
diff
changeset
|
945 |
|
e6271d3ec9f2
6831697 tool to check sun4u bootable modules for reoccurrence of 6828121 needed
Jerry Gilliam <Jerry.Gilliam@Sun.COM>
parents:
9396
diff
changeset
|
946 |
# |
0 | 947 |
# PKGARCHIVE specifies the default location where packages should be |
948 |
# placed if built. |
|
949 |
# |
|
950 |
$(RELEASE_BUILD)PKGARCHIVESUFFIX= -nd |
|
951 |
PKGARCHIVE=$(SRC)/../../packages/$(MACH)/nightly$(PKGARCHIVESUFFIX) |
|
952 |
||
11838
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11300
diff
changeset
|
953 |
# |
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11300
diff
changeset
|
954 |
# The repositories will be created with these publisher settings. To |
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11300
diff
changeset
|
955 |
# update an image to the resulting repositories, this must match the |
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11300
diff
changeset
|
956 |
# publisher name provided to "pkg set-publisher." |
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11300
diff
changeset
|
957 |
# |
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11300
diff
changeset
|
958 |
PKGPUBLISHER_REDIST= on-nightly |
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11300
diff
changeset
|
959 |
PKGPUBLISHER_NONREDIST= on-extra |
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11300
diff
changeset
|
960 |
|
0 | 961 |
# Default build rules which perform comment section post-processing. |
962 |
# |
|
963 |
.c: |
|
964 |
$(LINK.c) -o $@ $< $(LDLIBS) |
|
965 |
$(POST_PROCESS) |
|
966 |
.c.o: |
|
967 |
$(COMPILE.c) $(OUTPUT_OPTION) $< $(CTFCONVERT_HOOK) |
|
968 |
$(POST_PROCESS_O) |
|
969 |
.c.a: |
|
970 |
$(COMPILE.c) -o $% $< |
|
971 |
$(PROCESS_COMMENT) $% |
|
972 |
$(AR) $(ARFLAGS) $@ $% |
|
973 |
$(RM) $% |
|
974 |
.s.o: |
|
975 |
$(COMPILE.s) -o $@ $< |
|
976 |
$(POST_PROCESS_O) |
|
977 |
.s.a: |
|
978 |
$(COMPILE.s) -o $% $< |
|
979 |
$(PROCESS_COMMENT) $% |
|
980 |
$(AR) $(ARFLAGS) $@ $% |
|
981 |
$(RM) $% |
|
982 |
.cc: |
|
983 |
$(LINK.cc) -o $@ $< $(LDLIBS) |
|
984 |
$(POST_PROCESS) |
|
985 |
.cc.o: |
|
986 |
$(COMPILE.cc) $(OUTPUT_OPTION) $< |
|
987 |
$(POST_PROCESS_O) |
|
988 |
.cc.a: |
|
989 |
$(COMPILE.cc) -o $% $< |
|
990 |
$(AR) $(ARFLAGS) $@ $% |
|
991 |
$(PROCESS_COMMENT) $% |
|
992 |
$(RM) $% |
|
993 |
.y: |
|
994 |
$(YACC.y) $< |
|
995 |
$(LINK.c) -o $@ y.tab.c $(LDLIBS) |
|
996 |
$(POST_PROCESS) |
|
997 |
$(RM) y.tab.c |
|
998 |
.y.o: |
|
999 |
$(YACC.y) $< |
|
1000 |
$(COMPILE.c) -o $@ y.tab.c $(CTFCONVERT_HOOK) |
|
1001 |
$(POST_PROCESS_O) |
|
1002 |
$(RM) y.tab.c |
|
1003 |
.l: |
|
1004 |
$(RM) $*.c |
|
1005 |
$(LEX.l) $< > $*.c |
|
1006 |
$(LINK.c) -o $@ $*.c -ll $(LDLIBS) |
|
1007 |
$(POST_PROCESS) |
|
1008 |
$(RM) $*.c |
|
1009 |
.l.o: |
|
1010 |
$(RM) $*.c |
|
1011 |
$(LEX.l) $< > $*.c |
|
1012 |
$(COMPILE.c) -o $@ $*.c $(CTFCONVERT_HOOK) |
|
1013 |
$(POST_PROCESS_O) |
|
1014 |
$(RM) $*.c |
|
1015 |
||
10696
cd0f390dd9e2
PSARC 2008/672 thebe SAS/SATA driver
dh142964 <David.Hollister@Sun.COM>
parents:
10207
diff
changeset
|
1016 |
.bin.o: |
cd0f390dd9e2
PSARC 2008/672 thebe SAS/SATA driver
dh142964 <David.Hollister@Sun.COM>
parents:
10207
diff
changeset
|
1017 |
$(COMPILE.b) -o $@ $< |
cd0f390dd9e2
PSARC 2008/672 thebe SAS/SATA driver
dh142964 <David.Hollister@Sun.COM>
parents:
10207
diff
changeset
|
1018 |
$(POST_PROCESS_O) |
cd0f390dd9e2
PSARC 2008/672 thebe SAS/SATA driver
dh142964 <David.Hollister@Sun.COM>
parents:
10207
diff
changeset
|
1019 |
|
0 | 1020 |
.java.class: |
1021 |
$(COMPILE.java) $< |
|
1022 |
||
6350
aec7d1368710
6680948 ON could use some common Perl and Python build rules
carlsonj
parents:
5827
diff
changeset
|
1023 |
# Bourne and Korn shell script message catalog build rules. |
aec7d1368710
6680948 ON could use some common Perl and Python build rules
carlsonj
parents:
5827
diff
changeset
|
1024 |
# We extract all gettext strings with sed(1) (being careful to permit |
aec7d1368710
6680948 ON could use some common Perl and Python build rules
carlsonj
parents:
5827
diff
changeset
|
1025 |
# multiple gettext strings on the same line), weed out the dups, and |
aec7d1368710
6680948 ON could use some common Perl and Python build rules
carlsonj
parents:
5827
diff
changeset
|
1026 |
# build the catalogue with awk(1). |
0 | 1027 |
|
6350
aec7d1368710
6680948 ON could use some common Perl and Python build rules
carlsonj
parents:
5827
diff
changeset
|
1028 |
.sh.po .ksh.po: |
aec7d1368710
6680948 ON could use some common Perl and Python build rules
carlsonj
parents:
5827
diff
changeset
|
1029 |
$(SED) -n -e ":a" \ |
0 | 1030 |
-e "h" \ |
1031 |
-e "s/.*gettext *\(\"[^\"]*\"\).*/\1/p" \ |
|
1032 |
-e "x" \ |
|
1033 |
-e "s/\(.*\)gettext *\"[^\"]*\"\(.*\)/\1\2/" \ |
|
1034 |
-e "t a" \ |
|
1035 |
$< | sort -u | awk '{ print "msgid\t" $$0 "\nmsgstr" }' > $@ |
|
1036 |
||
6350
aec7d1368710
6680948 ON could use some common Perl and Python build rules
carlsonj
parents:
5827
diff
changeset
|
1037 |
# |
aec7d1368710
6680948 ON could use some common Perl and Python build rules
carlsonj
parents:
5827
diff
changeset
|
1038 |
# Python and Perl executable and message catalog build rules. |
aec7d1368710
6680948 ON could use some common Perl and Python build rules
carlsonj
parents:
5827
diff
changeset
|
1039 |
# |
7078
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6812
diff
changeset
|
1040 |
.SUFFIXES: .pl .pm .py .pyc |
6350
aec7d1368710
6680948 ON could use some common Perl and Python build rules
carlsonj
parents:
5827
diff
changeset
|
1041 |
|
aec7d1368710
6680948 ON could use some common Perl and Python build rules
carlsonj
parents:
5827
diff
changeset
|
1042 |
.pl: |
aec7d1368710
6680948 ON could use some common Perl and Python build rules
carlsonj
parents:
5827
diff
changeset
|
1043 |
$(RM) $@; |
aec7d1368710
6680948 ON could use some common Perl and Python build rules
carlsonj
parents:
5827
diff
changeset
|
1044 |
$(SED) -e "s@TEXT_DOMAIN@\"$(TEXT_DOMAIN)\"@" $< > $@; |
aec7d1368710
6680948 ON could use some common Perl and Python build rules
carlsonj
parents:
5827
diff
changeset
|
1045 |
$(CHMOD) +x $@ |
aec7d1368710
6680948 ON could use some common Perl and Python build rules
carlsonj
parents:
5827
diff
changeset
|
1046 |
|
aec7d1368710
6680948 ON could use some common Perl and Python build rules
carlsonj
parents:
5827
diff
changeset
|
1047 |
.py: |
aec7d1368710
6680948 ON could use some common Perl and Python build rules
carlsonj
parents:
5827
diff
changeset
|
1048 |
$(RM) $@; $(CAT) $< > $@; $(CHMOD) +x $@ |
aec7d1368710
6680948 ON could use some common Perl and Python build rules
carlsonj
parents:
5827
diff
changeset
|
1049 |
|
7078
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6812
diff
changeset
|
1050 |
.py.pyc: |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6812
diff
changeset
|
1051 |
$(RM) $@ |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6812
diff
changeset
|
1052 |
$(PYTHON) -mpy_compile $< |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6812
diff
changeset
|
1053 |
@[ $(<)c = $@ ] || $(MV) $(<)c $@ |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6812
diff
changeset
|
1054 |
|
9396
f41cf682d0d3
PSARC/2009/204 ZFS user/group quotas & space accounting
Matthew Ahrens <Matthew.Ahrens@Sun.COM>
parents:
8731
diff
changeset
|
1055 |
.py.po: |
f41cf682d0d3
PSARC/2009/204 ZFS user/group quotas & space accounting
Matthew Ahrens <Matthew.Ahrens@Sun.COM>
parents:
8731
diff
changeset
|
1056 |
$(GNUXGETTEXT) $(GNUXGETFLAGS) -d $(<F:%.py=%) $< ; |
f41cf682d0d3
PSARC/2009/204 ZFS user/group quotas & space accounting
Matthew Ahrens <Matthew.Ahrens@Sun.COM>
parents:
8731
diff
changeset
|
1057 |
|
6350
aec7d1368710
6680948 ON could use some common Perl and Python build rules
carlsonj
parents:
5827
diff
changeset
|
1058 |
.pl.po .pm.po: |
aec7d1368710
6680948 ON could use some common Perl and Python build rules
carlsonj
parents:
5827
diff
changeset
|
1059 |
$(XGETTEXT) $(XGETFLAGS) -d $(<F) $< ; |
aec7d1368710
6680948 ON could use some common Perl and Python build rules
carlsonj
parents:
5827
diff
changeset
|
1060 |
$(RM) $@ ; |
aec7d1368710
6680948 ON could use some common Perl and Python build rules
carlsonj
parents:
5827
diff
changeset
|
1061 |
$(SED) "/^domain/d" < $(<F).po > $@ ; |
aec7d1368710
6680948 ON could use some common Perl and Python build rules
carlsonj
parents:
5827
diff
changeset
|
1062 |
$(RM) $(<F).po |
2712
f74a135872bc
PSARC/2005/471 BrandZ: Support for non-native zones
nn35248
parents:
2605
diff
changeset
|
1063 |
|
0 | 1064 |
# |
1065 |
# When using xgettext, we want messages to go to the default domain, |
|
1066 |
# rather than the specified one. This special version of the |
|
1067 |
# COMPILE.cpp macro effectively prevents expansion of TEXT_DOMAIN, |
|
1068 |
# causing xgettext to put all messages into the default domain. |
|
1069 |
# |
|
1070 |
CPPFORPO=$(COMPILE.cpp:\"$(TEXT_DOMAIN)\"=TEXT_DOMAIN) |
|
1071 |
||
1072 |
.c.i: |
|
1073 |
$(CPPFORPO) $< > $@ |
|
1074 |
||
1075 |
.h.i: |
|
1076 |
$(CPPFORPO) $< > $@ |
|
1077 |
||
1078 |
.y.i: |
|
1079 |
$(YACC) -d $< |
|
1080 |
$(CPPFORPO) y.tab.c > $@ |
|
1081 |
$(RM) y.tab.c |
|
1082 |
||
1083 |
.l.i: |
|
1084 |
$(LEX) $< |
|
1085 |
$(CPPFORPO) lex.yy.c > $@ |
|
1086 |
$(RM) lex.yy.c |
|
1087 |
||
1088 |
.c.po: |
|
1089 |
$(CPPFORPO) $< > $<.i |
|
1090 |
$(BUILD.po) |
|
1091 |
||
1092 |
.y.po: |
|
1093 |
$(YACC) -d $< |
|
1094 |
$(CPPFORPO) y.tab.c > $<.i |
|
1095 |
$(BUILD.po) |
|
1096 |
$(RM) y.tab.c |
|
1097 |
||
1098 |
.l.po: |
|
1099 |
$(LEX) $< |
|
1100 |
$(CPPFORPO) lex.yy.c > $<.i |
|
1101 |
$(BUILD.po) |
|
1102 |
$(RM) lex.yy.c |
|
1103 |
||
1104 |
# |
|
1105 |
# Rules to perform stylistic checks |
|
1106 |
# |
|
6350
aec7d1368710
6680948 ON could use some common Perl and Python build rules
carlsonj
parents:
5827
diff
changeset
|
1107 |
.SUFFIXES: .x .xml .check .xmlchk |
0 | 1108 |
|
1109 |
.h.check: |
|
1110 |
$(DOT_H_CHECK) |
|
1111 |
||
1112 |
.x.check: |
|
1113 |
$(DOT_X_CHECK) |
|
1114 |
||
1115 |
.xml.xmlchk: |
|
1116 |
$(MANIFEST_CHECK) |
|
1117 |
||
1118 |
# |
|
1119 |
# Rules to process ONC+ Source partial files |
|
1120 |
# |
|
1121 |
%_onc_plus: % |
|
1122 |
@$(ECHO) "extracting code from $< ... " |
|
1123 |
sed -n -e '/ONC_PLUS EXTRACT START/,/ONC_PLUS EXTRACT END/p' $< > $@ |
|
1810 | 1124 |
|
1125 |
# |
|
1126 |
# Include rules to render automated sccs get rules "safe". |
|
1127 |
# |
|
1128 |
include $(SRC)/Makefile.noget |