1 | #
|
---|
2 | # Copyright 1997-2009 Sun Microsystems, Inc. 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
|
---|
20 | # CA 95054 USA or visit www.sun.com if you need additional information or
|
---|
21 | # have any questions.
|
---|
22 | #
|
---|
23 | #
|
---|
24 |
|
---|
25 | # Include dependencies
|
---|
26 | -include *.d
|
---|
27 |
|
---|
28 | include ../generated/objfiles.make
|
---|
29 |
|
---|
30 | ifdef RELEASE
|
---|
31 | ifdef DEVELOP
|
---|
32 | CPP_FLAGS += -DASSERT
|
---|
33 | else
|
---|
34 | CPP_FLAGS += -DPRODUCT
|
---|
35 | endif
|
---|
36 | else
|
---|
37 | CPP_FLAGS += -DASSERT -DDEBUG -D_DEBUG
|
---|
38 | endif
|
---|
39 |
|
---|
40 | ifeq ($(Variant), core)
|
---|
41 | # No need to define anything, CORE is defined as !COMPILER1 && !COMPILER2
|
---|
42 | endif
|
---|
43 |
|
---|
44 | ifeq ($(Variant), kernel)
|
---|
45 | CPP_FLAGS += -DKERNEL
|
---|
46 | endif
|
---|
47 |
|
---|
48 | ifeq ($(Variant), compiler1)
|
---|
49 | CPP_FLAGS += -DCOMPILER1
|
---|
50 | endif
|
---|
51 |
|
---|
52 | ifeq ($(Variant), compiler2)
|
---|
53 | CPP_FLAGS += -DCOMPILER2
|
---|
54 | endif
|
---|
55 |
|
---|
56 | ifeq ($(Variant), tiered)
|
---|
57 | CPP_FLAGS += -DCOMPILER1 -DCOMPILER2
|
---|
58 | endif
|
---|
59 |
|
---|
60 | ifeq ($(BUILDARCH), i486)
|
---|
61 | HOTSPOT_LIB_ARCH = i386
|
---|
62 | else
|
---|
63 | HOTSPOT_LIB_ARCH = $(BUILDARCH)
|
---|
64 | endif
|
---|
65 |
|
---|
66 | # The following variables are defined in the generated local.make file.
|
---|
67 | CPP_FLAGS += -D'HOTSPOT_RELEASE_VERSION="$(HS_BUILD_VER)"'
|
---|
68 | CPP_FLAGS += -D'JRE_RELEASE_VERSION="$(JRE_RELEASE_VER)"'
|
---|
69 | CPP_FLAGS += -D'HOTSPOT_LIB_ARCH="$(HOTSPOT_LIB_ARCH)"'
|
---|
70 | CPP_FLAGS += -D'HOTSPOT_BUILD_TARGET="$(BUILD_FLAVOR)"'
|
---|
71 | CPP_FLAGS += -D'HOTSPOT_BUILD_USER="$(BuildUser)"'
|
---|
72 | CPP_FLAGS += -D'HOTSPOT_VM_DISTRO="$(HOTSPOT_VM_DISTRO)"'
|
---|
73 |
|
---|
74 | CPP_FLAGS += -DOS2
|
---|
75 |
|
---|
76 | # Must specify this for sharedRuntimeTrig.cpp
|
---|
77 | CPP_FLAGS += -DVM_LITTLE_ENDIAN
|
---|
78 |
|
---|
79 | # Define that so jni.h is on correct side
|
---|
80 | CPP_FLAGS += -D_JNI_IMPLEMENTATION_
|
---|
81 |
|
---|
82 | ifeq ($(Variant), kernel)
|
---|
83 | AGCT_EXPORT=
|
---|
84 | else
|
---|
85 | AGCT_EXPORT=_AsyncGetCallTrace\n AsyncGetCallTrace=_AsyncGetCallTrace\n
|
---|
86 | endif
|
---|
87 |
|
---|
88 | Def_File = vm.def
|
---|
89 | $(Def_File): $(MAKEFILE)
|
---|
90 | @printf "LIBRARY jvm INITINSTANCE TERMINSTANCE\n\
|
---|
91 | EXPORTS\n\
|
---|
92 | _jio_snprintf\n\
|
---|
93 | _jio_printf\n\
|
---|
94 | _jio_fprintf\n\
|
---|
95 | _jio_vfprintf\n\
|
---|
96 | _jio_vsnprintf\n\
|
---|
97 | $(AGCT_EXPORT)\
|
---|
98 | " > $(Def_File)
|
---|
99 |
|
---|
100 | LINK_FLAGS += -Zdll
|
---|
101 |
|
---|
102 | ifeq ($(EMXOMFLD_TYPE), VAC308)
|
---|
103 | # (for some reason -Zdll is not always converted to /DLL by emxomfld)
|
---|
104 | LINK_FLAGS += -Zlinker /DLL
|
---|
105 | endif
|
---|
106 |
|
---|
107 | ifneq ($(USE_PRECOMPILED_HEADER),0)
|
---|
108 | $(error Please add the rule for the PCH file!)
|
---|
109 | CPP_FLAGS += # grab the PCH rule from linux/makefiles/gcc.make
|
---|
110 | else
|
---|
111 | CPP_FLAGS += -DDONT_USE_PRECOMPILED_HEADER
|
---|
112 | endif
|
---|
113 |
|
---|
114 | # Where to find the include files for the virtual machine
|
---|
115 | CPP_FLAGS += \
|
---|
116 | -I../generated \
|
---|
117 | -I"$(WorkSpace)/src/share/vm" \
|
---|
118 | -I"$(WorkSpace)/src/share/vm/prims" \
|
---|
119 | -I"$(WorkSpace)/src/os/windows/vm" \
|
---|
120 | -I"$(WorkSpace)/src/os/os2/vm" \
|
---|
121 | -I"$(WorkSpace)/src/os_cpu/windows_$(Platform_arch)/vm" \
|
---|
122 | -I"$(WorkSpace)/src/os_cpu/os2_$(Platform_arch)/vm" \
|
---|
123 | -I"$(WorkSpace)/src/cpu/$(Platform_arch)/vm" \
|
---|
124 |
|
---|
125 | # Where to find the source code for the virtual machine
|
---|
126 | Src_Dirs_V = \
|
---|
127 | ../generated/adfiles \
|
---|
128 | ../generated/jvmtifiles \
|
---|
129 | $(WorkSpace)/src/share/vm/c1 \
|
---|
130 | $(WorkSpace)/src/share/vm/compiler \
|
---|
131 | $(WorkSpace)/src/share/vm/code \
|
---|
132 | $(WorkSpace)/src/share/vm/interpreter \
|
---|
133 | $(WorkSpace)/src/share/vm/ci \
|
---|
134 | $(WorkSpace)/src/share/vm/classfile \
|
---|
135 | $(WorkSpace)/src/share/vm/gc_implementation/parallelScavenge\
|
---|
136 | $(WorkSpace)/src/share/vm/gc_implementation/shared\
|
---|
137 | $(WorkSpace)/src/share/vm/gc_implementation/parNew\
|
---|
138 | $(WorkSpace)/src/share/vm/gc_implementation/concurrentMarkSweep\
|
---|
139 | $(WorkSpace)/src/share/vm/gc_implementation/g1\
|
---|
140 | $(WorkSpace)/src/share/vm/gc_interface\
|
---|
141 | $(WorkSpace)/src/share/vm/asm \
|
---|
142 | $(WorkSpace)/src/share/vm/memory \
|
---|
143 | $(WorkSpace)/src/share/vm/oops \
|
---|
144 | $(WorkSpace)/src/share/vm/prims \
|
---|
145 | $(WorkSpace)/src/share/vm/runtime \
|
---|
146 | $(WorkSpace)/src/share/vm/services \
|
---|
147 | $(WorkSpace)/src/share/vm/utilities \
|
---|
148 | $(WorkSpace)/src/share/vm/libadt \
|
---|
149 | $(WorkSpace)/src/share/vm/opto \
|
---|
150 | $(WorkSpace)/src/os/windows/vm \
|
---|
151 | $(WorkSpace)/src/os/os2/vm \
|
---|
152 | $(WorkSpace)/src/os_cpu/windows_$(Platform_arch)/vm \
|
---|
153 | $(WorkSpace)/src/os_cpu/os2_$(Platform_arch)/vm \
|
---|
154 | $(WorkSpace)/src/cpu/$(Platform_arch)/vm \
|
---|
155 | $(WorkSpace)/src/share/vm/opto
|
---|
156 | VPATH += $(Src_Dirs_V:%=%;)
|
---|
157 |
|
---|
158 | # Special case files not using precompiled header files.
|
---|
159 |
|
---|
160 | c1_RInfo_$(Platform_arch).obj: $(WorkSpace)/src/cpu/$(Platform_arch)/vm/c1_RInfo_$(Platform_arch).cpp
|
---|
161 | os_windows.obj: $(WorkSpace)/src/os/windows/vm/os_windows.cpp
|
---|
162 | os_windows_$(Platform_arch).obj: $(WorkSpace)/src/os_cpu/windows_$(Platform_arch)/vm/os_windows_$(Platform_arch).cpp
|
---|
163 | osThread_windows.obj: $(WorkSpace)/src/os/windows/vm/osThread_windows.cpp
|
---|
164 | conditionVar_windows.obj: $(WorkSpace)/src/os/windows/vm/conditionVar_windows.cpp
|
---|
165 | getThread_windows_$(Platform_arch).obj: $(WorkSpace)/src/os_cpu/windows_$(Platform_arch)/vm/getThread_windows_$(Platform_arch).cpp
|
---|
166 | opcodes.obj: $(WorkSpace)/src/share/vm/opto/opcodes.cpp
|
---|
167 | bytecodeInterpreter.obj: $(WorkSpace)/src/share/vm/interpreter/bytecodeInterpreter.cpp
|
---|
168 | bytecodeInterpreterWithChecks.obj: ../generated/jvmtifiles/bytecodeInterpreterWithChecks.cpp
|
---|
169 |
|
---|
170 | # Default rules for the Virtual Machine
|
---|
171 | %.obj: %.cpp
|
---|
172 | $(CXX) $(CXX_FLAGS) -c $< -o $@
|
---|
173 |
|
---|
174 | %.obj: %.s
|
---|
175 | $(CXX) $(CPP_FLAGS) -c $< -o $@
|
---|
176 |
|
---|
177 | default::
|
---|