make/linux/Makefile

Print this page


   1 #
   2 # Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
   3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4 #
   5 # This code is free software; you can redistribute it and/or modify it
   6 # under the terms of the GNU General Public License version 2 only, as
   7 # published by the Free Software Foundation.
   8 #
   9 # This code is distributed in the hope that it will be useful, but WITHOUT
  10 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12 # version 2 for more details (a copy is included in the LICENSE file that
  13 # accompanied this code).
  14 #
  15 # You should have received a copy of the GNU General Public License version
  16 # 2 along with this work; if not, write to the Free Software Foundation,
  17 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18 #
  19 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20 # or visit www.oracle.com if you need additional information or have any
  21 # questions.
  22 #


 125           )
 126     # Don't use the new value for GAMMADIR unless a file with the new
 127     # name actually exists.
 128     ifneq ($(wildcard $(NEW_GAMMADIR)),)
 129       GAMMADIR := $(NEW_GAMMADIR)
 130     endif
 131   endif
 132 
 133 endif
 134 
 135 # BUILDARCH is set to "zero" for Zero builds.  VARIANTARCH
 136 # is used to give the build directories meaningful names.
 137 VARIANTARCH = $(subst i386,i486,$(ZERO_LIBARCH))
 138 
 139 # There is a (semi-) regular correspondence between make targets and actions:
 140 #
 141 #       Target          Tree Type       Build Dir
 142 #
 143 #       debug           compiler2       <os>_<arch>_compiler2/debug
 144 #       fastdebug       compiler2       <os>_<arch>_compiler2/fastdebug
 145 #       jvmg            compiler2       <os>_<arch>_compiler2/jvmg
 146 #       optimized       compiler2       <os>_<arch>_compiler2/optimized
 147 #       profiled        compiler2       <os>_<arch>_compiler2/profiled
 148 #       product         compiler2       <os>_<arch>_compiler2/product
 149 #
 150 #       debug1          compiler1       <os>_<arch>_compiler1/debug
 151 #       fastdebug1      compiler1       <os>_<arch>_compiler1/fastdebug
 152 #       jvmg1           compiler1       <os>_<arch>_compiler1/jvmg
 153 #       optimized1      compiler1       <os>_<arch>_compiler1/optimized
 154 #       profiled1       compiler1       <os>_<arch>_compiler1/profiled
 155 #       product1        compiler1       <os>_<arch>_compiler1/product
 156 #
 157 #       debugcore       core            <os>_<arch>_core/debug
 158 #       fastdebugcore   core            <os>_<arch>_core/fastdebug
 159 #       jvmgcore        core            <os>_<arch>_core/jvmg
 160 #       optimizedcore   core            <os>_<arch>_core/optimized
 161 #       profiledcore    core            <os>_<arch>_core/profiled
 162 #       productcore     core            <os>_<arch>_core/product
 163 #
 164 #       debugzero       zero            <os>_<arch>_zero/debug
 165 #       fastdebugzero   zero            <os>_<arch>_zero/fastdebug
 166 #       jvmgzero        zero            <os>_<arch>_zero/jvmg
 167 #       optimizedzero   zero            <os>_<arch>_zero/optimized
 168 #       profiledzero    zero            <os>_<arch>_zero/profiled
 169 #       productzero     zero            <os>_<arch>_zero/product
 170 #
 171 #       debugshark      shark           <os>_<arch>_shark/debug
 172 #       fastdebugshark  shark           <os>_<arch>_shark/fastdebug
 173 #       jvmgshark       shark           <os>_<arch>_shark/jvmg
 174 #       optimizedshark  shark           <os>_<arch>_shark/optimized
 175 #       profiledshark   shark           <os>_<arch>_shark/profiled
 176 #       productshark    shark           <os>_<arch>_shark/product
 177 #
 178 #       fastdebugminimal1 minimal1      <os>_<arch>_minimal1/fastdebug
 179 #       jvmgminimal1      minimal1      <os>_<arch>_minimal1/jvmg
 180 #       productminimal1   minimal1      <os>_<arch>_minimal1/product
 181 #
 182 # What you get with each target:
 183 #
 184 # debug*     - "thin" libjvm - debug info linked into the gamma launcher
 185 # fastdebug* - optimized compile, but with asserts enabled
 186 # jvmg*      - "fat" libjvm - debug info linked into libjvm.so
 187 # optimized* - optimized compile, no asserts
 188 # profiled*  - gprof
 189 # product*   - the shippable thing:  optimized compile, no asserts, -DPRODUCT
 190 
 191 # This target list needs to be coordinated with the usage message
 192 # in the build.sh script:
 193 TARGETS           = debug jvmg fastdebug optimized profiled product
 194 
 195 ifeq ($(findstring true, $(JVM_VARIANT_ZERO) $(JVM_VARIANT_ZEROSHARK)), true)
 196   SUBDIR_DOCS     = $(OSNAME)_$(VARIANTARCH)_docs
 197 else
 198   SUBDIR_DOCS     = $(OSNAME)_$(BUILDARCH)_docs
 199 endif
 200 SUBDIRS_C1        = $(addprefix $(OSNAME)_$(BUILDARCH)_compiler1/,$(TARGETS))
 201 SUBDIRS_C2        = $(addprefix $(OSNAME)_$(BUILDARCH)_compiler2/,$(TARGETS))
 202 SUBDIRS_TIERED    = $(addprefix $(OSNAME)_$(BUILDARCH)_tiered/,$(TARGETS))
 203 SUBDIRS_CORE      = $(addprefix $(OSNAME)_$(BUILDARCH)_core/,$(TARGETS))
 204 SUBDIRS_ZERO      = $(addprefix $(OSNAME)_$(VARIANTARCH)_zero/,$(TARGETS))
 205 SUBDIRS_SHARK     = $(addprefix $(OSNAME)_$(VARIANTARCH)_shark/,$(TARGETS))
 206 SUBDIRS_MINIMAL1  = $(addprefix $(OSNAME)_$(BUILDARCH)_minimal1/,$(TARGETS))
 207 
 208 TARGETS_C2        = $(TARGETS)
 209 TARGETS_C1        = $(addsuffix 1,$(TARGETS))
 210 TARGETS_TIERED    = $(addsuffix tiered,$(TARGETS))
 211 TARGETS_CORE      = $(addsuffix core,$(TARGETS))
 212 TARGETS_ZERO      = $(addsuffix zero,$(TARGETS))
 213 TARGETS_SHARK     = $(addsuffix shark,$(TARGETS))


 340         cd $(OSNAME)_$(BUILDARCH)_minimal1/$(patsubst %minimal1,%,$@) && $(MAKE) $(MFLAGS) install
 341 endif
 342 
 343 # Just build the tree, and nothing else:
 344 tree:      $(SUBDIRS_C2)
 345 tree1:     $(SUBDIRS_C1)
 346 treecore:  $(SUBDIRS_CORE)
 347 treezero:  $(SUBDIRS_ZERO)
 348 treeshark: $(SUBDIRS_SHARK)
 349 treeminimal1: $(SUBDIRS_MINIMAL1)
 350 
 351 # Doc target.  This is the same for all build options.
 352 #     Hence create a docs directory beside ...$(ARCH)_[...]
 353 # We specify 'BUILD_FLAVOR=product' so that the proper
 354 # ENABLE_FULL_DEBUG_SYMBOLS value is used.
 355 docs: checks
 356         $(QUIETLY) mkdir -p $(SUBDIR_DOCS)
 357         $(MAKE) -f $(GAMMADIR)/make/$(OSNAME)/makefiles/jvmti.make $(MFLAGS) $(BUILDTREE_VARS) JvmtiOutDir=$(SUBDIR_DOCS) BUILD_FLAVOR=product jvmtidocs
 358 
 359 # Synonyms for win32-like targets.
 360 compiler2:  jvmg product
 361 
 362 compiler1:  jvmg1 product1
 363 
 364 core: jvmgcore productcore
 365 
 366 zero: jvmgzero productzero
 367 
 368 shark: jvmgshark productshark














 369 
 370 clean_docs:
 371         rm -rf $(SUBDIR_DOCS)
 372 
 373 clean_compiler1 clean_compiler2 clean_core clean_zero clean_shark clean_minimal1:
 374         rm -rf $(OSNAME)_$(BUILDARCH)_$(subst clean_,,$@)
 375 
 376 clean:  clean_compiler2 clean_compiler1 clean_core clean_zero clean_shark clean_minimal1 clean_docs
 377 
 378 include $(GAMMADIR)/make/cscope.make
 379 
 380 #
 381 # Include alternate Makefile if it exists.
 382 #
 383 -include $(HS_ALT_MAKE)/$(OSNAME)/Makefile.make
 384 
 385 #-------------------------------------------------------------------------------
 386 
 387 .PHONY: $(TARGETS_C2) $(TARGETS_C1) $(TARGETS_CORE) $(TARGETS_ZERO) $(TARGETS_SHARK) $(TARGETS_MINIMAL1)
 388 .PHONY: tree tree1 treecore treezero treeshark
   1 #
   2 # Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
   3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4 #
   5 # This code is free software; you can redistribute it and/or modify it
   6 # under the terms of the GNU General Public License version 2 only, as
   7 # published by the Free Software Foundation.
   8 #
   9 # This code is distributed in the hope that it will be useful, but WITHOUT
  10 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12 # version 2 for more details (a copy is included in the LICENSE file that
  13 # accompanied this code).
  14 #
  15 # You should have received a copy of the GNU General Public License version
  16 # 2 along with this work; if not, write to the Free Software Foundation,
  17 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18 #
  19 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20 # or visit www.oracle.com if you need additional information or have any
  21 # questions.
  22 #


 125           )
 126     # Don't use the new value for GAMMADIR unless a file with the new
 127     # name actually exists.
 128     ifneq ($(wildcard $(NEW_GAMMADIR)),)
 129       GAMMADIR := $(NEW_GAMMADIR)
 130     endif
 131   endif
 132 
 133 endif
 134 
 135 # BUILDARCH is set to "zero" for Zero builds.  VARIANTARCH
 136 # is used to give the build directories meaningful names.
 137 VARIANTARCH = $(subst i386,i486,$(ZERO_LIBARCH))
 138 
 139 # There is a (semi-) regular correspondence between make targets and actions:
 140 #
 141 #       Target          Tree Type       Build Dir
 142 #
 143 #       debug           compiler2       <os>_<arch>_compiler2/debug
 144 #       fastdebug       compiler2       <os>_<arch>_compiler2/fastdebug

 145 #       optimized       compiler2       <os>_<arch>_compiler2/optimized

 146 #       product         compiler2       <os>_<arch>_compiler2/product
 147 #
 148 #       debug1          compiler1       <os>_<arch>_compiler1/debug
 149 #       fastdebug1      compiler1       <os>_<arch>_compiler1/fastdebug

 150 #       optimized1      compiler1       <os>_<arch>_compiler1/optimized

 151 #       product1        compiler1       <os>_<arch>_compiler1/product
 152 #
 153 #       debugcore       core            <os>_<arch>_core/debug
 154 #       fastdebugcore   core            <os>_<arch>_core/fastdebug

 155 #       optimizedcore   core            <os>_<arch>_core/optimized

 156 #       productcore     core            <os>_<arch>_core/product
 157 #
 158 #       debugzero       zero            <os>_<arch>_zero/debug
 159 #       fastdebugzero   zero            <os>_<arch>_zero/fastdebug

 160 #       optimizedzero   zero            <os>_<arch>_zero/optimized

 161 #       productzero     zero            <os>_<arch>_zero/product
 162 #
 163 #       debugshark      shark           <os>_<arch>_shark/debug
 164 #       fastdebugshark  shark           <os>_<arch>_shark/fastdebug

 165 #       optimizedshark  shark           <os>_<arch>_shark/optimized

 166 #       productshark    shark           <os>_<arch>_shark/product
 167 #
 168 #       fastdebugminimal1 minimal1      <os>_<arch>_minimal1/fastdebug

 169 #       productminimal1   minimal1      <os>_<arch>_minimal1/product
 170 #
 171 # What you get with each target:
 172 #
 173 # debug*     - debug compile with asserts enabled
 174 # fastdebug* - optimized compile, but with asserts enabled

 175 # optimized* - optimized compile, no asserts

 176 # product*   - the shippable thing:  optimized compile, no asserts, -DPRODUCT
 177 
 178 # This target list needs to be coordinated with the usage message
 179 # in the build.sh script:
 180 TARGETS           = debug fastdebug optimized product
 181 
 182 ifeq ($(findstring true, $(JVM_VARIANT_ZERO) $(JVM_VARIANT_ZEROSHARK)), true)
 183   SUBDIR_DOCS     = $(OSNAME)_$(VARIANTARCH)_docs
 184 else
 185   SUBDIR_DOCS     = $(OSNAME)_$(BUILDARCH)_docs
 186 endif
 187 SUBDIRS_C1        = $(addprefix $(OSNAME)_$(BUILDARCH)_compiler1/,$(TARGETS))
 188 SUBDIRS_C2        = $(addprefix $(OSNAME)_$(BUILDARCH)_compiler2/,$(TARGETS))
 189 SUBDIRS_TIERED    = $(addprefix $(OSNAME)_$(BUILDARCH)_tiered/,$(TARGETS))
 190 SUBDIRS_CORE      = $(addprefix $(OSNAME)_$(BUILDARCH)_core/,$(TARGETS))
 191 SUBDIRS_ZERO      = $(addprefix $(OSNAME)_$(VARIANTARCH)_zero/,$(TARGETS))
 192 SUBDIRS_SHARK     = $(addprefix $(OSNAME)_$(VARIANTARCH)_shark/,$(TARGETS))
 193 SUBDIRS_MINIMAL1  = $(addprefix $(OSNAME)_$(BUILDARCH)_minimal1/,$(TARGETS))
 194 
 195 TARGETS_C2        = $(TARGETS)
 196 TARGETS_C1        = $(addsuffix 1,$(TARGETS))
 197 TARGETS_TIERED    = $(addsuffix tiered,$(TARGETS))
 198 TARGETS_CORE      = $(addsuffix core,$(TARGETS))
 199 TARGETS_ZERO      = $(addsuffix zero,$(TARGETS))
 200 TARGETS_SHARK     = $(addsuffix shark,$(TARGETS))


 327         cd $(OSNAME)_$(BUILDARCH)_minimal1/$(patsubst %minimal1,%,$@) && $(MAKE) $(MFLAGS) install
 328 endif
 329 
 330 # Just build the tree, and nothing else:
 331 tree:      $(SUBDIRS_C2)
 332 tree1:     $(SUBDIRS_C1)
 333 treecore:  $(SUBDIRS_CORE)
 334 treezero:  $(SUBDIRS_ZERO)
 335 treeshark: $(SUBDIRS_SHARK)
 336 treeminimal1: $(SUBDIRS_MINIMAL1)
 337 
 338 # Doc target.  This is the same for all build options.
 339 #     Hence create a docs directory beside ...$(ARCH)_[...]
 340 # We specify 'BUILD_FLAVOR=product' so that the proper
 341 # ENABLE_FULL_DEBUG_SYMBOLS value is used.
 342 docs: checks
 343         $(QUIETLY) mkdir -p $(SUBDIR_DOCS)
 344         $(MAKE) -f $(GAMMADIR)/make/$(OSNAME)/makefiles/jvmti.make $(MFLAGS) $(BUILDTREE_VARS) JvmtiOutDir=$(SUBDIR_DOCS) BUILD_FLAVOR=product jvmtidocs
 345 
 346 # Synonyms for win32-like targets.
 347 compiler2:  debug product
 348 
 349 compiler1:  debug1 product1
 350 
 351 core: debugcore productcore
 352 
 353 zero: debugzero productzero
 354 
 355 shark: debugshark productshark
 356 
 357 warn_jvmg_deprecated:
 358         echo "Warning: The jvmg target has been replaced with debug"
 359         echo "Warning: Please update your usage"
 360 
 361 jvmg: warn_jvmg_deprecated debug
 362 
 363 jvmg1: warn_jvmg_deprecated debug1
 364 
 365 jvmgcore: warn_jvmg_deprecated debugcore
 366 
 367 jvmgzero: warn_jvmg_deprecated debugzero
 368 
 369 jvmgshark: warn_jvmg_deprecated debugshark
 370 
 371 clean_docs:
 372         rm -rf $(SUBDIR_DOCS)
 373 
 374 clean_compiler1 clean_compiler2 clean_core clean_zero clean_shark clean_minimal1:
 375         rm -rf $(OSNAME)_$(BUILDARCH)_$(subst clean_,,$@)
 376 
 377 clean:  clean_compiler2 clean_compiler1 clean_core clean_zero clean_shark clean_minimal1 clean_docs
 378 
 379 include $(GAMMADIR)/make/cscope.make
 380 
 381 #
 382 # Include alternate Makefile if it exists.
 383 #
 384 -include $(HS_ALT_MAKE)/$(OSNAME)/Makefile.make
 385 
 386 #-------------------------------------------------------------------------------
 387 
 388 .PHONY: $(TARGETS_C2) $(TARGETS_C1) $(TARGETS_CORE) $(TARGETS_ZERO) $(TARGETS_SHARK) $(TARGETS_MINIMAL1)
 389 .PHONY: tree tree1 treecore treezero treeshark