make/linux/Makefile

Thu, 04 Apr 2019 17:56:29 +0800

author
aoqi
date
Thu, 04 Apr 2019 17:56:29 +0800
changeset 9572
624a0741915c
parent 9139
da33de9f115e
child 9637
eef07cd490d4
permissions
-rw-r--r--

Merge

aoqi@0 1 #
sgehwolf@7874 2 # Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
aoqi@0 3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
aoqi@0 4 #
aoqi@0 5 # This code is free software; you can redistribute it and/or modify it
aoqi@0 6 # under the terms of the GNU General Public License version 2 only, as
aoqi@0 7 # published by the Free Software Foundation.
aoqi@0 8 #
aoqi@0 9 # This code is distributed in the hope that it will be useful, but WITHOUT
aoqi@0 10 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
aoqi@0 11 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
aoqi@0 12 # version 2 for more details (a copy is included in the LICENSE file that
aoqi@0 13 # accompanied this code).
aoqi@0 14 #
aoqi@0 15 # You should have received a copy of the GNU General Public License version
aoqi@0 16 # 2 along with this work; if not, write to the Free Software Foundation,
aoqi@0 17 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
aoqi@0 18 #
aoqi@0 19 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
aoqi@0 20 # or visit www.oracle.com if you need additional information or have any
aoqi@0 21 # questions.
aoqi@0 22 #
aoqi@0 23 #
aoqi@0 24
aoqi@0 25 # This makefile creates a build tree and lights off a build.
aoqi@0 26 # You can go back into the build tree and perform rebuilds or
aoqi@0 27 # incremental builds as desired. Be sure to reestablish
aoqi@0 28 # environment variable settings for LD_LIBRARY_PATH and JAVA_HOME.
aoqi@0 29
aoqi@0 30 # The make process now relies on java and javac. These can be
aoqi@0 31 # specified either implicitly on the PATH, by setting the
aoqi@0 32 # (JDK-inherited) ALT_BOOTDIR environment variable to full path to a
aoqi@0 33 # JDK in which bin/java and bin/javac are present and working (e.g.,
aoqi@0 34 # /usr/local/java/jdk1.3/solaris), or via the (JDK-inherited)
aoqi@0 35 # default BOOTDIR path value. Note that one of ALT_BOOTDIR
aoqi@0 36 # or BOOTDIR has to be set. We do *not* search javac, javah, rmic etc.
aoqi@0 37 # from the PATH.
aoqi@0 38 #
aoqi@0 39 # One can set ALT_BOOTDIR or BOOTDIR to point to a jdk that runs on
aoqi@0 40 # an architecture that differs from the target architecture, as long
aoqi@0 41 # as the bootstrap jdk runs under the same flavor of OS as the target
aoqi@0 42 # (i.e., if the target is linux, point to a jdk that runs on a linux
aoqi@0 43 # box). In order to use such a bootstrap jdk, set the make variable
aoqi@0 44 # REMOTE to the desired remote command mechanism, e.g.,
aoqi@0 45 #
aoqi@0 46 # make REMOTE="rsh -l me myotherlinuxbox"
aoqi@0 47
aoqi@0 48 # Along with VM, Serviceability Agent (SA) is built for SA/JDI binding.
aoqi@0 49 # JDI binding on SA produces two binaries:
aoqi@0 50 # 1. sa-jdi.jar - This is built before building libjvm.so
aoqi@0 51 # Please refer to ./makefiles/sa.make
aoqi@0 52 # 2. libsa.so - Native library for SA - This is built after
aoqi@0 53 # libjsig.so (signal interposition library)
aoqi@0 54 # Please refer to ./makefiles/vm.make
aoqi@0 55 # If $(GAMMADIR)/agent dir is not present, SA components are not built.
aoqi@0 56
aoqi@0 57 ifeq ($(GAMMADIR),)
aoqi@0 58 include ../../make/defs.make
aoqi@0 59 else
aoqi@0 60 include $(GAMMADIR)/make/defs.make
aoqi@0 61 endif
aoqi@0 62 include $(GAMMADIR)/make/$(OSNAME)/makefiles/rules.make
aoqi@0 63
aoqi@0 64 ifndef CC_INTERP
aoqi@0 65 ifndef FORCE_TIERED
aoqi@0 66 FORCE_TIERED=1
aoqi@0 67 endif
aoqi@0 68 endif
aoqi@0 69 # C1 is not ported on ppc64, so we cannot build a tiered VM:
gthornbr@8200 70 # Notice: after 8046471 ARCH will be 'ppc' for top-level ppc64 builds but
gthornbr@8200 71 # 'ppc64' for HotSpot-only ppc64 builds. Need to detect both variants here!
gthornbr@8200 72 ifneq (,$(findstring $(ARCH), ppc ppc64))
gthornbr@8200 73 ifeq ($(ARCH_DATA_MODEL), 64)
gthornbr@8200 74 FORCE_TIERED=0
gthornbr@8200 75 endif
aoqi@0 76 endif
aoqi@392 77 # C1 is not ported on mips64, so we cannot build a tiered VM:
aoqi@9139 78 ifeq (mips64, $(findstring mips64, $(ARCH)))
aoqi@392 79 FORCE_TIERED=0
aoqi@392 80 endif
aoqi@0 81
aoqi@0 82 ifdef LP64
aoqi@0 83 ifeq ("$(filter $(LP64_ARCH),$(BUILDARCH))","")
aoqi@0 84 _JUNK_ := $(shell echo >&2 \
aoqi@0 85 $(OSNAME) $(ARCH) "*** ERROR: this platform does not support 64-bit compilers!")
aoqi@0 86 @exit 1
aoqi@0 87 endif
aoqi@0 88 endif
aoqi@0 89
aoqi@0 90 # we need to set up LP64 correctly to satisfy sanity checks in adlc
aoqi@0 91 ifneq ("$(filter $(LP64_ARCH),$(BUILDARCH))","")
aoqi@0 92 MFLAGS += " LP64=1 "
aoqi@0 93 endif
aoqi@0 94
aoqi@0 95 # pass USE_SUNCC further, through MFLAGS
aoqi@0 96 ifdef USE_SUNCC
aoqi@0 97 MFLAGS += " USE_SUNCC=1 "
aoqi@0 98 endif
aoqi@0 99
aoqi@0 100 # The following renders pathnames in generated Makefiles valid on
aoqi@0 101 # machines other than the machine containing the build tree.
aoqi@0 102 #
aoqi@0 103 # For example, let's say my build tree lives on /files12 on
aoqi@0 104 # exact.east.sun.com. This logic will cause GAMMADIR to begin with
aoqi@0 105 # /net/exact/files12/...
aoqi@0 106 #
aoqi@0 107 # We only do this on SunOS variants, for a couple of reasons:
aoqi@0 108 # * It is extremely rare that source trees exist on other systems
aoqi@0 109 # * It has been claimed that the Linux automounter is flakey, so
aoqi@0 110 # changing GAMMADIR in a way that exercises the automounter could
aoqi@0 111 # prove to be a source of unreliability in the build process.
aoqi@0 112 # Obviously, this Makefile is only relevant on SunOS boxes to begin
aoqi@0 113 # with, but the SunOS conditionalization will make it easier to
aoqi@0 114 # combine Makefiles in the future (assuming we ever do that).
aoqi@0 115
aoqi@0 116 ifeq ($(OSNAME),solaris)
aoqi@0 117
aoqi@0 118 # prepend current directory to relative pathnames.
aoqi@0 119 NEW_GAMMADIR := \
aoqi@0 120 $(shell echo $(GAMMADIR) | \
aoqi@0 121 sed -e "s=^\([^/].*\)=$(shell pwd)/\1=" \
aoqi@0 122 )
aoqi@0 123 unexport NEW_GAMMADIR
aoqi@0 124
aoqi@0 125 # If NEW_GAMMADIR doesn't already start with "/net/":
aoqi@0 126 ifeq ($(strip $(filter /net/%,$(NEW_GAMMADIR))),)
aoqi@0 127 # prepend /net/$(HOST)
aoqi@0 128 # remove /net/$(HOST) if name already began with /home/
aoqi@0 129 # remove /net/$(HOST) if name already began with /java/
aoqi@0 130 # remove /net/$(HOST) if name already began with /lab/
aoqi@0 131 NEW_GAMMADIR := \
aoqi@0 132 $(shell echo $(NEW_GAMMADIR) | \
aoqi@0 133 sed -e "s=^\(.*\)=/net/$(HOST)\1=" \
aoqi@0 134 -e "s=^/net/$(HOST)/home/=/home/=" \
aoqi@0 135 -e "s=^/net/$(HOST)/java/=/java/=" \
aoqi@0 136 -e "s=^/net/$(HOST)/lab/=/lab/=" \
aoqi@0 137 )
aoqi@0 138 # Don't use the new value for GAMMADIR unless a file with the new
aoqi@0 139 # name actually exists.
aoqi@0 140 ifneq ($(wildcard $(NEW_GAMMADIR)),)
aoqi@0 141 GAMMADIR := $(NEW_GAMMADIR)
aoqi@0 142 endif
aoqi@0 143 endif
aoqi@0 144
aoqi@0 145 endif
aoqi@0 146
aoqi@0 147 # BUILDARCH is set to "zero" for Zero builds. VARIANTARCH
aoqi@0 148 # is used to give the build directories meaningful names.
aoqi@0 149 VARIANTARCH = $(subst i386,i486,$(ZERO_LIBARCH))
aoqi@0 150
aoqi@0 151 # There is a (semi-) regular correspondence between make targets and actions:
aoqi@0 152 #
aoqi@0 153 # Target Tree Type Build Dir
aoqi@0 154 #
aoqi@0 155 # debug compiler2 <os>_<arch>_compiler2/debug
aoqi@0 156 # fastdebug compiler2 <os>_<arch>_compiler2/fastdebug
aoqi@0 157 # optimized compiler2 <os>_<arch>_compiler2/optimized
aoqi@0 158 # product compiler2 <os>_<arch>_compiler2/product
aoqi@0 159 #
aoqi@0 160 # debug1 compiler1 <os>_<arch>_compiler1/debug
aoqi@0 161 # fastdebug1 compiler1 <os>_<arch>_compiler1/fastdebug
aoqi@0 162 # optimized1 compiler1 <os>_<arch>_compiler1/optimized
aoqi@0 163 # product1 compiler1 <os>_<arch>_compiler1/product
aoqi@0 164 #
aoqi@0 165 # debugcore core <os>_<arch>_core/debug
aoqi@0 166 # fastdebugcore core <os>_<arch>_core/fastdebug
aoqi@0 167 # optimizedcore core <os>_<arch>_core/optimized
aoqi@0 168 # productcore core <os>_<arch>_core/product
aoqi@0 169 #
aoqi@0 170 # debugzero zero <os>_<arch>_zero/debug
aoqi@0 171 # fastdebugzero zero <os>_<arch>_zero/fastdebug
aoqi@0 172 # optimizedzero zero <os>_<arch>_zero/optimized
aoqi@0 173 # productzero zero <os>_<arch>_zero/product
aoqi@0 174 #
aoqi@0 175 # debugshark shark <os>_<arch>_shark/debug
aoqi@0 176 # fastdebugshark shark <os>_<arch>_shark/fastdebug
aoqi@0 177 # optimizedshark shark <os>_<arch>_shark/optimized
aoqi@0 178 # productshark shark <os>_<arch>_shark/product
aoqi@0 179 #
aoqi@0 180 # fastdebugminimal1 minimal1 <os>_<arch>_minimal1/fastdebug
aoqi@0 181 # productminimal1 minimal1 <os>_<arch>_minimal1/product
aoqi@0 182 #
aoqi@0 183 # What you get with each target:
aoqi@0 184 #
aoqi@0 185 # debug* - debug compile with asserts enabled
aoqi@0 186 # fastdebug* - optimized compile, but with asserts enabled
aoqi@0 187 # optimized* - optimized compile, no asserts
aoqi@0 188 # product* - the shippable thing: optimized compile, no asserts, -DPRODUCT
aoqi@0 189
aoqi@0 190 # This target list needs to be coordinated with the usage message
aoqi@0 191 # in the build.sh script:
aoqi@0 192 TARGETS = debug fastdebug optimized product
aoqi@0 193
aoqi@0 194 ifeq ($(findstring true, $(JVM_VARIANT_ZERO) $(JVM_VARIANT_ZEROSHARK)), true)
aoqi@0 195 SUBDIR_DOCS = $(OSNAME)_$(VARIANTARCH)_docs
aoqi@0 196 else
aoqi@0 197 SUBDIR_DOCS = $(OSNAME)_$(BUILDARCH)_docs
aoqi@0 198 endif
aoqi@0 199 SUBDIRS_C1 = $(addprefix $(OSNAME)_$(BUILDARCH)_compiler1/,$(TARGETS))
aoqi@0 200 SUBDIRS_C2 = $(addprefix $(OSNAME)_$(BUILDARCH)_compiler2/,$(TARGETS))
aoqi@0 201 SUBDIRS_TIERED = $(addprefix $(OSNAME)_$(BUILDARCH)_tiered/,$(TARGETS))
aoqi@0 202 SUBDIRS_CORE = $(addprefix $(OSNAME)_$(BUILDARCH)_core/,$(TARGETS))
aoqi@0 203 SUBDIRS_ZERO = $(addprefix $(OSNAME)_$(VARIANTARCH)_zero/,$(TARGETS))
aoqi@0 204 SUBDIRS_SHARK = $(addprefix $(OSNAME)_$(VARIANTARCH)_shark/,$(TARGETS))
aoqi@0 205 SUBDIRS_MINIMAL1 = $(addprefix $(OSNAME)_$(BUILDARCH)_minimal1/,$(TARGETS))
aoqi@0 206
aoqi@0 207 TARGETS_C2 = $(TARGETS)
aoqi@0 208 TARGETS_C1 = $(addsuffix 1,$(TARGETS))
aoqi@0 209 TARGETS_TIERED = $(addsuffix tiered,$(TARGETS))
aoqi@0 210 TARGETS_CORE = $(addsuffix core,$(TARGETS))
aoqi@0 211 TARGETS_ZERO = $(addsuffix zero,$(TARGETS))
aoqi@0 212 TARGETS_SHARK = $(addsuffix shark,$(TARGETS))
aoqi@0 213 TARGETS_MINIMAL1 = $(addsuffix minimal1,$(TARGETS))
aoqi@0 214
aoqi@0 215 BUILDTREE_MAKE = $(GAMMADIR)/make/$(OSNAME)/makefiles/buildtree.make
aoqi@0 216 BUILDTREE_VARS = GAMMADIR=$(GAMMADIR) OS_FAMILY=$(OSNAME) SRCARCH=$(SRCARCH) BUILDARCH=$(BUILDARCH) LIBARCH=$(LIBARCH)
aoqi@0 217 BUILDTREE_VARS += HOTSPOT_RELEASE_VERSION=$(HOTSPOT_RELEASE_VERSION) HOTSPOT_BUILD_VERSION=$(HOTSPOT_BUILD_VERSION) JRE_RELEASE_VERSION=$(JRE_RELEASE_VERSION)
aoqi@0 218 BUILDTREE_VARS += ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS) OBJCOPY=$(OBJCOPY) STRIP_POLICY=$(STRIP_POLICY) ZIP_DEBUGINFO_FILES=$(ZIP_DEBUGINFO_FILES) ZIPEXE=$(ZIPEXE)
aoqi@0 219
aoqi@0 220 BUILDTREE = $(MAKE) -f $(BUILDTREE_MAKE) $(BUILDTREE_VARS)
aoqi@0 221
aoqi@0 222 #-------------------------------------------------------------------------------
aoqi@0 223
aoqi@0 224 # Could make everything by default, but that would take a while.
aoqi@0 225 all:
aoqi@0 226 @echo "Try '$(MAKE) <target> ...' where <target> is one or more of"
aoqi@0 227 @echo " $(TARGETS_C2)"
aoqi@0 228 @echo " $(TARGETS_C1)"
aoqi@0 229 @echo " $(TARGETS_CORE)"
aoqi@0 230 @echo " $(TARGETS_ZERO)"
aoqi@0 231 @echo " $(TARGETS_SHARK)"
aoqi@0 232 @echo " $(TARGETS_MINIMAL1)"
aoqi@0 233
aoqi@0 234 checks: check_os_version check_j2se_version
aoqi@0 235
aoqi@0 236 # We do not want people accidentally building on old systems (e.g. Linux 2.2.x,
aoqi@0 237 # Solaris 2.5.1, 2.6).
aoqi@0 238 # Disable this check by setting DISABLE_HOTSPOT_OS_VERSION_CHECK=ok.
aoqi@0 239
aoqi@27 240 SUPPORTED_OS_VERSION = 2.4% 2.5% 2.6% 3% 4%
aoqi@0 241 OS_VERSION := $(shell uname -r)
aoqi@0 242 EMPTY_IF_NOT_SUPPORTED = $(filter $(SUPPORTED_OS_VERSION),$(OS_VERSION))
aoqi@0 243
aoqi@0 244 check_os_version:
aoqi@0 245 ifeq ($(DISABLE_HOTSPOT_OS_VERSION_CHECK)$(EMPTY_IF_NOT_SUPPORTED),)
aoqi@0 246 $(QUIETLY) >&2 echo "*** This OS is not supported:" `uname -a`; exit 1;
aoqi@0 247 endif
aoqi@0 248
aoqi@0 249 # jvmti.make requires XSLT (J2SE 1.4.x or newer):
aoqi@0 250 XSLT_CHECK = $(REMOTE) $(RUN.JAVAP) javax.xml.transform.TransformerFactory
aoqi@0 251 # If not found then fail fast.
aoqi@0 252 check_j2se_version:
aoqi@0 253 $(QUIETLY) $(XSLT_CHECK) > /dev/null 2>&1; \
aoqi@0 254 if [ $$? -ne 0 ]; then \
aoqi@0 255 $(REMOTE) $(RUN.JAVA) -version; \
aoqi@0 256 echo "*** An XSLT processor (J2SE 1.4.x or newer) is required" \
aoqi@0 257 "to bootstrap this build" 1>&2; \
aoqi@0 258 exit 1; \
aoqi@0 259 fi
aoqi@0 260
aoqi@0 261 $(SUBDIRS_TIERED): $(BUILDTREE_MAKE)
aoqi@0 262 $(QUIETLY) $(MAKE) -f $(GAMMADIR)/make/$(OSNAME)/Makefile checks
aoqi@0 263 $(BUILDTREE) VARIANT=tiered
aoqi@0 264
aoqi@0 265 $(SUBDIRS_C2): $(BUILDTREE_MAKE)
aoqi@0 266 ifeq ($(FORCE_TIERED),1)
aoqi@0 267 $(QUIETLY) $(MAKE) -f $(GAMMADIR)/make/$(OSNAME)/Makefile checks
aoqi@0 268 $(BUILDTREE) VARIANT=tiered FORCE_TIERED=1
aoqi@0 269 else
aoqi@0 270 $(QUIETLY) $(MAKE) -f $(GAMMADIR)/make/$(OSNAME)/Makefile checks
aoqi@0 271 $(BUILDTREE) VARIANT=compiler2
aoqi@0 272 endif
aoqi@0 273
aoqi@0 274 $(SUBDIRS_C1): $(BUILDTREE_MAKE)
aoqi@0 275 $(QUIETLY) $(MAKE) -f $(GAMMADIR)/make/$(OSNAME)/Makefile checks
aoqi@0 276 $(BUILDTREE) VARIANT=compiler1
aoqi@0 277
aoqi@0 278 $(SUBDIRS_CORE): $(BUILDTREE_MAKE)
aoqi@0 279 $(QUIETLY) $(MAKE) -f $(GAMMADIR)/make/$(OSNAME)/Makefile checks
aoqi@0 280 $(BUILDTREE) VARIANT=core
aoqi@0 281
aoqi@0 282 $(SUBDIRS_ZERO): $(BUILDTREE_MAKE) platform_zero
aoqi@0 283 $(QUIETLY) $(MAKE) -f $(GAMMADIR)/make/$(OSNAME)/Makefile checks
aoqi@0 284 $(BUILDTREE) VARIANT=zero VARIANTARCH=$(VARIANTARCH)
aoqi@0 285
aoqi@0 286 $(SUBDIRS_SHARK): $(BUILDTREE_MAKE) platform_zero
aoqi@0 287 $(QUIETLY) $(MAKE) -f $(GAMMADIR)/make/$(OSNAME)/Makefile checks
aoqi@0 288 $(BUILDTREE) VARIANT=shark VARIANTARCH=$(VARIANTARCH)
aoqi@0 289
aoqi@0 290 $(SUBDIRS_MINIMAL1): $(BUILDTREE_MAKE)
aoqi@0 291 $(QUIETLY) $(MAKE) -f $(GAMMADIR)/make/$(OSNAME)/Makefile checks
aoqi@0 292 $(BUILDTREE) VARIANT=minimal1
aoqi@0 293
aoqi@0 294
aoqi@0 295 platform_zero: $(GAMMADIR)/make/$(OSNAME)/platform_zero.in
aoqi@0 296 $(SED) 's/@ZERO_ARCHDEF@/$(ZERO_ARCHDEF)/g;s/@ZERO_LIBARCH@/$(ZERO_LIBARCH)/g;' < $< > $@
aoqi@0 297
aoqi@0 298 # Define INSTALL=y at command line to automatically copy JVM into JAVA_HOME
aoqi@0 299
aoqi@0 300 $(TARGETS_C2): $(SUBDIRS_C2)
aoqi@0 301 cd $(OSNAME)_$(BUILDARCH)_compiler2/$@ && $(MAKE) $(MFLAGS)
aoqi@0 302 ifdef INSTALL
aoqi@0 303 cd $(OSNAME)_$(BUILDARCH)_compiler2/$@ && $(MAKE) $(MFLAGS) install
aoqi@0 304 endif
aoqi@0 305
aoqi@0 306 $(TARGETS_TIERED): $(SUBDIRS_TIERED)
aoqi@0 307 cd $(OSNAME)_$(BUILDARCH)_tiered/$(patsubst %tiered,%,$@) && $(MAKE) $(MFLAGS)
aoqi@0 308 ifdef INSTALL
aoqi@0 309 cd $(OSNAME)_$(BUILDARCH)_tiered/$(patsubst %tiered,%,$@) && $(MAKE) $(MFLAGS) install
aoqi@0 310 endif
aoqi@0 311
aoqi@0 312 $(TARGETS_C1): $(SUBDIRS_C1)
aoqi@0 313 cd $(OSNAME)_$(BUILDARCH)_compiler1/$(patsubst %1,%,$@) && $(MAKE) $(MFLAGS)
aoqi@0 314 ifdef INSTALL
aoqi@0 315 cd $(OSNAME)_$(BUILDARCH)_compiler1/$(patsubst %1,%,$@) && $(MAKE) $(MFLAGS) install
aoqi@0 316 endif
aoqi@0 317
aoqi@0 318 $(TARGETS_CORE): $(SUBDIRS_CORE)
aoqi@0 319 cd $(OSNAME)_$(BUILDARCH)_core/$(patsubst %core,%,$@) && $(MAKE) $(MFLAGS)
aoqi@0 320 ifdef INSTALL
aoqi@0 321 cd $(OSNAME)_$(BUILDARCH)_core/$(patsubst %core,%,$@) && $(MAKE) $(MFLAGS) install
aoqi@0 322 endif
aoqi@0 323
aoqi@0 324 $(TARGETS_ZERO): $(SUBDIRS_ZERO)
aoqi@0 325 cd $(OSNAME)_$(VARIANTARCH)_zero/$(patsubst %zero,%,$@) && $(MAKE) $(MFLAGS)
aoqi@0 326 ifdef INSTALL
aoqi@0 327 cd $(OSNAME)_$(VARIANTARCH)_zero/$(patsubst %zero,%,$@) && $(MAKE) $(MFLAGS) install
aoqi@0 328 endif
aoqi@0 329
aoqi@0 330 $(TARGETS_SHARK): $(SUBDIRS_SHARK)
aoqi@0 331 cd $(OSNAME)_$(VARIANTARCH)_shark/$(patsubst %shark,%,$@) && $(MAKE) $(MFLAGS)
aoqi@0 332 ifdef INSTALL
aoqi@0 333 cd $(OSNAME)_$(VARIANTARCH)_shark/$(patsubst %shark,%,$@) && $(MAKE) $(MFLAGS) install
aoqi@0 334 endif
aoqi@0 335
aoqi@0 336 $(TARGETS_MINIMAL1): $(SUBDIRS_MINIMAL1)
aoqi@0 337 cd $(OSNAME)_$(BUILDARCH)_minimal1/$(patsubst %minimal1,%,$@) && $(MAKE) $(MFLAGS)
aoqi@0 338 ifdef INSTALL
aoqi@0 339 cd $(OSNAME)_$(BUILDARCH)_minimal1/$(patsubst %minimal1,%,$@) && $(MAKE) $(MFLAGS) install
aoqi@0 340 endif
aoqi@0 341
aoqi@0 342 # Just build the tree, and nothing else:
aoqi@0 343 tree: $(SUBDIRS_C2)
aoqi@0 344 tree1: $(SUBDIRS_C1)
aoqi@0 345 treecore: $(SUBDIRS_CORE)
aoqi@0 346 treezero: $(SUBDIRS_ZERO)
aoqi@0 347 treeshark: $(SUBDIRS_SHARK)
aoqi@0 348 treeminimal1: $(SUBDIRS_MINIMAL1)
aoqi@0 349
aoqi@0 350 # Doc target. This is the same for all build options.
aoqi@0 351 # Hence create a docs directory beside ...$(ARCH)_[...]
aoqi@0 352 # We specify 'BUILD_FLAVOR=product' so that the proper
aoqi@0 353 # ENABLE_FULL_DEBUG_SYMBOLS value is used.
aoqi@0 354 docs: checks
aoqi@0 355 $(QUIETLY) mkdir -p $(SUBDIR_DOCS)
aoqi@0 356 $(MAKE) -f $(GAMMADIR)/make/$(OSNAME)/makefiles/jvmti.make $(MFLAGS) $(BUILDTREE_VARS) JvmtiOutDir=$(SUBDIR_DOCS) BUILD_FLAVOR=product jvmtidocs
aoqi@0 357
aoqi@0 358 # Synonyms for win32-like targets.
aoqi@0 359 compiler2: debug product
aoqi@0 360
aoqi@0 361 compiler1: debug1 product1
aoqi@0 362
aoqi@0 363 core: debugcore productcore
aoqi@0 364
aoqi@0 365 zero: debugzero productzero
aoqi@0 366
aoqi@0 367 shark: debugshark productshark
aoqi@0 368
aoqi@0 369 warn_jvmg_deprecated:
aoqi@0 370 echo "Warning: The jvmg target has been replaced with debug"
aoqi@0 371 echo "Warning: Please update your usage"
aoqi@0 372
aoqi@0 373 jvmg: warn_jvmg_deprecated debug
aoqi@0 374
aoqi@0 375 jvmg1: warn_jvmg_deprecated debug1
aoqi@0 376
aoqi@0 377 jvmgcore: warn_jvmg_deprecated debugcore
aoqi@0 378
aoqi@0 379 jvmgzero: warn_jvmg_deprecated debugzero
aoqi@0 380
aoqi@0 381 jvmgshark: warn_jvmg_deprecated debugshark
aoqi@0 382
aoqi@0 383 clean_docs:
aoqi@0 384 rm -rf $(SUBDIR_DOCS)
aoqi@0 385
aoqi@0 386 clean_compiler1 clean_compiler2 clean_core clean_zero clean_shark clean_minimal1:
aoqi@0 387 rm -rf $(OSNAME)_$(BUILDARCH)_$(subst clean_,,$@)
aoqi@0 388
aoqi@0 389 clean: clean_compiler2 clean_compiler1 clean_core clean_zero clean_shark clean_minimal1 clean_docs
aoqi@0 390
aoqi@0 391 include $(GAMMADIR)/make/cscope.make
aoqi@0 392
aoqi@0 393 #
aoqi@0 394 # Include alternate Makefile if it exists.
aoqi@0 395 #
aoqi@0 396 -include $(HS_ALT_MAKE)/$(OSNAME)/Makefile.make
aoqi@0 397
aoqi@0 398 #-------------------------------------------------------------------------------
aoqi@0 399
aoqi@0 400 .PHONY: $(TARGETS_C2) $(TARGETS_C1) $(TARGETS_CORE) $(TARGETS_ZERO) $(TARGETS_SHARK) $(TARGETS_MINIMAL1)
aoqi@0 401 .PHONY: tree tree1 treecore treezero treeshark
aoqi@0 402 .PHONY: all compiler1 compiler2 core zero shark
aoqi@0 403 .PHONY: clean clean_compiler1 clean_compiler2 clean_core clean_zero clean_shark docs clean_docs
aoqi@0 404 .PHONY: checks check_os_version check_j2se_version
aoqi@0 405 .PHONY: $(HS_ALT_MAKE)/$(OSNAME)/Makefile.make

mercurial