hotspot/make/linux/Makefile
changeset 4013 b154310845de
parent 670 ddf3e9583f2f
child 5547 f4b087cbb361
equal deleted inserted replaced
4012:579b7bad9983 4013:b154310845de
   130     endif
   130     endif
   131   endif
   131   endif
   132 
   132 
   133 endif
   133 endif
   134 
   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))
   135 
   138 
   136 # There is a (semi-) regular correspondence between make targets and actions:
   139 # There is a (semi-) regular correspondence between make targets and actions:
   137 #
   140 #
   138 #       Target          Tree Type       Build Dir
   141 #       Target          Tree Type       Build Dir
   139 #
   142 #
   156 #       jvmgcore        core            <os>_<arch>_core/jvmg
   159 #       jvmgcore        core            <os>_<arch>_core/jvmg
   157 #       optimizedcore   core            <os>_<arch>_core/optimized
   160 #       optimizedcore   core            <os>_<arch>_core/optimized
   158 #       profiledcore    core            <os>_<arch>_core/profiled
   161 #       profiledcore    core            <os>_<arch>_core/profiled
   159 #       productcore     core            <os>_<arch>_core/product
   162 #       productcore     core            <os>_<arch>_core/product
   160 #
   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 #
   161 # What you get with each target:
   171 # What you get with each target:
   162 #
   172 #
   163 # debug*     - "thin" libjvm_g - debug info linked into the gamma_g launcher
   173 # debug*     - "thin" libjvm_g - debug info linked into the gamma_g launcher
   164 # fastdebug* - optimized compile, but with asserts enabled
   174 # fastdebug* - optimized compile, but with asserts enabled
   165 # jvmg*      - "fat" libjvm_g - debug info linked into libjvm_g.so
   175 # jvmg*      - "fat" libjvm_g - debug info linked into libjvm_g.so
   169 
   179 
   170 # This target list needs to be coordinated with the usage message
   180 # This target list needs to be coordinated with the usage message
   171 # in the build.sh script:
   181 # in the build.sh script:
   172 TARGETS           = debug jvmg fastdebug optimized profiled product
   182 TARGETS           = debug jvmg fastdebug optimized profiled product
   173 
   183 
   174 SUBDIR_DOCS       = $(OSNAME)_$(BUILDARCH)_docs
   184 ifeq ($(ZERO_BUILD), true)
       
   185   SUBDIR_DOCS     = $(OSNAME)_$(VARIANTARCH)_docs
       
   186 else
       
   187   SUBDIR_DOCS     = $(OSNAME)_$(BUILDARCH)_docs
       
   188 endif
   175 SUBDIRS_C1        = $(addprefix $(OSNAME)_$(BUILDARCH)_compiler1/,$(TARGETS))
   189 SUBDIRS_C1        = $(addprefix $(OSNAME)_$(BUILDARCH)_compiler1/,$(TARGETS))
   176 SUBDIRS_C2        = $(addprefix $(OSNAME)_$(BUILDARCH)_compiler2/,$(TARGETS))
   190 SUBDIRS_C2        = $(addprefix $(OSNAME)_$(BUILDARCH)_compiler2/,$(TARGETS))
   177 SUBDIRS_TIERED    = $(addprefix $(OSNAME)_$(BUILDARCH)_tiered/,$(TARGETS))
   191 SUBDIRS_TIERED    = $(addprefix $(OSNAME)_$(BUILDARCH)_tiered/,$(TARGETS))
   178 SUBDIRS_CORE      = $(addprefix $(OSNAME)_$(BUILDARCH)_core/,$(TARGETS))
   192 SUBDIRS_CORE      = $(addprefix $(OSNAME)_$(BUILDARCH)_core/,$(TARGETS))
       
   193 SUBDIRS_ZERO      = $(addprefix $(OSNAME)_$(VARIANTARCH)_zero/,$(TARGETS))
   179 
   194 
   180 TARGETS_C2        = $(TARGETS)
   195 TARGETS_C2        = $(TARGETS)
   181 TARGETS_C1        = $(addsuffix 1,$(TARGETS))
   196 TARGETS_C1        = $(addsuffix 1,$(TARGETS))
   182 TARGETS_TIERED    = $(addsuffix tiered,$(TARGETS))
   197 TARGETS_TIERED    = $(addsuffix tiered,$(TARGETS))
   183 TARGETS_CORE      = $(addsuffix core,$(TARGETS))
   198 TARGETS_CORE      = $(addsuffix core,$(TARGETS))
       
   199 TARGETS_ZERO      = $(addsuffix zero,$(TARGETS))
   184 
   200 
   185 BUILDTREE_MAKE    = $(GAMMADIR)/make/$(OSNAME)/makefiles/buildtree.make
   201 BUILDTREE_MAKE    = $(GAMMADIR)/make/$(OSNAME)/makefiles/buildtree.make
   186 BUILDTREE_VARS    = GAMMADIR=$(GAMMADIR) OS_FAMILY=$(OSNAME) ARCH=$(SRCARCH) BUILDARCH=$(BUILDARCH) LIBARCH=$(LIBARCH)
   202 BUILDTREE_VARS    = GAMMADIR=$(GAMMADIR) OS_FAMILY=$(OSNAME) ARCH=$(SRCARCH) BUILDARCH=$(BUILDARCH) LIBARCH=$(LIBARCH)
   187 BUILDTREE_VARS   += HOTSPOT_RELEASE_VERSION=$(HOTSPOT_RELEASE_VERSION) HOTSPOT_BUILD_VERSION=$(HOTSPOT_BUILD_VERSION) JRE_RELEASE_VERSION=$(JRE_RELEASE_VERSION)
   203 BUILDTREE_VARS   += HOTSPOT_RELEASE_VERSION=$(HOTSPOT_RELEASE_VERSION) HOTSPOT_BUILD_VERSION=$(HOTSPOT_BUILD_VERSION) JRE_RELEASE_VERSION=$(JRE_RELEASE_VERSION)
   188 
   204 
   194 all:
   210 all:
   195 	@echo "Try '$(MAKE) <target> ...'  where <target> is one or more of"
   211 	@echo "Try '$(MAKE) <target> ...'  where <target> is one or more of"
   196 	@echo "  $(TARGETS_C2)"
   212 	@echo "  $(TARGETS_C2)"
   197 	@echo "  $(TARGETS_C1)"
   213 	@echo "  $(TARGETS_C1)"
   198 	@echo "  $(TARGETS_CORE)"
   214 	@echo "  $(TARGETS_CORE)"
       
   215 	@echo "  $(TARGETS_ZERO)"
   199 
   216 
   200 checks: check_os_version check_j2se_version
   217 checks: check_os_version check_j2se_version
   201 
   218 
   202 # We do not want people accidentally building on old systems (e.g. Linux 2.2.x,
   219 # We do not want people accidentally building on old systems (e.g. Linux 2.2.x,
   203 # Solaris 2.5.1, 2.6).
   220 # Solaris 2.5.1, 2.6).
   243 
   260 
   244 $(SUBDIRS_CORE): $(BUILDTREE_MAKE)
   261 $(SUBDIRS_CORE): $(BUILDTREE_MAKE)
   245 	$(QUIETLY) $(MAKE) -f $(GAMMADIR)/make/$(OSNAME)/Makefile checks
   262 	$(QUIETLY) $(MAKE) -f $(GAMMADIR)/make/$(OSNAME)/Makefile checks
   246 	$(BUILDTREE) VARIANT=core
   263 	$(BUILDTREE) VARIANT=core
   247 
   264 
       
   265 $(SUBDIRS_ZERO): $(BUILDTREE_MAKE) platform_zero
       
   266 	$(QUIETLY) $(MAKE) -f $(GAMMADIR)/make/$(OSNAME)/Makefile checks
       
   267 	$(BUILDTREE) VARIANT=zero VARIANTARCH=$(VARIANTARCH)
       
   268 
       
   269 platform_zero: $(GAMMADIR)/make/$(OSNAME)/platform_zero.in
       
   270 	$(SED) 's/@ZERO_ARCHDEF@/$(ZERO_ARCHDEF)/g;s/@ZERO_LIBARCH@/$(ZERO_LIBARCH)/g;' < $< > $@
       
   271 
   248 # Define INSTALL=y at command line to automatically copy JVM into JAVA_HOME
   272 # Define INSTALL=y at command line to automatically copy JVM into JAVA_HOME
   249 
   273 
   250 $(TARGETS_C2):  $(SUBDIRS_C2)
   274 $(TARGETS_C2):  $(SUBDIRS_C2)
   251 	cd $(OSNAME)_$(BUILDARCH)_compiler2/$@ && $(MAKE) $(MFLAGS)
   275 	cd $(OSNAME)_$(BUILDARCH)_compiler2/$@ && $(MAKE) $(MFLAGS)
   252 	cd $(OSNAME)_$(BUILDARCH)_compiler2/$@ && ./test_gamma
   276 	cd $(OSNAME)_$(BUILDARCH)_compiler2/$@ && ./test_gamma
   271 $(TARGETS_CORE):  $(SUBDIRS_CORE)
   295 $(TARGETS_CORE):  $(SUBDIRS_CORE)
   272 	cd $(OSNAME)_$(BUILDARCH)_core/$(patsubst %core,%,$@) && $(MAKE) $(MFLAGS)
   296 	cd $(OSNAME)_$(BUILDARCH)_core/$(patsubst %core,%,$@) && $(MAKE) $(MFLAGS)
   273 	cd $(OSNAME)_$(BUILDARCH)_core/$(patsubst %core,%,$@) && ./test_gamma
   297 	cd $(OSNAME)_$(BUILDARCH)_core/$(patsubst %core,%,$@) && ./test_gamma
   274 ifdef INSTALL
   298 ifdef INSTALL
   275 	cd $(OSNAME)_$(BUILDARCH)_core/$(patsubst %core,%,$@) && $(MAKE) $(MFLAGS) install
   299 	cd $(OSNAME)_$(BUILDARCH)_core/$(patsubst %core,%,$@) && $(MAKE) $(MFLAGS) install
       
   300 endif
       
   301 
       
   302 $(TARGETS_ZERO):  $(SUBDIRS_ZERO)
       
   303 	cd $(OSNAME)_$(VARIANTARCH)_zero/$(patsubst %zero,%,$@) && $(MAKE) $(MFLAGS)
       
   304 	cd $(OSNAME)_$(VARIANTARCH)_zero/$(patsubst %zero,%,$@) && ./test_gamma
       
   305 ifdef INSTALL
       
   306 	cd $(OSNAME)_$(VARIANTARCH)_zero/$(patsubst %zero,%,$@) && $(MAKE) $(MFLAGS) install
   276 endif
   307 endif
   277 
   308 
   278 # Just build the tree, and nothing else:
   309 # Just build the tree, and nothing else:
   279 tree:      $(SUBDIRS_C2)
   310 tree:      $(SUBDIRS_C2)
   280 tree1:     $(SUBDIRS_C1)
   311 tree1:     $(SUBDIRS_C1)
   281 treecore:  $(SUBDIRS_CORE)
   312 treecore:  $(SUBDIRS_CORE)
       
   313 treezero:  $(SUBDIRS_ZERO)
   282 
   314 
   283 # Doc target.  This is the same for all build options.
   315 # Doc target.  This is the same for all build options.
   284 #     Hence create a docs directory beside ...$(ARCH)_[...]
   316 #     Hence create a docs directory beside ...$(ARCH)_[...]
   285 docs: checks
   317 docs: checks
   286 	$(QUIETLY) mkdir -p $(SUBDIR_DOCS)
   318 	$(QUIETLY) mkdir -p $(SUBDIR_DOCS)
   291 
   323 
   292 compiler1:  jvmg1 product1
   324 compiler1:  jvmg1 product1
   293 
   325 
   294 core: jvmgcore productcore
   326 core: jvmgcore productcore
   295 
   327 
       
   328 zero: jvmgzero productzero
       
   329 
   296 clean_docs:
   330 clean_docs:
   297 	rm -rf $(SUBDIR_DOCS)
   331 	rm -rf $(SUBDIR_DOCS)
   298 
   332 
   299 clean_compiler1 clean_compiler2 clean_core:
   333 clean_compiler1 clean_compiler2 clean_core clean_zero:
   300 	rm -rf $(OSNAME)_$(BUILDARCH)_$(subst clean_,,$@)
   334 	rm -rf $(OSNAME)_$(BUILDARCH)_$(subst clean_,,$@)
   301 
   335 
   302 clean:  clean_compiler2 clean_compiler1 clean_core clean_docs
   336 clean:  clean_compiler2 clean_compiler1 clean_core clean_zero clean_docs
   303 
   337 
   304 include $(GAMMADIR)/make/$(OSNAME)/makefiles/cscope.make
   338 include $(GAMMADIR)/make/$(OSNAME)/makefiles/cscope.make
   305 
   339 
   306 #-------------------------------------------------------------------------------
   340 #-------------------------------------------------------------------------------
   307 
   341 
   308 .PHONY: $(TARGETS_C2) $(TARGETS_C1) $(TARGETS_CORE)
   342 .PHONY: $(TARGETS_C2) $(TARGETS_C1) $(TARGETS_CORE) $(TARGETS_ZERO)
   309 .PHONY: tree tree1 treecore
   343 .PHONY: tree tree1 treecore treezero
   310 .PHONY: all compiler1 compiler2 core
   344 .PHONY: all compiler1 compiler2 core zero
   311 .PHONY: clean clean_compiler1 clean_compiler2 clean_core docs clean_docs
   345 .PHONY: clean clean_compiler1 clean_compiler2 clean_core clean_zero docs clean_docs
   312 .PHONY: checks check_os_version check_j2se_version
   346 .PHONY: checks check_os_version check_j2se_version