make/bsd/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))


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














 366 
 367 clean_docs:
 368         rm -rf $(SUBDIR_DOCS)
 369 
 370 clean_compiler1 clean_compiler2 clean_core clean_zero clean_shark clean_minimal1:
 371         rm -rf $(OSNAME)_$(BUILDARCH)_$(subst clean_,,$@)
 372 
 373 clean:  clean_compiler2 clean_compiler1 clean_core clean_zero clean_shark clean_minimal1 clean_docs
 374 
 375 include $(GAMMADIR)/make/cscope.make
 376 
 377 #
 378 # Include alternate Makefile if it exists.
 379 #
 380 -include $(HS_ALT_MAKE)/$(OSNAME)/Makefile.make
 381 
 382 #-------------------------------------------------------------------------------
 383 
 384 .PHONY: $(TARGETS_C2) $(TARGETS_C1) $(TARGETS_CORE) $(TARGETS_ZERO) $(TARGETS_SHARK) $(TARGETS_MINIMAL1)
 385 .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 #       debugminimal1     minimal1      <os>_<arch>_minimal1/debug
 170 #       productminimal1   minimal1      <os>_<arch>_minimal1/product
 171 #
 172 # What you get with each target:
 173 #
 174 # debug*     - debug compile with asserts enabled
 175 # fastdebug* - optimized compile, but with asserts enabled

 176 # optimized* - optimized compile, no asserts

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


 325         cd $(OSNAME)_$(BUILDARCH)_minimal1/$(patsubst %minimal1,%,$@) && $(MAKE) $(MFLAGS)
 326 ifdef INSTALL
 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 docs: checks
 341         $(QUIETLY) mkdir -p $(SUBDIR_DOCS)
 342         $(MAKE) -f $(GAMMADIR)/make/$(OSNAME)/makefiles/jvmti.make $(MFLAGS) $(BUILDTREE_VARS) JvmtiOutDir=$(SUBDIR_DOCS) jvmtidocs
 343 
 344 # Synonyms for win32-like targets.
 345 compiler2:  debug product
 346 
 347 compiler1:  debug1 product1
 348 
 349 core: debugcore productcore
 350 
 351 zero: debugzero productzero
 352 
 353 shark: debugshark productshark
 354 
 355 warn_jvmg_deprecated:
 356         echo "Warning: The jvmg target has been replaced with debug"
 357         echo "Warning: Please update your usage"
 358 
 359 jvmg: warn_jvmg_deprecated debug
 360 
 361 jvmg1: warn_jvmg_deprecated debug1
 362 
 363 jvmgcore: warn_jvmg_deprecated debugcore
 364 
 365 jvmgzero: warn_jvmg_deprecated debugzero
 366 
 367 jvmgshark: warn_jvmg_deprecated debugshark
 368 
 369 clean_docs:
 370         rm -rf $(SUBDIR_DOCS)
 371 
 372 clean_compiler1 clean_compiler2 clean_core clean_zero clean_shark clean_minimal1:
 373         rm -rf $(OSNAME)_$(BUILDARCH)_$(subst clean_,,$@)
 374 
 375 clean:  clean_compiler2 clean_compiler1 clean_core clean_zero clean_shark clean_minimal1 clean_docs
 376 
 377 include $(GAMMADIR)/make/cscope.make
 378 
 379 #
 380 # Include alternate Makefile if it exists.
 381 #
 382 -include $(HS_ALT_MAKE)/$(OSNAME)/Makefile.make
 383 
 384 #-------------------------------------------------------------------------------
 385 
 386 .PHONY: $(TARGETS_C2) $(TARGETS_C1) $(TARGETS_CORE) $(TARGETS_ZERO) $(TARGETS_SHARK) $(TARGETS_MINIMAL1)
 387 .PHONY: tree tree1 treecore treezero treeshark