annotate make/linux/makefiles/vm.make @ 1476:1f81c0d18c75

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