1 # 2 # CDDL HEADER START 3 # 4 # The contents of this file are subject to the terms of the 5 # Common Development and Distribution License (the License). 6 # You may not use this file except in compliance with the License. 7 # 8 # You can obtain a copy of the license at usr/src/CDDL.txt 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/CDDL.txt. 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 # 21 22 # 23 # Copyright 2008 Sun Microsystems, Inc. All rights reserved. 24 # Use is subject to license terms. 25 # 26 # ident "@(#)Makefile.master 1.168 08/08/11 SMI" 27 # 28 # Makefile.master, global definitions for system source 29 # 30 ROOT?= /proto 31 32 .KEEP_STATE: 33 34 # The declaration POUND_SIGN is always '#'. This is needed to get around the 35 # make feature that '#' is always a comment delimiter, even when escaped or 36 # quoted. The only way of generating this is the :sh macro mechanism. Note 37 # however that in general :sh macros should be avoided in makefiles that are 38 # widely included into other makefiles, as the resulting shell executions can 39 # cause a noticeable slowdown in build times. 40 # 41 # The code below handles differences between Solaris make and Linux make. 42 # On a Solaris machine, $(SUNOS)="", $(LINUX)=#, $(POUND_SIGN)=# 43 # On a Linux machine, $(SUNOS)=#, $(LINUX)="", $(POUND_SIGN)=# 44 # Thus, prefixing lines with $(SUNOS) or $(LINUX) will cause the 45 # lines to be run only on a non-Linux or Linux build respectively. 46 # 47 POUND_SIGN:sh= echo x | tr x \\043 48 OSNAME:sh= uname -s 49 SUNOS:sh= if [ `uname -s` != SunOS ] ; then echo x | tr x \\043; fi 50 LINUX:sh= if [ `uname -s` != Linux ] ; then echo x | tr x \\043; fi 51 52 # CLOSED is the root of the tree that contains source which isn't released 53 # as open source 54 CLOSED= $(SRC)/../closed 55 56 # CLOSED_BUILD controls whether we try to build files under usr/closed. 57 # ("" means to build closed source, "#" means don't try to build it.) 58 CLOSED_BUILD_1 = if [ ! -d "$(CLOSED)" ] ; then echo x | tr x \\043; fi 59 CLOSED_BUILD = $(CLOSED_BUILD_1:sh) 60 61 # BUILD_TOOLS is the root of all tools including compilers. 62 # An open source build uses the tools installed locally on the build machine, 63 # whereas a closed build uses the tools installed in a central repository. 64 BUILD_TOOLS= /opt 65 $(CLOSED_BUILD)BUILD_TOOLS= /ws/sc31u-tools 66 67 # SC_CLOSED_BINS contains the prebuilt closed binaries which are used 68 # by the open source build 69 SC_CLOSED_BINS= $${SC_CLOSED_BINS:-$(BUILD_TOOLS)/scbld/ref_proto/ohac-closed-bins} 70 71 # CLOSED_MSG_CATALOGS specifies which message catalogs are generated 72 # from closed source 73 CLOSED_MSG_CATALOGS= SUNW_SC_UCMCMD 74 75 # If the TMPDIR environment variable is set, we set a flag to tell the 76 # C++ compiler to use it. It's not necessary to do this for plain C 77 # compiles, because the C compiler honors TMPDIR without needing an 78 # explicit flag. 79 # 80 # The user (or the calling script) can also override CCTEMPFLAG before 81 # calling make (or dmake), in order to save make the minor expense of 82 # re-running this echo command. 83 CCTEMPFLAG:sh=echo ${TMPDIR:+-temp=$TMPDIR} 84 85 # EUROPA flag toggles the build of the Europa specific components in 86 # the Sun Cluster gate. These components are not needed for a standard 87 # Sun Cluster user. 88 EUROPA= $(POUND_SIGN) 89 90 # RELEASE_BUILD should be cleared for final release builds. This is completely 91 # independent of CH. NOT_RELEASE_BUILD is exactly what the name implies. 92 # 93 # STRIP_COMMENTS toggles comment section striping. Generally the same setting 94 # as RELEASE_BUILD. 95 # 96 # STRIPFLAG is set to a unique value depending upon the value of 97 # RELEASE_BUILD. We only strip on release builds. 98 # It is set here for use in lower level Makefiles to allow a single 99 # point change to affect the entire build. 100 # 101 NOT_RELEASE_BUILD= 102 RELEASE_BUILD= $(POUND_SIGN) 103 $(RELEASE_BUILD)NOT_RELEASE_BUILD= $(POUND_SIGN) 104 105 STRIP_COMMENTS= $(RELEASE_BUILD) 106 107 STRIPFLAG= 108 $(RELEASE_BUILD)STRIPFLAG= -s 109 110 # For some future builds, NATIVE_MACH and MACH might be different. 111 # Therefore, NATIVE_MACH needs to be redefined in the 112 # environment as `uname -p` to override this macro. 113 # 114 NATIVE_MACH= $(MACH) 115 116 # 117 # Macros used to switch compilation based on S9/S10 reference 118 # These are set by the nightly script. OS is enforced to be set 119 # to 5.9 or 5.10 by .INIT. S9_BUILD, PRE_S10_BUILD, and POST_S9_BUILD 120 # is then set according to OS setting. 121 # Per bug 4787164, it is necessary to keep specific Solaris build 122 # setting such that some OS dependable MACROs like SOL_VERSION, 123 # REFERENCE_PROTO, and OS specific packages can be easily set. 124 # Following setting can be used up to Solaris 11. To add more 125 # Solaris, besides update the check_last_os target, simply follow 126 # the following method. 127 # 128 5.9=$(POUND_SIGN) 129 5.10=$(POUND_SIGN) 130 5.11=$(POUND_SIGN) 131 Linux=$(POUND_SIGN) 132 as4.0=$(POUND_SIGN) 133 134 $(OS)= 135 136 S11_BUILD= $(5.11) 137 PRE_S11_BUILD= $(POUND_SIGN) 138 POST_S11_BUILD= $(POUND_SIGN) 139 140 S10_BUILD= $(5.10) 141 PRE_S10_BUILD= $(POUND_SIGN) 142 POST_S10_BUILD= $(POUND_SIGN) 143 144 S9_BUILD= $(5.9) 145 PRE_S9_BUILD= $(POUND_SIGN) 146 POST_S9_BUILD= $(POUND_SIGN) 147 148 $(Linux)OS_PLATFORM=RH30AS 149 $(as4.0)OS_PLATFORM=RH40AS 150 151 152 $(S9_BUILD)PRE_S10_BUILD= 153 $(PRE_S9_BUILD)PRE_S10_BUILD= 154 $(S10_BUILD)PRE_S11_BUILD= 155 $(PRE_S10_BUILD)PRE_S11_BUILD= 156 157 $(POST_S11_BUILD)POST_S10_BUILD= 158 $(S11_BUILD)POST_S10_BUILD= 159 $(POST_S10_BUILD)POST_S9_BUILD= 160 $(S10_BUILD)POST_S9_BUILD= 161 162 # 163 # Use the SOL_VERSION macro to determine the version of OS. The 164 # value of the SOL_VERSION macro is the release date of the 165 # version of OS. Its of the form, YYYYMM. So for Solaris 9, its 166 # 200205 (May 2002) and for Solaris 10, its 200411 (Nov 2004). 167 # 168 DSOL_VERSION=-DSOL_VERSION=200205 169 $(S10_BUILD)DSOL_VERSION=-DSOL_VERSION=200411 170 $(S11_BUILD)DSOL_VERSION=-DSOL_VERSION=200710 171 DOS_PLATFORM= -DOS_PLATFORM=Solaris 172 DOS_VERSION = $(DSOL_VERSION) 173 174 # 175 # Separate different builds into their own proto areas. 176 # 177 178 # 179 # TARGET_ROOT_NAME - the platform build name 180 # 181 # This identifier is used eventually to build the cdrom image, but 182 # also used as a common name for the proto area and other development 183 # storage areas. 184 # 185 TARGET_ROOT_NAME=Sol_9 186 $(S10_BUILD)TARGET_ROOT_NAME=Sol_10 187 $(S11_BUILD)TARGET_ROOT_NAME=Sol_11 188 189 # 190 # TARGET_ROOT_PROTO - proto area subdirectory 191 # 192 # This is the path suffix that is used to specify the proto area 193 # subdirectory. 194 # 195 TARGET_ROOT_PROTO=$(TARGET_ROOT_NAME)/ 196 $(RELEASE_BUILD)TARGET_ROOT_PROTO=$(TARGET_ROOT_NAME)-nd/ 197 198 # 199 # TARGET_ROOT - name for the proto area root_$(MACH) location 200 # 201 TARGET_ROOT=$(TARGET_ROOT_PROTO)root_$(MACH) 202 203 # 204 # VROOT is used in all other Makefiles to reference the proto 205 # area rather than ROOT, as the latter is overridden by the 206 # environment with make -e (the default for the ws script). 207 # 208 VROOT=$(ROOT:%/proto/root_$(MACH)=%/proto/$(TARGET_ROOT)) 209 210 # 211 # Some additions to support building in with a reference proto area. 212 # This is the location for reference proto area containing 213 # libs and headers for version of OS we're building against. 214 # 215 REFERENCE_PROTO=s9/s9_58shwpl3 216 $(S10_BUILD)REFERENCE_PROTO=s10/s10u5_10 217 $(S11_BUILD)REFERENCE_PROTO=snv/snv_93 218 219 REF_PROTO= 220 $(CLOSED_BUILD)REF_PROTO= $(BUILD_TOOLS)/ref_proto/$(REFERENCE_PROTO)/root_$(MACH) 221 222 REF_LIB_= 223 REF_LIB_32= $(REF_PROTO)/lib 224 REF_LIB_64= $(REF_PROTO)/lib/$(MACH64) 225 REF_LIB= $(REF_LIB_$(CLASS)) 226 REF_USRLIB_= 227 REF_USRLIB_32= $(REF_PROTO)/usr/lib 228 REF_USRLIB_64= $(REF_PROTO)/usr/lib/$(MACH64) 229 REF_USRLIB= $(REF_USRLIB_$(CLASS)) 230 REF_LIBS= $(REF_USRLIB) $(REF_LIB) 231 REF_INC= $(REF_PROTO)/usr/include 232 233 EXTERNAL_PKGS= $(BUILD_TOOLS)/scbld/ext_pkgs 234 $(CLOSED_BUILD)EXTERNAL_PKGS= /ws/suncluster/ext_pkgs 235 236 JAVA_ROOT= /usr/java 237 $(CLOSED_BUILD)JAVA_ROOT= $(EXTERNAL_PKGS)/Sun/$(NATIVE_MACH)/jdk_1.4.1_01/j2se 238 239 LOCKHART= 240 $(CLOSED_BUILD)LOCKHART=$(EXTERNAL_PKGS)/Sun/$(NATIVE_MACH)/Lockhart/3.0/root 241 242 JFREECHARTJARNAME=jfreechart-1.0.1.jar 243 JFREECHARTCOMMONJARNAME=jcommon-1.0.0.jar 244 JFREECHART=$(EXTERNAL_PKGS)/jfreechart 245 $(CLOSED_BUILD)JFREECHART=$(EXTERNAL_PKGS)/jfreechart/jfreechart-1.0.1 246 JFREECHARTJAR=$(JFREECHART)/lib/$(JFREECHARTJARNAME) 247 JFREECHARTCOMMONJAR=$(JFREECHART)/lib/$(JFREECHARTCOMMONJARNAME) 248 249 SASL_ROOT=/opt/SUNWjdmk/5.1 250 $(CLOSED_BUILD)SASL_ROOT=$(EXTERNAL_PKGS)/Sun/SASL 251 252 CACAO_DELIVERY=$(EXTERNAL_PKGS)/Sun/cacao/BUILD_2_0_b12/packages/solaris/$(NATIVE_MACH) 253 CACAO_BUILD=/usr/lib/cacao 254 $(CLOSED_BUILD)CACAO_BUILD=$(CACAO_DELIVERY)/SUNWcacaort/reloc/usr/lib/cacao 255 256 JDMK_DELIVERY=$(EXTERNAL_PKGS)/Sun/jdmk/5.1/b34/solaris 257 JMX51_ROOT=/opt/SUNWjdmk/5.1 258 $(CLOSED_BUILD)JMX51_ROOT=$(JDMK_DELIVERY)/SUNWjdmk-runtime-jmx/reloc/SUNWjdmk/5.1 259 JDMK51_ROOT=/opt/SUNWjdmk/5.1 260 $(CLOSED_BUILD)JDMK51_ROOT=$(JDMK_DELIVERY)/SUNWjdmk-runtime/reloc/SUNWjdmk/5.1 261 JSDK51_ROOT=/opt/SUNWjdmk/5.1/doc 262 $(CLOSED_BUILD)JSDK51_ROOT=$(JDMK_DELIVERY)/SUNWjdmk-sdk/reloc/SUNWjdmk/5.1/doc/locale/C 263 264 DERBY_DELIVERY=/opt/SUNWjavadb 265 $(CLOSED_BUILD)DERBY_DELIVERY=$(EXTERNAL_PKGS)/derby/10.1.1.0 266 267 # 268 # external SCI packages 269 # 270 SCI_DELIVERY=$(EXTERNAL_PKGS)/SCI/3.0.0.freshbitted/s10 271 $(PRE_S10_BUILD)SCI_DELIVERY=$(EXTERNAL_PKGS)/SCI/3.0.0.freshbitted/s9 272 273 # 274 # DVD images of external products 275 # 276 DVDIMAGES_DIR=$(EXTERNAL_PKGS)/dvdimages/ohac 277 $(CLOSED_BUILD)DVDIMAGES_DIR=$(EXTERNAL_PKGS)/dvdimages/32u2_latest 278 $(CLOSED_BUILD)$(S11_BUILD)DVDIMAGES_DIR=$(EXTERNAL_PKGS)/dvdimages/ohac_latest 279 280 # 281 # Documentation 282 # 283 DOCS_DELIVERY=$(EXTERNAL_PKGS)/Docs/ohac/$(NATIVE_MACH) 284 $(CLOSED_BUILD)DOCS_DELIVERY=$(EXTERNAL_PKGS)/Docs/sc32u1/$(NATIVE_MACH) 285 SCSPMOH=$(DOCS_DELIVERY)/SUNWscspmoh/reloc 286 287 # 288 # Localization 289 # 290 L10N_DELIVERY=$(EXTERNAL_PKGS)/L10N/ohac/$(NATIVE_MACH) 291 $(CLOSED_BUILD)L10N_DELIVERY= $(EXTERNAL_PKGS)/L10N/l10n.sc32u2/$(NATIVE_MACH) 292 293 # 294 # scdsbuilder uses openide from Forte For Java/Netbeans 295 # 296 FFJ_DELIVERY=$(EXTERNAL_PKGS)/openide 297 $(CLOSED_BUILD)FFJ_DELIVERY=$(EXTERNAL_PKGS)/Sun/ffj 298 299 # 300 # sccheck uses Knowledge Automation Engine 301 # 302 KAE_DELIVERY=$(EXTERNAL_PKGS)/kae 303 $(CLOSED_BUILD)KAE_DELIVERY=$(EXTERNAL_PKGS)/Sun/kae/3.0.1 304 305 # 306 # scsnapshot uses libexpat 307 # 308 SCSNAPSHOT_DELIVERY=$(EXTERNAL_PKGS)/scsnapshot 309 $(CLOSED_BUILD)SCSNAPSHOT_DELIVERY=$(EXTERNAL_PKGS)/scsnapshot/deliver.09.30.2003/tarfiles 310 311 # 312 # VxVM header files 313 # 314 VXVMHDRDIR=$(EXTERNAL_PKGS)/Veritas/sparc/VxVM/4.1/include 315 316 AWK= /usr/bin/awk 317 CAT= /usr/bin/cat 318 CHMOD= /usr/bin/chmod 319 CP= /usr/bin/cp -f 320 CPP= /usr/lib/cpp 321 DEM= $(SPRO_ROOT)/$(SPRO_VERS)/bin/dem 322 DIFF= /usr/bin/diff 323 ECHO= echo 324 EGREP= /bin/egrep 325 FIND= /usr/bin/find 326 GREP= /usr/bin/grep 327 INS= install 328 JAR= $(JAVA_ROOT)/bin/jar 329 JAVA= $(JAVA_ROOT)/bin/java 330 JAVAC= $(JAVA_ROOT)/bin/javac 331 JAVAH= $(JAVA_ROOT)/bin/javah 332 JAVADOC= $(JAVA_ROOT)/bin/javadoc 333 LN= /usr/bin/ln 334 MCS= /usr/ccs/bin/mcs 335 MKDIR= /usr/bin/mkdir 336 MV= /usr/bin/mv -f 337 $(SUNOS)NAWK= /usr/bin/nawk 338 $(LINUX)NAWK= /bin/awk 339 NM= /usr/ccs/bin/nm 340 PERL= /usr/bin/perl 341 POD2MAN= /usr/perl5/bin/pod2man 342 PTCLEAN= $(SPRO_ROOT)/$(SPRO_VERS)/bin/CCadmin -clean 343 RM= /usr/bin/rm -f 344 RPCGEN= $(REF_PROTO)/usr/bin/rpcgen 345 SED= /usr/bin/sed 346 SORT= /bin/sort 347 STABS= $(BUILD_TOOLS)/onbld/bin/$(MACH)/stabs 348 $(SUNOS)STRIP= /usr/ccs/bin/strip 349 $(LINUX)STRIP= /usr/bin/strip 350 SYMLINK= /usr/bin/ln -s 351 TOUCH= /bin/touch 352 TRUE= true 353 UNIQ= /bin/uniq 354 XARGS= /usr/bin/xargs 355 XPG4GREP= /usr/xpg4/bin/grep 356 XREF= $(BUILD_TOOLS)/onbld/bin/xref 357 358 FILEMODE= 0664 359 DIRMODE= 0775 360 361 # 362 # Print out a warning if we're running a build on an OS release 363 # which is older than Solaris 9. Building on older releases is 364 # potentially problematic. 365 # 366 # This dumps a copy of uname into a file so the rule is only executed 367 # once, but is executed by anyone including Makefile.master. 368 # 369 # INIT_DEPS is to be used by Makefiles which require their own .INIT 370 # targets to be executed. It needs to be set before including Makefile.master 371 # for those targets to be added (see uts/sparc/modules/Makefile). 372 # 373 INIT_DEPS += $(SRC)/.build.OS_version 374 375 # 376 # Add one more target into INIT_DEPS to check if OS variable is 377 # set, and if it matches last build OS setting. Build fails if 378 # OS is not set or it is different from last build OS setting. 379 # 380 INIT_DEPS += check_build_os 381 382 REQ_BLD_OS = 59 383 REQ_BLD_NM = Solaris 9 384 REQ_BLD_WARNING = "WARNING: Building on a release prior to $(REQ_BLD_NM)" 385 UNAME = uname 386 387 $(SRC)/.build.%: 388 $(SUNOS) @[ `$(UNAME) -r | \ 389 $(SUNOS) $(SED) -e 's/\(.\).\(.*\)/\1\2/'` -lt $(REQ_BLD_OS) ] && \ 390 $(SUNOS) ($(ECHO) $(REQ_BLD_WARNING) && $(RM) $@) || $(UNAME) -a > $@ 391 $(LINUX) @$(UNAME) -a > $@ 392 393 SUPPORTED_OS = 5.9 5.10 5.11 Linux as4.0 394 # 395 # check if OS is set, and if it is the same as the OS build last 396 # time; Otherwise it failed. 397 # 398 check_build_%: 399 @Error_mesg1="\nOS is null or not set. It should be among $(SUPPORTED_OS). Your build is failing.\n"; \ 400 Error_mesg2="\nUnsupported OS setting. SunOS $(SUPPORTED_OS) is supported. Your build is failing.\n"; \ 401 Guide_mesg="\nTo build against a different OS, do justsccs to your workspace\n\ 402 first; To make the same build, you still need to specify the\n\ 403 same OS value. Your build is failing. \n" ;\ 404 os_file=$(SRC)/.build.last_OS; \ 405 THIS_OS=$${OS:=$$Error_mesg1}; \ 406 LAST_OS=; \ 407 if [ -f $$os_file ]; then LAST_OS=`$(CAT) $$os_file`; fi; \ 408 if [ "$$THIS_OS" = "$$Error_mesg1" ]; then \ 409 if [ ! -z "$$LAST_OS" ]; then \ 410 $(ECHO) "\nYour last build was $$LAST_OS, but it is not set this time. \n$$Guide_mesg"; \ 411 exit 2; \ 412 else \ 413 $(ECHO) "$$Error_mesg1"; exit 3; \ 414 fi; \ 415 elif [ "$$THIS_OS" = "5.9" ] || [ "$$THIS_OS" = "5.10" ] || \ 416 [ "$$THIS_OS" = "5.11" ] || [ "$$THIS_OS" = "Linux" ] || \ 417 [ "$$THIS_OS" = "as4.0" ] ; then \ 418 if [ "$$LAST_OS" = "" ] || [ "$$THIS_OS" = "$$LAST_OS" ]; then \ 419 if [ -z "$$LAST_OS" -a ! -f $$os_file ]; then $(ECHO) "$$THIS_OS" > $$os_file; fi; \ 420 elif [ "$$THIS_OS" != "$$LAST_OS" ]; then \ 421 $(ECHO) "\nYour last build was $$LAST_OS, but it is set to $$THIS_OS this time.\n$$Guide_mesg"; \ 422 exit 4; \ 423 fi; \ 424 else \ 425 if [ ! -z "$$LAST_OS" ]; then \ 426 $(ECHO) "\nYour last build was $$LAST_OS. Your current setting is not among the\n\ 427 supported $(SUPPORTED_OS).\n$$Guide_mesg"; exit 5; \ 428 else \ 429 $(ECHO) "$$Error_mesg2"; exit 6; \ 430 fi; \ 431 fi 432 433 .INIT: $(INIT_DEPS) 434 435 # Declare that nothing should be built in parallel. 436 # Individual Makefiles can use the .PARALLEL target to declare otherwise. 437 .NO_PARALLEL: 438 439 # For stylistic checks 440 # 441 # Note that the X and C checks are not used at this time and may need 442 # modification when they are actually used. 443 # 444 CSTYLE= cstyle 445 CSTYLE_TAIL= 446 HDRCHK= hdrchk 447 HDRCHK_TAIL= 448 JSTYLE= jstyle 449 450 CHECK_FILES += $(OBJECTS:%.o=%.c_check) $(OBJS:%.o=%.c_check) \ 451 $(CHECKHDRS:%.h=%.h_check) $(CHECKHHDRS:%.hh=%.hh_check) 452 453 # Most of our header files are application headers. This FLAG can be 454 # set to NULL when DOT_H_CHECK is used for public headers. 455 456 HDRCHK_FLAG= -a 457 458 DOT_H_CHECK= \ 459 $(CSTYLE) $< $(CSTYLE_TAIL) > $@; \ 460 $(HDRCHK) $(HDRCHK_FLAG) $< $(HDRCHK_TAIL) >> $@ 461 462 DOT_X_CHECK= \ 463 $(RPCGEN) -C -h $< | $(CSTYLE) $(CSTYLE_TAIL) > $@; \ 464 $(RPCGEN) -C -h $< | $(HDRCHK) $< $(HDRCHK_TAIL) >> $@ 465 466 DOT_C_CHECK= \ 467 $(CSTYLE) $< $(CSTYLE_TAIL) > $@ 468 469 # modified for use within NSE environments 470 # 471 INS.file= $(RM) $@; $(INS) -s -m $(FILEMODE) -f $(@D) $< 472 INS.dir= $(INS) -s -d -m $(DIRMODE) $@ 473 # installs and renames at once 474 # 475 INS.rename= $(INS.file); $(MV) $(@D)/$(<F) $@ 476 477 # MACH must be set in the shell environment per uname -p on the build host 478 # More specific architecture variables should be set in lower makefiles. 479 # 480 # MACH64 is derived from MACH, and BUILD64 is set to `#' for 481 # architectures on which we do not build 64-bit versions. 482 # 483 484 MACH64_1= $(MACH:sparc=sparcv9) 485 MACH64= $(MACH64_1:i386=amd64) 486 487 MACH32_1= $(MACH:sparc=sparcv7) 488 MACH32= $(MACH32_1:i386=i86) 489 490 # 491 # On Solaris 10 and beyond we build 64bit x86 (amd64) 492 # 493 sparc_BUILD64= 494 i386_BUILD64= $(POUND_SIGN) 495 $(SUNOS)$(POST_S9_BUILD)i386_BUILD64= 496 BUILD64= $($(MACH)_BUILD64) 497 498 # 499 # C compiler mode. Future compilers may change the default on us, 500 # so force transition mode globally. Lower level makefiles can 501 # override this by setting CCMODE. 502 # 503 CCMODE= -Xa 504 CCMODE64= -Xa 505 506 # 507 # C compiler verbose mode. This is so we can enable it globally, 508 # but turn it off in the lower level makefiles of things we cannot 509 # (or aren't going to) fix. 510 # 511 CCVERBOSE= -v 512 513 # set this to the secret flag "-Wc,-Qiselect-v9abiwarn=1" to get warnings 514 # from the compiler about places the -xarch=v9 may differ from -xarch=v9c. 515 V9ABIWARN= 516 517 # set this to the secret flag "-Wc,-Qiselect-regsym=0" to disable register 518 # symbols (used to detect conflicts between objects that use global registers) 519 # we disable this now for safety, and because genunix doesn't link with 520 # this feature (the v9 default) enabled. 521 # 522 # REGSYM is separate since the C++ driver syntax is different. 523 CCREGSYM= -Wc,-Qiselect-regsym=0 524 CCCREGSYM= -Qoption cg -Qiselect-regsym=0 525 526 # generate 32-bit addresses in the v9 kernel. Saves memory. 527 CCABS32= -Wc,-xcode=abs32 528 529 # 530 # compiler '-xarch' flag. This is here to centralize it and make it 531 # overridable for testing. 532 sparc_XARCH= -xarch=v8 533 sparcv9_XARCH= -xarch=v9 534 amd64_XARCH= -xarch=amd64 -Ui386 -U__i386 535 536 # assembler '-xarch' flag. Different from compiler '-xarch' flag. 537 sparc_AS_XARCH= -xarch=v8 538 sparcv9_AS_XARCH= -xarch=v9 539 i386_AS_XARCH= 540 amd64_AS_XARCH= -xarch=amd64 -P -Ui386 -U__i386 541 542 # 543 # disable the incremental linker 544 ILDOFF= -xildoff 545 546 # 547 # turn warnings into errors (C) 548 # 549 CERRWARN= -errtags=yes -errwarn=%all -erroff=E_EMPTY_TRANSLATION_UNIT 550 551 # 552 # +w 553 # This flag tells the compiler to identify code that might have 554 # unintended consequences. The separate CCWARN macro makes it 555 # easy to disable it on a target-specific basis by using a 556 # target-specific reassignment "TARGET:= CCWARN=". 557 # 558 CCWARN = +w 559 560 # 561 # turn warnings into errors (C++) 562 CCERRWARN= -xwe 563 564 # 565 # Ignore anachronisms 566 CCNOANACHRONISMS= -Qoption ccfe -messages=no%anachronism 567 # 568 # Do not put literal strings in read-only memory 569 CCNOCONSTSTRINGS= -Qoption ccfe -features=no%conststrings 570 571 # 572 # Flag to disable inlining 573 # 574 NOINLINEFLAG = +d 575 576 # 577 # CL_CCFLAGS is used only in compilations of C++ code. 578 # +p is a flag that tells the preprocessor to ignore so-called 579 # "preprocessor asserts" such as #cpu. 580 # 581 CL_CCFLAGS = $(CCNOANACHRONISMS) $(CCNOCONSTSTRINGS) 582 CL_CCFLAGS += $(CCERRWARN) $(ILDOFF) +p $(CCWARN) 583 584 # In most places, assignments to these macros should be appended with += 585 # (CPPFLAGS.master allows values to be prefixed to CPPFLAGS). 586 sparc_CFLAGS= $(sparc_XARCH) 587 sparcv9_CFLAGS= $(sparcv9_XARCH) -dalign $(CCVERBOSE) $(V9ABIWARN) $(CCREGSYM) 588 i386_CFLAGS= 589 amd64_CFLAGS= $(amd64_XARCH) 590 591 sparc_ASFLAGS= $(sparc_AS_XARCH) 592 sparcv9_ASFLAGS=$(sparcv9_AS_XARCH) 593 i386_ASFLAGS= $(i386_AS_XARCH) 594 amd64_ASFLAGS= $(amd64_AS_XARCH) 595 596 # 597 # For userland programs, 598 # -O/-xO3 and -g are mutually exclusive. 599 # Use the former for non-debug and the latter for debug. 600 # In the latter case, "OPT" (optimize) is a misnomer. 601 # 602 sparc_COPTFLAG= -g 603 sparcv9_COPTFLAG= -g 604 $(RELEASE_BUILD)sparc_COPTFLAG= -xO3 605 $(RELEASE_BUILD)sparcv9_COPTFLAG= -xO3 606 607 i386_COPTFLAG= -g 608 amd64_COPTFLAG= -g 609 $(RELEASE_BUILD)i386_COPTFLAG= -xO3 610 $(RELEASE_BUILD)amd64_COPTFLAG= -xO3 611 612 COPTFLAG= $($(MACH)_COPTFLAG) 613 COPTFLAG64= $($(MACH64)_COPTFLAG) 614 615 # 616 # tradeoff time for space (smaller is better) 617 # 618 sparc_SPACEFLAG = -xspace -W0,-Lt 619 sparcv9_SPACEFLAG = -xspace -W0,-Lt 620 i386_SPACEFLAG = -W0,-xc99=%none 621 SPACEFLAG = $($(MACH)_SPACEFLAG) 622 SPACEFLAG64 = $($(MACH64)_SPACEFLAG) 623 624 sparc_XREGSFLAG = -xregs=no%appl 625 sparcv9_XREGSFLAG = -xregs=no%appl 626 i386_XREGSFLAG = 627 XREGSFLAG = $($(MACH)_XREGSFLAG) 628 XREGSFLAG64 = $($(MACH64)_XREGSFLAG) 629 630 CFLAGS= $(COPTFLAG) $($(MACH)_CFLAGS) $(SPACEFLAG) $(CCMODE) \ 631 $(ILDOFF) $(CERRWARN) 632 CFLAGS64= $(COPTFLAG64) $($(MACH64)_CFLAGS) $(SPACEFLAG64) $(CCMODE64) \ 633 $(ILDOFF) $(CERRWARN) 634 CPPFLAGS.master=$(DTEXTDOM) \ 635 $(ENVCPPFLAGS1) $(ENVCPPFLAGS2) $(ENVCPPFLAGS3) $(ENVCPPFLAGS4) 636 CPPFLAGS= $(CPPFLAGS.master) 637 AS_CPPFLAGS= $(CPPFLAGS.master) 638 639 # 640 # Kernel module specific flags 641 # 642 amd64_CCSTAND_FLAGS= -Qoption ube -xmodel=kernel 643 sparc_CCSTAND_FLAGS= 644 sparcv9_CCSTAND_FLAGS= 645 i386_CCSTAND_FLAGS= 646 amd64_CSTAND_FLAGS= -Wu,-xmodel=kernel 647 sparc_CSTAND_FLAGS= 648 sparcv9_CSTAND_FLAGS= 649 i386_CSTAND_FLAGS= 650 CSTAND_FLAGS_32 = $($(MACH)_CSTAND_FLAGS) 651 CSTAND_FLAGS_64 = $($(MACH64)_CSTAND_FLAGS) 652 CCSTAND_FLAGS_32 = $($(MACH)_CCSTAND_FLAGS) 653 CCSTAND_FLAGS_64 = $($(MACH64)_CCSTAND_FLAGS) 654 655 TMPLREPNAME = SunWS_cache 656 XAR = -xar 657 658 sparc_CC_COMPAT = 659 sparcv9_CC_COMPAT = 660 i386_CC_COMPAT = 661 662 JAVAFLAGS= -deprecation -g 663 $(RELEASE_BUILD)JAVAFLAGS= -deprecation 664 665 # 666 # For source message catalogue 667 # 668 .SUFFIXES: $(SUFFIXES) .po 669 MSGROOT= $(VROOT)/catalog 670 MSGDOMAIN= $(MSGROOT)/$(TEXT_DOMAIN) 671 DTEXTDOM= -DTEXT_DOMAIN=\"$(TEXT_DOMAIN)\" 672 MESSAGE_DIR= /usr/cluster/lib/locale 673 DMESSAGE_DIR= -DMESSAGE_DIR=\"$(MESSAGE_DIR)\" 674 CLOBBERFILES += $(POFILE) $(POFILES) 675 COMPILE.CPP= $(CC) -E -C $(CFLAGS) $(CPPFLAGS) 676 CCOMPILE.CPP= $(CCC) -E $(CCFLAGS) $(CPPFLAGS) -I$(CCC_INCLUDE) 677 SHMSGPREP= $(BUILD_TOOLS)/scbld/bin/$(MACH)/extract_gettext 678 $(CLOSED_BUILD)SHMSGPREP= $(BUILD_TOOLS)/onbld/bin/$(MACH)/extract_gettext 679 SCMSGS_BIN= $(BUILD_TOOLS)/scbld/bin 680 $(CLOSED_BUILD)SCMSGS_BIN= $(BUILD_TOOLS)/onbld/bin 681 SH.PP= $(SHMSGPREP) $(XGETFLAGS) 682 XGETTEXT= xgettext 683 $(SUNOS)XGETFLAGS= -c TRANSLATION_NOTE 684 BUILD.po= $(XGETTEXT) $(XGETFLAGS) $<.i ;\ 685 $(RM) $@ ;\ 686 sed "/^domain/d" < messages.po > $@ ;\ 687 $(RM) messages.po $<.i 688 689 %.pi: %.c 690 $(COMPILE.CPP) $< > $@ 691 692 %.pi: %.cc 693 $(CCOMPILE.CPP) $< > $@ 694 695 %.pi: %.ksh 696 $(SH.PP) < $< > $@ 697 698 %.pi: %.sh 699 $(SH.PP) < $< > $@ 700 701 # 702 # This is overwritten by local Makefile when PROG is a list. 703 # 704 PIFILES= $(OBJECTS:%.o=%.pi) $(PROG:%=%.pi) 705 POFILE= $(PROG:%=%.po) 706 707 sparc_CCFLAGS= $(sparc_XARCH) \ 708 $(CCNOANACHRONISMS) \ 709 $(CCNOCONSTSTRINGS) \ 710 $(CCERRWARN) 711 sparcv9_CCFLAGS= $(sparcv9_XARCH) -dalign \ 712 $(CCNOANACHRONISMS) \ 713 $(CCNOCONSTSTRINGS) \ 714 $(CCCREGSYM) \ 715 $(CCERRWARN) 716 i386_CCFLAGS= $(i386_CC_COMPAT) \ 717 $(CCNOANACHRONISMS) \ 718 $(CCNOCONSTSTRINGS) \ 719 $(CCERRWARN) 720 amd64_CCFLAGS= $(amd64_XARCH) \ 721 $(CCNOANACHRONISMS) \ 722 $(CCNOCONSTSTRINGS) \ 723 $(CCERRWARN) 724 725 # 726 # For userland programs, 727 # -O/-xO3 and -g are mutually exclusive 728 # Use the former for non-debug and the latter for debug. 729 # 730 sparc_CCOPTFLAG= -g 731 sparcv9_CCOPTFLAG= -g 732 $(RELEASE_BUILD)sparc_CCOPTFLAG= -O 733 $(RELEASE_BUILD)sparcv9_CCOPTFLAG= -O 734 735 i386_CCOPTFLAG= -g 736 amd64_CCOPTFLAG= -g 737 $(RELEASE_BUILD)i386_CCOPTFLAG= -O 738 $(RELEASE_BUILD)amd64_CCOPTFLAG= -O 739 740 CCOPTFLAG= $($(MACH)_CCOPTFLAG) 741 CCOPTFLAG64= $($(MACH64)_CCOPTFLAG) 742 CCFLAGS= $(CCOPTFLAG) $($(MACH)_CCFLAGS) $(CCTEMPFLAG) 743 CCFLAGS64= $(CCOPTFLAG64) $($(MACH64)_CCFLAGS) $(CCTEMPFLAG) 744 745 # Pass -Y flag to cpp (method of which is release-dependent) 746 CCYFLAG= -Y I, 747 748 CCYLIBS= -Y P, 749 750 ENVLIBS1= $(ENVROOT1:%=-L%/usr/cluster/lib) $(ENVROOT1:%=-L%/usr/lib) $(ENVROOT1:%=-L%/lib) 751 ENVLIBS2= $(ENVROOT2:%=-L%/usr/cluster/lib) $(ENVROOT2:%=-L%/usr/lib) $(ENVROOT2:%=-L%/lib) 752 DEFAULT_RUNPATH= -R/usr/cluster/lib 753 DEFAULT_LPATH= $(ENVLIBS1) $(REF_LIBS:%=-L%) $(ENVLIBS2) $(ENVLDLIBS3) \ 754 $(REF_LIBS:%=$(CCYLIBS)%) $(DEFAULT_RUNPATH) 755 756 LDLIBS.cmd = $(DEFAULT_LPATH) 757 LDLIBS.lib= $(DEFAULT_LPATH) 758 759 # 760 # Pass specified MT flags onto the pre-processor and linkage phases. 761 # CPPFLAGS is also included in LINK.c/LINK.cc. 762 # 763 CPP_MTFLAG = $(MTFLAG) 764 #$(SUNOS)MTFLAG = -mt 765 766 # 767 # Flexelint doesn't understand -mt, so -mt generated defines are not 768 # automatically included. If -mt shows up in the MTFLAGS that 769 # have been set by the component, we replace it here with -D_REENTRANT 770 # so the proper code paths are enabled. 771 # 772 # Assembly flags are also not tolerated, so they are eliminated here as well. 773 # 774 $(SUNOS)lint lint.targ:= MTFLAG = -D_REENTRANT 775 lint lint.targ:= AS_DEFS= 776 777 # 778 # CL_CPPFLAGS are common Cluster CPPFLAGS 779 # 780 $(NOT_RELEASE_BUILD)CL_CPPFLAGS = $(FI_CPPFLAGS) -DDEBUG -DFAULT_ALL 781 # 782 # 783 $(RELEASE_BUILD)CL_CPPFLAGS = $(FI_CPPFLAGS) -DDBGBUFS 784 785 # 786 # Fault injection switches 787 # 788 $(RELEASE_BUILD)FAULT_INJECTION = $(POUND_SIGN) 789 $(NOT_RELEASE_BUILD)FAULT_INJECTION = 790 $(RELEASE_BUILD)NO_FAULT_INJECTION = 791 $(NOT_RELEASE_BUILD)NO_FAULT_INJECTION = $(POUND_SIGN) 792 793 # 794 # Unode switch 795 # 796 $(RELEASE_BUILD)INCLUDE_UNODE = $(POUND_SIGN) 797 $(NOT_RELEASE_BUILD)INCLUDE_UNODE = 798 NO_UNODE = $(POUND_SIGN) 799 $(NO_UNODE)INCLUDE_UNODE = $(POUND_SIGN) 800 801 # 802 # UNODE_BUILD is set here. It will be overridden in the tests/unode 803 # Makefile. 804 # 805 UNODE_BUILD = $(POUND_SIGN) 806 807 # 808 # Adbmacros switch 809 # 810 INCLUDE_MACROS = 811 NO_MACROS = $(POUND_SIGN) 812 $(NO_MACROS)INCLUDE_MACROS = $(POUND_SIGN) 813 814 # 815 # Turn on, or off, test module builds. 816 # 817 INCLUDE_TESTS = $(POUND_SIGN) 818 $(NOT_RELEASE_BUILD)INCLUDE_TESTS = 819 NO_TESTS = $(POUND_SIGN) 820 $(NO_TESTS)INCLUDE_TESTS = $(POUND_SIGN) 821 822 $(FAULT_INJECTION)FI_CPPFLAGS = -D_FAULT_INJECTION 823 824 # 825 # SS11 - Sun Studio 11 compilers, used for SC-Nevada and beyond 826 # 827 SS11 = $(POUND_SIGN) 828 $(PRE_S11_BUILD)SS11 = $(POUND_SIGN) 829 PRE_SS11 = 830 $(SS11)PRE_SS11 = $(POUND_SIGN) 831 832 # 833 # Compiler macros 834 # 835 sparc_SPRO_VERS = SOS10 836 sparc_SPRO_VERS64 = SOS10 837 i386_SPRO_VERS = SOS10 838 i386_SPRO_VERS64 = SOS10 839 SPRO_VERS = 840 SPRO_VERS64 = 841 $(CLOSED_BUILD)SPRO_VERS = $($(NATIVE_MACH)_SPRO_VERS) 842 $(CLOSED_BUILD)SPRO_VERS64 = $($(NATIVE_MACH)_SPRO_VERS64) 843 $(CLOSED_BUILD)$(SS11)SPRO_VERS = SS11-new 844 $(CLOSED_BUILD)$(SS11)SPRO_VERS64 = SS11-new 845 846 # 847 # Environment proto and root_$(MACH) locations 848 # 849 ENVPROTO1=$(ENVCPPFLAGS1:-I%/root_$(MACH)/usr/include=%) 850 ENVROOT1=$(ENVPROTO1:%=%/$(TARGET_ROOT)) 851 ENVPROTO2=$(ENVCPPFLAGS2:-I%/root_$(MACH)/usr/include=%) 852 ENVROOT2=$(ENVPROTO2:%=%/$(TARGET_ROOT)) 853 ENVPROTO3=$(ENVCPPFLAGS3:-I%/root_$(MACH)/usr/include=%) 854 ENVROOT3=$(ENVPROTO3:%=%/$(TARGET_ROOT)) 855 CPPFLAGS.master= \ 856 $(DTEXTDOM) \ 857 $(DMESSAGE_DIR) \ 858 $(CPP_MTFLAG) \ 859 $(DOS_VERSION) \ 860 $(DOS_PLATFORM) \ 861 $(ENVROOT1:%=-I%/usr/include) \ 862 $(ENVROOT1:%=-I%/usr/cluster/include) \ 863 $(ENVROOT2:%=-I%/usr/include) \ 864 $(ENVROOT2:%=-I%/usr/cluster/include) 865 866 CPPFLAGS= $(CPPFLAGS.master) -I$(REF_INC) 867 AS_CPPFLAGS= $(CPPFLAGS.master) -I$(REF_INC) 868 869 # 870 # Define compilation macros. 871 # 872 COMPILE.c= $(CC) $(CFLAGS) $(CPPFLAGS) -c 873 COMPILE64.c= $(CC) $(CFLAGS64) $(CPPFLAGS) -c 874 COMPILE.cc= $(CCC) $(CCFLAGS) $(CPPFLAGS) -c 875 COMPILE64.cc= $(CCC) $(CCFLAGS64) $(CPPFLAGS) -c 876 COMPILE.s= $(AS) $(ASFLAGS) $(AS_CPPFLAGS) 877 878 CLASSPATH= . 879 COMPILE.java= $(JAVAC) $(JAVAFLAGS) -classpath $(CLASSPATH) 880 881 # 882 # Link time macros 883 # 884 NORUNPATH = -norunpath 885 NOLIB = -nolib 886 LIBCC = $(REF_USRLIB:%=%/libCstd.so.1) $(REF_USRLIB:%=%/libCrun.so.1) 887 CCNEEDED = $(LIBCC) $(REF_USRLIB:%=%/libc.so) 888 COMPILE64.s= $(AS) $(ASFLAGS) $($(MACH64)_XARCH) $(AS_CPPFLAGS) 889 LINK.c= $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) 890 LINK64.c= $(CC) $(CFLAGS64) $(CPPFLAGS) $(LDFLAGS) 891 LINK.cc= $(CCC) $(CCFLAGS) $(CPPFLAGS) $(NORUNPATH) $(NOLIB) $(LDFLAGS) $(CCNEEDED) 892 LINK64.cc= $(CCC) $(CCFLAGS64) $(CPPFLAGS) $(NORUNPATH) $(NOLIB) $(LDFLAGS) $(CCNEEDED) 893 894 sparc_LINT= $(SPRO_ROOT)/$(SPRO_VERS)/bin/lint 895 i386_LINT= $(SPRO_ROOT)/$(SPRO_VERS)/bin/lint 896 SPROLINT= $($(MACH)_LINT) 897 SPROLINT.c= $(SPROLINT) $(SPROLINTFLAGS) $(CPPFLAGS) 898 SPROLINTFLAGS += $(DEFAULT_LPATH) 899 900 LINTDEFS_= $(SRC)/tools/etc/gal.lnt 901 LINTDEFS_32= $(SRC)/tools/etc/gal.lnt 902 LINTDEFS_64= $(SRC)/tools/etc/gal64.lnt 903 LINTDEFS= $(LINTDEFS_$(CLASS)) 904 LINTDEFS64= $(LINTDEFS_64) 905 LINTCCFLAGS= +fcp 906 LINTCCFLAGS64= +fcp 907 LINTFLAGS= $(LINTDEFS) $(AS_CPPFLAGS) -I$(CCC_INCLUDE) -D_REENTRANT 908 LINTFLAGS64= $(LINTDEFS64) $(AS_CPPFLAGS) -I$(CCC_INCLUDE) -D_REENTRANT 909 LINT= $(TRUE) 910 LINT64= $(TRUE) 911 $(CLOSED_BUILD)LINT= $(BUILD_TOOLS)/misc/bin/flexelint8.00u $(FLEXELINTDEFS) 912 $(CLOSED_BUILD)LINT64= $(BUILD_TOOLS)/misc/bin/flexelint8.00u $(FLEXELINTDEFS64) 913 LINT.c= $(LINT) $(LINTFLAGS) $(CPPFLAGS) 914 LINT.cc= $(LINT) $(LINTFLAGS) $(LINTCCFLAGS) $(CPPFLAGS) 915 LINT64.c= $(LINT) $(LINTFLAGS64) $(CPPFLAGS) 916 LINT64.cc= $(LINT64) $(LINTFLAGS64) $(LINTCCFLAGS64) $(CPPFLAGS) 917 918 # 919 # There are some redundant definitions above. The cleaned up could be taken up 920 # later, so as to make LINT definitions not FLEXELINT specific. 921 # 922 FLEXELINT=$(TRUE) 923 FLEXELINT64=$(TRUE) 924 $(CLOSED_BUILD)FLEXELINT=$(BUILD_TOOLS)/misc/bin/flexelint8.00u 925 $(CLOSED_BUILD)FLEXELINT64=$(BUILD_TOOLS)/misc/bin/flexelint8.00u 926 927 FLEXELINTFLAGS= $(LINTFLAGS) $(LINTCCFLAGS) $(CPPFLAGS) 928 FLEXELINTFLAGS += -I$(CCC_STD_INCLUDE) -I$(CCC_STLPORT_INCLUDE) 929 FLEXELINTFLAGS64= $(LINTFLAGS64) $(LINTCCFLAGS64) $(CPPFLAGS) 930 FLEXELINTFLAGS64 += -I$(CCC_STD_INCLUDE) -I$(CCC_STLPORT_INCLUDE) 931 932 FLEXELINT.cc= $(FLEXELINT) $(FLEXELINTDEFS) $(FLEXELINTFLAGS) 933 FLEXELINT64.cc= $(FLEXELINT64) $(FLEXELINTDEFS64) $(FLEXELINTFLAGS64) 934 935 # 936 # this path must be explicitly specified to flexelint, because it does not 937 # follow the same convention for C++ standard library headers as used by 938 # sun studio compilers. 939 # 940 CCC_STD_INCLUDE= $(CCC_INCLUDE)/Cstd 941 CCC_STLPORT_INCLUDE= $(CCC_INCLUDE)/stlport4 942 943 # 944 # Use flexelint by default 945 # 946 LINT.cc = $(FLEXELINT.cc) 947 LINT64.cc = $(FLEXELINT64.cc) 948 949 # Define native compilation macros 950 # 951 952 # Base directory where compilers are loaded. 953 # Defined here so it can be overridden by developer. 954 # 955 SPRO_ROOT= $(BUILD_TOOLS)/SUNWspro 956 SPRO_LIBS= $(SPRO_ROOT)/$(SPRO_VERS)/prod/lib 957 958 # Specify platform compiler versions for languages 959 # that we use (currently only c and c++). 960 # 961 sparc_CC= $(SPRO_ROOT)/$(SPRO_VERS)/bin/cc 962 sparc_CCC= $(SPRO_ROOT)/$(SPRO_VERS)/bin/CC 963 sparc_AS= /usr/ccs/bin/as -xregsym=no 964 sparc_LD= /usr/ccs/bin/ld 965 966 sparcv9_CC= $(SPRO_ROOT)/$(SPRO_VERS64)/bin/cc 967 sparcv9_CCC= $(SPRO_ROOT)/$(SPRO_VERS64)/bin/CC 968 sparcv9_AS= /usr/ccs/bin/as -xregsym=no 969 sparcv9_LD= /usr/ccs/bin/ld 970 971 i386_CC= $(SPRO_ROOT)/$(SPRO_VERS)/bin/cc 972 i386_CCC= $(SPRO_ROOT)/$(SPRO_VERS)/bin/CC 973 i386_AS= /usr/ccs/bin/as 974 i386_LD= /usr/ccs/bin/ld 975 976 amd64_CC= $(SPRO_ROOT)/$(SPRO_VERS64)/bin/cc 977 amd64_CCC= $(SPRO_ROOT)/$(SPRO_VERS64)/bin/CC 978 amd64_AS= $(SPRO_ROOT)/$(SPRO_VERS64)/prod/bin/as 979 amd64_LD= /usr/ccs/bin/ld 980 981 NATIVECC= $($(NATIVE_MACH)_CC) 982 NATIVECCC= $($(NATIVE_MACH)_CCC) 983 NATIVEAS= $($(NATIVE_MACH)_AS) 984 NATIVELD= $($(NATIVE_MACH)_LD) 985 986 987 # 988 # Path to C++ include files 989 # 990 CCC_INCLUDE= $(SPRO_ROOT)/$(SPRO_VERS)/prod/include/CC 991 992 # 993 # Makefile.master.64 overrides these settings 994 # 995 CC= $(NATIVECC) 996 CCC= $(NATIVECCC) 997 AS= $(NATIVEAS) 998 LD= $(NATIVELD) 999 1000 # Rules (normally from make.rules) and macros which are used for post 1001 # processing files. Normally, these do stripping of the comment section 1002 # automatically. 1003 # RELEASE_CM: Should be editted to reflect the release. 1004 # POST_PROCESS_O: Post-processing for `.o' files. 1005 # POST_PROCESS_A: Post-processing for `.a' files (currently null). 1006 # POST_PROCESS_SO: Post-processing for `.so' files. 1007 # POST_PROCESS: Post-processing for executable files (no suffix). 1008 # Note that these macros are not completely generalized as they are to be 1009 # used with the file name to be processed following. 1010 # 1011 # It is left as an exercise to Release Engineering to embellish the generation 1012 # of the release comment string. 1013 # 1014 # If this is a debug build: 1015 # compress the comment section (mcs -c) 1016 # add the standard comment (mcs -a $(RELEASE_CM)) 1017 # add the development specific comment (mcs -a $(DEV_CM)) 1018 # 1019 # If this is a non-debug build: 1020 # delete the comment section (mcs -d) 1021 # add the standard comment (mcs -a $(RELEASE_CM)) 1022 # 1023 # The following list of macros are used in the definition of RELEASE_CM 1024 # which is used to label all binaries in the build: 1025 # 1026 # RELEASE Specific release of the build, eg: 3.2 1027 # VERSION Version is u1 for Update 1, blank for mktg release 1028 # 1029 # SC_RELEASE must follow the format documented in cmd/scnm/Makefile 1030 # The value of the URN will change for every entry 1031 # to the swoRDFish taxonomy for a release 1032 # 1033 RELEASE= 3.2 1034 QUORUM_SERVER_RELEASE= 1.0 1035 VERSION= u2 1036 VERSION_CM= Update 2 1037 QUORUM_SERVER_VERSION= u2 1038 SC_RELEASE= 3.2u2 1039 DEV_NM= Sun Cluster 1040 SOLARIS_CM= Solaris 9 1041 $(S10_BUILD)SOLARIS_CM= Solaris 10 1042 $(S11_BUILD)SOLARIS_CM= Solaris 11 1043 URN= urn:uuid:fb7f5624-407f-11d8-8663-080020a9ed93 1044 PARENTURN= urn:uuid:b3213959-9c2a-11db-b013-080020a9ed93 1045 1046 RELEASE_CM= "@($(POUND_SIGN))$(DEV_NM) $(RELEASE) $(VERSION_CM) for $(SOLARIS_CM) $(NATIVE_MACH)" 1047 DEV_CM= "@($(POUND_SIGN))$(DEV_NM) Internal Development: $(VERSION) `$(ECHO) $$LOGNAME` `date +%Y-%m-%d` `$(ECHO) [\`basename $$CODEMGR_WS\`]`" 1048 1049 PROCESS_COMMENT= @?${MCS} -c -a $(RELEASE_CM) -a $(DEV_CM) 1050 $(STRIP_COMMENTS)PROCESS_COMMENT= @?${MCS} -d -a $(RELEASE_CM) -a $(DEV_CM) 1051 $(RELEASE_BUILD)PROCESS_COMMENT= @?${MCS} -d -a $(RELEASE_CM) 1052 1053 POST_PROCESS_O= $(PROCESS_COMMENT) $@ 1054 POST_PROCESS_A= 1055 POST_PROCESS_SO= $(PROCESS_COMMENT) $@ 1056 POST_PROCESS= $(PROCESS_COMMENT) $@ 1057 1058 # Default build rules which perform comment section post-processing. 1059 # 1060 .c: 1061 $(LINK.c) -o $@ $< $(LDLIBS) 1062 $(POST_PROCESS) 1063 .c.o: 1064 $(COMPILE.c) $(OUTPUT_OPTION) $< 1065 $(POST_PROCESS_O) 1066 .c.a: 1067 $(COMPILE.c) -o $% $< 1068 $(PROCESS_COMMENT) $% 1069 $(AR) $(ARFLAGS) $@ $% 1070 $(RM) $% 1071 .s.o: 1072 $(COMPILE.s) -o $@ $< 1073 $(POST_PROCESS_O) 1074 .s.a: 1075 $(COMPILE.s) -o $% $< 1076 $(PROCESS_COMMENT) $% 1077 $(AR) $(ARFLAGS) $@ $% 1078 $(RM) $% 1079 .cc: 1080 $(LINK.cc) -o $@ $< $(LDLIBS) 1081 $(POST_PROCESS) 1082 .cc.o: 1083 $(COMPILE.cc) $(OUTPUT_OPTION) $< 1084 $(POST_PROCESS_O) 1085 .cc.a: 1086 $(COMPILE.cc) -o $% $< 1087 $(AR) $(ARFLAGS) $@ $% 1088 $(PROCESS_COMMENT) $% 1089 $(RM) $% 1090 .c.ln: 1091 $(LINT.c) $< > $@ 1092 $(CAT) $@ 1093 .cc.ln: 1094 $(LINT.cc) $< > $@ 1095 $(CAT) $@ 1096 .y: 1097 $(YACC.y) $< 1098 $(LINK.c) -o $@ y.tab.c $(LDLIBS) 1099 $(POST_PROCESS) 1100 $(RM) y.tab.c 1101 .y.o: 1102 $(YACC.y) $< 1103 $(COMPILE.c) -o $@ y.tab.c 1104 $(POST_PROCESS_O) 1105 $(RM) y.tab.c 1106 .l: 1107 $(RM) $*.c 1108 $(LEX.l) $< > $*.c 1109 $(LINK.c) -o $@ $*.c -ll $(LDLIBS) 1110 $(POST_PROCESS) 1111 $(RM) $*.c 1112 .l.o: 1113 $(RM) $*.c 1114 $(LEX.l) $< > $*.c 1115 $(COMPILE.c) -o $@ $*.c 1116 $(POST_PROCESS_O) 1117 $(RM) $*.c 1118 1119 .java.class: 1120 $(COMPILE.java) $< 1121 1122 # 1123 # Rules for ksh scripts 1124 # 1125 .SUFFIXES: $(SUFFIXES) .ksh 1126 1127 # enable incremental builds by group members 1128 .sh .ksh: 1129 $(RM) $@ 1130 $(CAT) $< > $@ 1131 -$(CHMOD) +wx $@ 1132 1133 # 1134 # Rules to create message catalogue files from .c, .y, and .l files. 1135 .c.po: 1136 $(COMPILE.cpp) $< > $<.i 1137 $(BUILD.po) 1138 1139 .y.po: 1140 yacc -d $< 1141 $(COMPILE.cpp) y.tab.c > $<.i 1142 $(BUILD.po) 1143 $(RM) y.tab.c 1144 1145 .l.po: 1146 lex $< 1147 $(COMPILE.cpp) lex.yy.c > $<.i 1148 $(BUILD.po) 1149 $(RM) lex.yy.c 1150 1151 # 1152 # Rules to perform stylistic checks 1153 # 1154 .SUFFIXES: $(SUFFIXES) 1155 1156 %.x_check: %.x 1157 $(DOT_X_CHECK) 1158 1159 %.c_check: %.c 1160 $(DOT_C_CHECK) 1161 1162 %.c_check: %.cc 1163 $(DOT_C_CHECK) 1164 1165 %.c_check: ../common/%.c 1166 $(DOT_C_CHECK) 1167 1168 %.c_check: ../common/%.cc 1169 $(DOT_C_CHECK) 1170 1171 %.c_check: ../../common/%.c 1172 $(DOT_C_CHECK) 1173 1174 %.c_check: ../../common/%.cc 1175 $(DOT_C_CHECK) 1176 1177 %.h_check: %.h 1178 $(DOT_H_CHECK) 1179 1180 %.h_check: ../common/%.h 1181 $(DOT_H_CHECK) 1182 1183 %.h_check: ../%.h 1184 $(DOT_H_CHECK) 1185 1186 include $(SRC)/Makefile.master.$(OSNAME) 1187