jdk/makefiles/java/jvm/Makefile
changeset 13027 7b710f3e4422
parent 13026 df2937ff0cb4
parent 12974 7e981cb0ad6a
child 13028 f72c7e618ed0
equal deleted inserted replaced
13026:df2937ff0cb4 13027:7b710f3e4422
     1 #
       
     2 # Copyright (c) 1995, 2011, 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.  Oracle designates this
       
     8 # particular file as subject to the "Classpath" exception as provided
       
     9 # by Oracle in the LICENSE file that accompanied this code.
       
    10 #
       
    11 # This code is distributed in the hope that it will be useful, but WITHOUT
       
    12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
       
    13 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
       
    14 # version 2 for more details (a copy is included in the LICENSE file that
       
    15 # accompanied this code).
       
    16 #
       
    17 # You should have received a copy of the GNU General Public License version
       
    18 # 2 along with this work; if not, write to the Free Software Foundation,
       
    19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
       
    20 #
       
    21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
       
    22 # or visit www.oracle.com if you need additional information or have any
       
    23 # questions.
       
    24 #
       
    25 
       
    26 BUILDDIR = ../..
       
    27 
       
    28 include $(BUILDDIR)/common/Defs.gmk
       
    29 
       
    30 JVMCFG = $(JVMCFG_DIR)/jvm.cfg
       
    31 
       
    32 #
       
    33 # How to install jvm.cfg.
       
    34 #
       
    35 ifeq ($(ZERO_BUILD), true)
       
    36 JVMCFG_ARCH = zero
       
    37 else
       
    38 JVMCFG_ARCH = $(ARCH)
       
    39 endif
       
    40 
       
    41 ifeq ($(PLATFORM),macosx)
       
    42   JVMCFG_SRC=$(PLATFORM_SRC_MACOS)/bin/$(JVMCFG_ARCH)/jvm.cfg
       
    43   JVMCFG_DIR = $(LIBDIR)
       
    44 else
       
    45   JVMCFG_SRC=$(PLATFORM_SRC)/bin/$(JVMCFG_ARCH)/jvm.cfg
       
    46   JVMCFG_DIR = $(LIBDIR)/$(LIBARCH)
       
    47 endif
       
    48 
       
    49 ifeq ($(ARCH_DATA_MODEL),32)
       
    50     # On 32 bit machines, we can have client and/or server libjvms installed.
       
    51     # Since the currently committed jvm.cfg expects clientANDserver, we need 
       
    52     # to patch the jvm.cfg when we have built only a client or only a server.
       
    53     # This should also support -kernel, -zero and -zeroshark.
       
    54     ifeq ($(JVM_VARIANTS),$(COMMA)client$(COMMA))
       
    55         # Create a patched jvm.cfg to use -client by default and alias -server to -client.
       
    56         $(JVMCFG)::
       
    57 		$(MKDIR) -p $(JVMCFG_DIR)
       
    58 		$(RM) -f $(JVMCFG)
       
    59 		$(PRINTF) "-client KNOWN\n">$(JVMCFG)
       
    60 		$(PRINTF) "-server IGNORE\n">>$(JVMCFG)
       
    61 		$(PRINTF) "-hotspot ALIASED_TO -client\n">>$(JVMCFG)
       
    62 		$(PRINTF) "-classic WARN\n">>$(JVMCFG)
       
    63 		$(PRINTF) "-native ERROR\n">>$(JVMCFG)
       
    64 		$(PRINTF) "-green ERROR\n">>$(JVMCFG)
       
    65     else
       
    66         ifeq ($(JVM_VARIANTS),$(COMMA)server$(COMMA))
       
    67             # Create a patched jvm.cfg to use -server by default and alias -client to -server.
       
    68             $(JVMCFG)::
       
    69 		$(MKDIR) -p $(JVMCFG_DIR)
       
    70 		$(RM) -f $(JVMCFG)
       
    71 		$(PRINTF) "-server KNOWN\n">$(JVMCFG)
       
    72 		$(PRINTF) "-client IGNORE\n">>$(JVMCFG)
       
    73 		$(PRINTF) "-hotspot IGNORE\n">>$(JVMCFG)
       
    74 		$(PRINTF) "-classic WARN\n">>$(JVMCFG)
       
    75 		$(PRINTF) "-native ERROR\n">>$(JVMCFG)
       
    76 		$(PRINTF) "-green ERROR\n">>$(JVMCFG)
       
    77         else
       
    78             # Use the default jvm.cfg for this 32 bit setup. 
       
    79             $(JVMCFG): $(JVMCFG_SRC)
       
    80 		$(install-file)
       
    81         endif
       
    82     endif
       
    83 else
       
    84     # Use the default jvm.cfg for this 64 bit setup.
       
    85     $(JVMCFG): $(JVMCFG_SRC)
       
    86 	$(install-file)
       
    87 endif
       
    88 
       
    89 all: build
       
    90 
       
    91 build: $(JVMCFG)
       
    92 
       
    93 clean clobber:: 
       
    94 	$(RM) $(JVMCFG)
       
    95