hotspot/make/linux/makefiles/vm.make
author phh
Wed, 16 Dec 2009 12:54:49 -0500
changeset 4493 9204129f065e
parent 4013 b154310845de
child 5045 59dd2a304f1d
permissions -rw-r--r--
6843629: Make current hotspot build part of jdk5 control build Summary: Source changes for older compilers plus makefile changes. Reviewed-by: xlu
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
     1
#
670
ddf3e9583f2f 6719955: Update copyright year
xdono
parents: 357
diff changeset
     2
# Copyright 1999-2008 Sun Microsystems, Inc.  All Rights Reserved.
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
     3
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
489c9b5090e2 Initial load
duke
parents:
diff changeset
     4
#
489c9b5090e2 Initial load
duke
parents:
diff changeset
     5
# This code is free software; you can redistribute it and/or modify it
489c9b5090e2 Initial load
duke
parents:
diff changeset
     6
# under the terms of the GNU General Public License version 2 only, as
489c9b5090e2 Initial load
duke
parents:
diff changeset
     7
# published by the Free Software Foundation.
489c9b5090e2 Initial load
duke
parents:
diff changeset
     8
#
489c9b5090e2 Initial load
duke
parents:
diff changeset
     9
# This code is distributed in the hope that it will be useful, but WITHOUT
489c9b5090e2 Initial load
duke
parents:
diff changeset
    10
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
489c9b5090e2 Initial load
duke
parents:
diff changeset
    11
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
489c9b5090e2 Initial load
duke
parents:
diff changeset
    12
# version 2 for more details (a copy is included in the LICENSE file that
489c9b5090e2 Initial load
duke
parents:
diff changeset
    13
# accompanied this code).
489c9b5090e2 Initial load
duke
parents:
diff changeset
    14
#
489c9b5090e2 Initial load
duke
parents:
diff changeset
    15
# You should have received a copy of the GNU General Public License version
489c9b5090e2 Initial load
duke
parents:
diff changeset
    16
# 2 along with this work; if not, write to the Free Software Foundation,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    17
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    18
#
489c9b5090e2 Initial load
duke
parents:
diff changeset
    19
# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    20
# CA 95054 USA or visit www.sun.com if you need additional information or
489c9b5090e2 Initial load
duke
parents:
diff changeset
    21
# have any questions.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    22
#  
489c9b5090e2 Initial load
duke
parents:
diff changeset
    23
#
489c9b5090e2 Initial load
duke
parents:
diff changeset
    24
489c9b5090e2 Initial load
duke
parents:
diff changeset
    25
# Rules to build JVM and related libraries, included from vm.make in the build
489c9b5090e2 Initial load
duke
parents:
diff changeset
    26
# directory.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    27
489c9b5090e2 Initial load
duke
parents:
diff changeset
    28
# Common build rules.
338
5cf9f61d76f4 6583644: Move all managed/SCCS files out of 'build' into 'make' directory
kamg
parents: 1
diff changeset
    29
MAKEFILES_DIR=$(GAMMADIR)/make/$(Platform_os_family)/makefiles
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    30
include $(MAKEFILES_DIR)/rules.make
489c9b5090e2 Initial load
duke
parents:
diff changeset
    31
489c9b5090e2 Initial load
duke
parents:
diff changeset
    32
default: build
489c9b5090e2 Initial load
duke
parents:
diff changeset
    33
489c9b5090e2 Initial load
duke
parents:
diff changeset
    34
#----------------------------------------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
    35
# Defs
489c9b5090e2 Initial load
duke
parents:
diff changeset
    36
489c9b5090e2 Initial load
duke
parents:
diff changeset
    37
GENERATED     = ../generated
489c9b5090e2 Initial load
duke
parents:
diff changeset
    38
489c9b5090e2 Initial load
duke
parents:
diff changeset
    39
# read a generated file defining the set of .o's and the .o .h dependencies
489c9b5090e2 Initial load
duke
parents:
diff changeset
    40
include $(GENERATED)/Dependencies
489c9b5090e2 Initial load
duke
parents:
diff changeset
    41
489c9b5090e2 Initial load
duke
parents:
diff changeset
    42
# read machine-specific adjustments (%%% should do this via buildtree.make?)
4013
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents: 995
diff changeset
    43
ifeq ($(ZERO_BUILD), true)
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents: 995
diff changeset
    44
  include $(MAKEFILES_DIR)/zeroshark.make
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents: 995
diff changeset
    45
else
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents: 995
diff changeset
    46
  include $(MAKEFILES_DIR)/$(BUILDARCH).make
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents: 995
diff changeset
    47
endif
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    48
489c9b5090e2 Initial load
duke
parents:
diff changeset
    49
# set VPATH so make knows where to look for source files
489c9b5090e2 Initial load
duke
parents:
diff changeset
    50
# Src_Dirs is everything in src/share/vm/*, plus the right os/*/vm and cpu/*/vm
489c9b5090e2 Initial load
duke
parents:
diff changeset
    51
# The incls directory contains generated header file lists for inclusion.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    52
# The adfiles directory contains ad_<arch>.[ch]pp.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    53
# The jvmtifiles directory contains jvmti*.[ch]pp
489c9b5090e2 Initial load
duke
parents:
diff changeset
    54
Src_Dirs_V = $(GENERATED)/adfiles $(GENERATED)/jvmtifiles ${Src_Dirs} $(GENERATED)/incls
489c9b5090e2 Initial load
duke
parents:
diff changeset
    55
VPATH    += $(Src_Dirs_V:%=%:)
489c9b5090e2 Initial load
duke
parents:
diff changeset
    56
489c9b5090e2 Initial load
duke
parents:
diff changeset
    57
# set INCLUDES for C preprocessor
489c9b5090e2 Initial load
duke
parents:
diff changeset
    58
Src_Dirs_I = $(PRECOMPILED_HEADER_DIR) $(GENERATED)/adfiles $(GENERATED)/jvmtifiles ${Src_Dirs} $(GENERATED)
489c9b5090e2 Initial load
duke
parents:
diff changeset
    59
INCLUDES += $(Src_Dirs_I:%=-I%)
489c9b5090e2 Initial load
duke
parents:
diff changeset
    60
489c9b5090e2 Initial load
duke
parents:
diff changeset
    61
ifeq (${VERSION}, debug)
489c9b5090e2 Initial load
duke
parents:
diff changeset
    62
  SYMFLAG = -g
489c9b5090e2 Initial load
duke
parents:
diff changeset
    63
else
489c9b5090e2 Initial load
duke
parents:
diff changeset
    64
  SYMFLAG =
489c9b5090e2 Initial load
duke
parents:
diff changeset
    65
endif
489c9b5090e2 Initial load
duke
parents:
diff changeset
    66
489c9b5090e2 Initial load
duke
parents:
diff changeset
    67
# HOTSPOT_RELEASE_VERSION and HOTSPOT_BUILD_VERSION are defined 
489c9b5090e2 Initial load
duke
parents:
diff changeset
    68
# in $(GAMMADIR)/make/defs.make
489c9b5090e2 Initial load
duke
parents:
diff changeset
    69
ifeq ($(HOTSPOT_BUILD_VERSION),)
489c9b5090e2 Initial load
duke
parents:
diff changeset
    70
  BUILD_VERSION = -DHOTSPOT_RELEASE_VERSION="\"$(HOTSPOT_RELEASE_VERSION)\""
489c9b5090e2 Initial load
duke
parents:
diff changeset
    71
else
489c9b5090e2 Initial load
duke
parents:
diff changeset
    72
  BUILD_VERSION = -DHOTSPOT_RELEASE_VERSION="\"$(HOTSPOT_RELEASE_VERSION)-$(HOTSPOT_BUILD_VERSION)\""
489c9b5090e2 Initial load
duke
parents:
diff changeset
    73
endif
489c9b5090e2 Initial load
duke
parents:
diff changeset
    74
489c9b5090e2 Initial load
duke
parents:
diff changeset
    75
# The following variables are defined in the generated flags.make file.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    76
BUILD_VERSION = -DHOTSPOT_RELEASE_VERSION="\"$(HS_BUILD_VER)\""
489c9b5090e2 Initial load
duke
parents:
diff changeset
    77
JRE_VERSION   = -DJRE_RELEASE_VERSION="\"$(JRE_RELEASE_VER)\""
347
df859fcca515 6667042: PrintAssembly option does not work without special plugin
jrose
parents: 1
diff changeset
    78
HS_LIB_ARCH   = -DHOTSPOT_LIB_ARCH=\"$(LIBARCH)\"
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    79
BUILD_TARGET  = -DHOTSPOT_BUILD_TARGET="\"$(TARGET)\""
489c9b5090e2 Initial load
duke
parents:
diff changeset
    80
BUILD_USER    = -DHOTSPOT_BUILD_USER="\"$(HOTSPOT_BUILD_USER)\""
489c9b5090e2 Initial load
duke
parents:
diff changeset
    81
VM_DISTRO     = -DHOTSPOT_VM_DISTRO="\"$(HOTSPOT_VM_DISTRO)\""
489c9b5090e2 Initial load
duke
parents:
diff changeset
    82
489c9b5090e2 Initial load
duke
parents:
diff changeset
    83
CPPFLAGS =           \
489c9b5090e2 Initial load
duke
parents:
diff changeset
    84
  ${SYSDEFS}         \
489c9b5090e2 Initial load
duke
parents:
diff changeset
    85
  ${INCLUDES}        \
489c9b5090e2 Initial load
duke
parents:
diff changeset
    86
  ${BUILD_VERSION}   \
489c9b5090e2 Initial load
duke
parents:
diff changeset
    87
  ${BUILD_TARGET}    \
489c9b5090e2 Initial load
duke
parents:
diff changeset
    88
  ${BUILD_USER}      \
347
df859fcca515 6667042: PrintAssembly option does not work without special plugin
jrose
parents: 1
diff changeset
    89
  ${HS_LIB_ARCH}     \
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    90
  ${JRE_VERSION}     \
489c9b5090e2 Initial load
duke
parents:
diff changeset
    91
  ${VM_DISTRO}
489c9b5090e2 Initial load
duke
parents:
diff changeset
    92
489c9b5090e2 Initial load
duke
parents:
diff changeset
    93
# CFLAGS_WARN holds compiler options to suppress/enable warnings.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    94
CFLAGS += $(CFLAGS_WARN/BYFILE)
489c9b5090e2 Initial load
duke
parents:
diff changeset
    95
489c9b5090e2 Initial load
duke
parents:
diff changeset
    96
# Do not use C++ exception handling
489c9b5090e2 Initial load
duke
parents:
diff changeset
    97
CFLAGS += $(CFLAGS/NOEX)
489c9b5090e2 Initial load
duke
parents:
diff changeset
    98
489c9b5090e2 Initial load
duke
parents:
diff changeset
    99
# Extra flags from gnumake's invocation or environment
489c9b5090e2 Initial load
duke
parents:
diff changeset
   100
CFLAGS += $(EXTRA_CFLAGS)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   101
489c9b5090e2 Initial load
duke
parents:
diff changeset
   102
LIBS += -lm -ldl -lpthread
489c9b5090e2 Initial load
duke
parents:
diff changeset
   103
489c9b5090e2 Initial load
duke
parents:
diff changeset
   104
# By default, link the *.o into the library, not the executable.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   105
LINK_INTO$(LINK_INTO) = LIBJVM
489c9b5090e2 Initial load
duke
parents:
diff changeset
   106
489c9b5090e2 Initial load
duke
parents:
diff changeset
   107
JDK_LIBDIR = $(JAVA_HOME)/jre/lib/$(LIBARCH)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   108
489c9b5090e2 Initial load
duke
parents:
diff changeset
   109
#----------------------------------------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   110
# jvm_db & dtrace
489c9b5090e2 Initial load
duke
parents:
diff changeset
   111
include $(MAKEFILES_DIR)/dtrace.make
489c9b5090e2 Initial load
duke
parents:
diff changeset
   112
489c9b5090e2 Initial load
duke
parents:
diff changeset
   113
#----------------------------------------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   114
# JVM
489c9b5090e2 Initial load
duke
parents:
diff changeset
   115
4493
9204129f065e 6843629: Make current hotspot build part of jdk5 control build
phh
parents: 4013
diff changeset
   116
JVM      = jvm
9204129f065e 6843629: Make current hotspot build part of jdk5 control build
phh
parents: 4013
diff changeset
   117
LIBJVM   = lib$(JVM).so
9204129f065e 6843629: Make current hotspot build part of jdk5 control build
phh
parents: 4013
diff changeset
   118
LIBJVM_G = lib$(JVM)$(G_SUFFIX).so
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   119
489c9b5090e2 Initial load
duke
parents:
diff changeset
   120
JVM_OBJ_FILES = $(Obj_Files)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   121
489c9b5090e2 Initial load
duke
parents:
diff changeset
   122
vm_version.o: $(filter-out vm_version.o,$(JVM_OBJ_FILES))
489c9b5090e2 Initial load
duke
parents:
diff changeset
   123
489c9b5090e2 Initial load
duke
parents:
diff changeset
   124
mapfile : $(MAPFILE)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   125
	rm -f $@
489c9b5090e2 Initial load
duke
parents:
diff changeset
   126
	cat $^ > $@
489c9b5090e2 Initial load
duke
parents:
diff changeset
   127
489c9b5090e2 Initial load
duke
parents:
diff changeset
   128
mapfile_reorder : mapfile $(REORDERFILE)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   129
	rm -f $@
489c9b5090e2 Initial load
duke
parents:
diff changeset
   130
	cat $^ > $@
489c9b5090e2 Initial load
duke
parents:
diff changeset
   131
4013
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents: 995
diff changeset
   132
ifeq ($(ZERO_LIBARCH), ppc64)
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents: 995
diff changeset
   133
  STATIC_CXX = false
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents: 995
diff changeset
   134
else
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents: 995
diff changeset
   135
  STATIC_CXX = true
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents: 995
diff changeset
   136
endif
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   137
489c9b5090e2 Initial load
duke
parents:
diff changeset
   138
ifeq ($(LINK_INTO),AOUT)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   139
  LIBJVM.o                 =
489c9b5090e2 Initial load
duke
parents:
diff changeset
   140
  LIBJVM_MAPFILE           =
489c9b5090e2 Initial load
duke
parents:
diff changeset
   141
  LIBS_VM                  = $(LIBS)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   142
else
489c9b5090e2 Initial load
duke
parents:
diff changeset
   143
  LIBJVM.o                 = $(JVM_OBJ_FILES)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   144
  LIBJVM_MAPFILE$(LDNOMAP) = mapfile_reorder
489c9b5090e2 Initial load
duke
parents:
diff changeset
   145
  LFLAGS_VM$(LDNOMAP)      += $(MAPFLAG:FILENAME=$(LIBJVM_MAPFILE))
489c9b5090e2 Initial load
duke
parents:
diff changeset
   146
  LFLAGS_VM                += $(SONAMEFLAG:SONAME=$(LIBJVM))
489c9b5090e2 Initial load
duke
parents:
diff changeset
   147
489c9b5090e2 Initial load
duke
parents:
diff changeset
   148
  # JVM is statically linked with libgcc[_s] and libstdc++; this is needed to
489c9b5090e2 Initial load
duke
parents:
diff changeset
   149
  # get around library dependency and compatibility issues. Must use gcc not
489c9b5090e2 Initial load
duke
parents:
diff changeset
   150
  # g++ to link.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   151
  ifeq ($(STATIC_CXX), true)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   152
    LFLAGS_VM              += $(STATIC_LIBGCC)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   153
    LIBS_VM                += $(STATIC_STDCXX)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   154
  else
489c9b5090e2 Initial load
duke
parents:
diff changeset
   155
    LIBS_VM                += -lstdc++
489c9b5090e2 Initial load
duke
parents:
diff changeset
   156
  endif
489c9b5090e2 Initial load
duke
parents:
diff changeset
   157
489c9b5090e2 Initial load
duke
parents:
diff changeset
   158
  LIBS_VM                  += $(LIBS)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   159
endif
4013
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents: 995
diff changeset
   160
ifeq ($(ZERO_BUILD), true)
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents: 995
diff changeset
   161
  LIBS_VM += $(LIBFFI_LIBS)
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents: 995
diff changeset
   162
endif
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   163
489c9b5090e2 Initial load
duke
parents:
diff changeset
   164
LINK_VM = $(LINK_LIB.c)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   165
489c9b5090e2 Initial load
duke
parents:
diff changeset
   166
# rule for building precompiled header
489c9b5090e2 Initial load
duke
parents:
diff changeset
   167
$(PRECOMPILED_HEADER): $(Precompiled_Files)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   168
	$(QUIETLY) echo Generating precompiled header $@
489c9b5090e2 Initial load
duke
parents:
diff changeset
   169
	$(QUIETLY) mkdir -p $(PRECOMPILED_HEADER_DIR)/incls
489c9b5090e2 Initial load
duke
parents:
diff changeset
   170
	$(QUIETLY) $(COMPILE.CC) -x c++-header -c $(GENERATED)/incls/_precompiled.incl -o $@ $(COMPILE_DONE)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   171
489c9b5090e2 Initial load
duke
parents:
diff changeset
   172
# making the library:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   173
489c9b5090e2 Initial load
duke
parents:
diff changeset
   174
ifneq ($(JVM_BASE_ADDR),)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   175
# By default shared library is linked at base address == 0. Modify the
489c9b5090e2 Initial load
duke
parents:
diff changeset
   176
# linker script if JVM prefers a different base location. It can also be
489c9b5090e2 Initial load
duke
parents:
diff changeset
   177
# implemented with 'prelink -r'. But 'prelink' is not (yet) available on
489c9b5090e2 Initial load
duke
parents:
diff changeset
   178
# our build platform (AS-2.1).
489c9b5090e2 Initial load
duke
parents:
diff changeset
   179
LD_SCRIPT = libjvm.so.lds
489c9b5090e2 Initial load
duke
parents:
diff changeset
   180
$(LD_SCRIPT): $(LIBJVM_MAPFILE)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   181
	$(QUIETLY) {                                                \
489c9b5090e2 Initial load
duke
parents:
diff changeset
   182
	  rm -rf $@;                                                \
489c9b5090e2 Initial load
duke
parents:
diff changeset
   183
	  $(LINK_VM) -Wl,--verbose $(LFLAGS_VM) 2>&1             |  \
489c9b5090e2 Initial load
duke
parents:
diff changeset
   184
	    sed -e '/^======/,/^======/!d'                          \
489c9b5090e2 Initial load
duke
parents:
diff changeset
   185
		-e '/^======/d'                                     \
489c9b5090e2 Initial load
duke
parents:
diff changeset
   186
		-e 's/0\( + SIZEOF_HEADERS\)/$(JVM_BASE_ADDR)\1/'   \
489c9b5090e2 Initial load
duke
parents:
diff changeset
   187
		> $@;                                               \
489c9b5090e2 Initial load
duke
parents:
diff changeset
   188
	}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   189
LD_SCRIPT_FLAG = -Wl,-T,$(LD_SCRIPT)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   190
endif
489c9b5090e2 Initial load
duke
parents:
diff changeset
   191
489c9b5090e2 Initial load
duke
parents:
diff changeset
   192
# With more recent Redhat releases (or the cutting edge version Fedora), if
489c9b5090e2 Initial load
duke
parents:
diff changeset
   193
# SELinux is configured to be enabled, the runtime linker will fail to apply
489c9b5090e2 Initial load
duke
parents:
diff changeset
   194
# the text relocation to libjvm.so considering that it is built as a non-PIC
489c9b5090e2 Initial load
duke
parents:
diff changeset
   195
# DSO. To workaround that, we run chcon to libjvm.so after it is built. See 
489c9b5090e2 Initial load
duke
parents:
diff changeset
   196
# details in bug 6538311.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   197
$(LIBJVM): $(LIBJVM.o) $(LIBJVM_MAPFILE) $(LD_SCRIPT)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   198
	$(QUIETLY) {                                                    \
489c9b5090e2 Initial load
duke
parents:
diff changeset
   199
	    echo Linking vm...;                                         \
489c9b5090e2 Initial load
duke
parents:
diff changeset
   200
	    $(LINK_LIB.CC/PRE_HOOK)                                     \
489c9b5090e2 Initial load
duke
parents:
diff changeset
   201
	    $(LINK_VM) $(LD_SCRIPT_FLAG)                                \
489c9b5090e2 Initial load
duke
parents:
diff changeset
   202
		       $(LFLAGS_VM) -o $@ $(LIBJVM.o) $(LIBS_VM);       \
489c9b5090e2 Initial load
duke
parents:
diff changeset
   203
	    $(LINK_LIB.CC/POST_HOOK)                                    \
489c9b5090e2 Initial load
duke
parents:
diff changeset
   204
	    rm -f $@.1; ln -s $@ $@.1;                                  \
4493
9204129f065e 6843629: Make current hotspot build part of jdk5 control build
phh
parents: 4013
diff changeset
   205
	    [ -f $(LIBJVM_G) ] || { ln -s $@ $(LIBJVM_G); ln -s $@.1 $(LIBJVM_G).1; }; \
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   206
	    if [ -x /usr/sbin/selinuxenabled ] ; then                   \
489c9b5090e2 Initial load
duke
parents:
diff changeset
   207
	      /usr/sbin/selinuxenabled;                                 \
489c9b5090e2 Initial load
duke
parents:
diff changeset
   208
              if [ $$? = 0 ] ; then					\
489c9b5090e2 Initial load
duke
parents:
diff changeset
   209
		/usr/bin/chcon -t textrel_shlib_t $@;                   \
489c9b5090e2 Initial load
duke
parents:
diff changeset
   210
		if [ $$? != 0 ]; then                                   \
995
1a961ad82730 6459085: naked pointer subtractions in class data sharing code
xlu
parents: 670
diff changeset
   211
		  echo "ERROR: Cannot chcon $@";			\
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   212
		fi							\
489c9b5090e2 Initial load
duke
parents:
diff changeset
   213
	      fi							\
489c9b5090e2 Initial load
duke
parents:
diff changeset
   214
	    fi                                                          \
489c9b5090e2 Initial load
duke
parents:
diff changeset
   215
	}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   216
489c9b5090e2 Initial load
duke
parents:
diff changeset
   217
DEST_JVM = $(JDK_LIBDIR)/$(VM_SUBDIR)/$(LIBJVM)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   218
489c9b5090e2 Initial load
duke
parents:
diff changeset
   219
install_jvm: $(LIBJVM)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   220
	@echo "Copying $(LIBJVM) to $(DEST_JVM)"
489c9b5090e2 Initial load
duke
parents:
diff changeset
   221
	$(QUIETLY) cp -f $(LIBJVM) $(DEST_JVM) && echo "Done"
489c9b5090e2 Initial load
duke
parents:
diff changeset
   222
489c9b5090e2 Initial load
duke
parents:
diff changeset
   223
#----------------------------------------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   224
# Other files
489c9b5090e2 Initial load
duke
parents:
diff changeset
   225
489c9b5090e2 Initial load
duke
parents:
diff changeset
   226
# Gamma launcher
489c9b5090e2 Initial load
duke
parents:
diff changeset
   227
include $(MAKEFILES_DIR)/launcher.make
489c9b5090e2 Initial load
duke
parents:
diff changeset
   228
489c9b5090e2 Initial load
duke
parents:
diff changeset
   229
# Signal interposition library
489c9b5090e2 Initial load
duke
parents:
diff changeset
   230
include $(MAKEFILES_DIR)/jsig.make
489c9b5090e2 Initial load
duke
parents:
diff changeset
   231
489c9b5090e2 Initial load
duke
parents:
diff changeset
   232
# Serviceability agent
489c9b5090e2 Initial load
duke
parents:
diff changeset
   233
include $(MAKEFILES_DIR)/saproc.make
489c9b5090e2 Initial load
duke
parents:
diff changeset
   234
489c9b5090e2 Initial load
duke
parents:
diff changeset
   235
#----------------------------------------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   236
489c9b5090e2 Initial load
duke
parents:
diff changeset
   237
build: $(LIBJVM) $(LAUNCHER) $(LIBJSIG) $(LIBJVM_DB) checkAndBuildSA
489c9b5090e2 Initial load
duke
parents:
diff changeset
   238
489c9b5090e2 Initial load
duke
parents:
diff changeset
   239
install: install_jvm install_jsig install_saproc
489c9b5090e2 Initial load
duke
parents:
diff changeset
   240
489c9b5090e2 Initial load
duke
parents:
diff changeset
   241
.PHONY: default build install install_jvm