-
Notifications
You must be signed in to change notification settings - Fork 117
/
Copy pathMain.gmk
131 lines (98 loc) · 4.12 KB
/
Main.gmk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
# ===========================================================================
# (c) Copyright IBM Corp. 2017, 2024 All Rights Reserved
# ===========================================================================
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation.
#
# IBM designates this particular file as subject to the "Classpath" exception
# as provided by IBM in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, see <http://www.gnu.org/licenses/>.
# ===========================================================================
CLEAN_DIRS += vm
.PHONY : \
debug-image \
j9vm-build \
test-image-openj9 \
#
JVM_MAIN_LIB_TARGETS := j9vm-build
JVM_MAIN_TARGETS := j9vm-build
JVM_TOOLS_TARGETS :=
JVM_DOCS_TARGETS :=
JVM_TEST_IMAGE_TARGETS := test-image-openj9
DEFAULT_JMOD_DEPS := j9vm-build
PHASE_MAKEDIRS := $(TOPDIR)/closed/make $(PHASE_MAKEDIRS)
OPENJ9_MAKE := $(MAKE) $(MAKE_ARGS) -f $(TOPDIR)/closed/OpenJ9.gmk
# An early part of the build process involves computing the list of main targets.
# Those targets include {module}-java, {module}-jmod, etc. which requires that the
# set of module names be known. We must build and run the preprocessor to ensure the
# modules specific to OpenJ9 will be found and included in that set. The next two
# rules make that happen.
create-main-targets-include java.base-gensrc : generate-j9jcl-sources
j9vm-build : buildtools-langtools
ifeq ($(BUILD_OPENSSL),yes)
@+$(MAKE) $(MAKE_ARGS) -f $(TOPDIR)/closed/openssl.gmk
endif # BUILD_OPENSSL
@+$(OPENJ9_MAKE) build-j9
@+$(OPENJ9_MAKE) openj9-config-headers
# Modules with content created by j9vm-build:
OPENJ9_VM_MODULES := \
java.base \
jdk.management \
$(if $(call equals, $(OPENJ9_ENABLE_CRIU_SUPPORT), true), openj9.criu) \
openj9.cuda \
openj9.dtfj \
openj9.sharedclasses \
openj9.traceformat \
#
$(addsuffix -copy, $(OPENJ9_VM_MODULES)) : j9vm-build
java.base-libs : java.base-copy
debug-image : exploded-image
+$(MAKE) $(MAKE_ARGS) -f $(TOPDIR)/closed/DebugImage.gmk
all-images : debug-image
ALL_TARGETS += debug-image
# If not cross-compiling, capture 'java -version' output.
test-image-openj9 : exploded-image
@+$(OPENJ9_MAKE) openj9_test_image
ifneq ($(COMPILE_TYPE), cross)
rc=0; $(JDK_OUTPUTDIR)/bin/java -version >$(TEST_IMAGE_DIR)/openj9/java-version.txt 2>&1 || rc="$$?"; $(CAT) $(TEST_IMAGE_DIR)/openj9/java-version.txt; exit "$$rc"
endif
ALL_TARGETS += test-image-openj9
ifeq (true,$(OPENJ9_ENABLE_DDR))
.PHONY : openj9.dtfj-gensrc-src openj9.dtfj-compile_check
openj9.dtfj-gensrc-src : j9vm-build
openj9.dtfj-compile_check : openj9.dtfj-java
+$(MAKE) $(MAKE_ARGS) -f $(TOPDIR)/closed/DDR.gmk compile_check
openj9.dtfj-jmod : openj9.dtfj-compile_check
endif # OPENJ9_ENABLE_DDR
clean-docs : clean-openj9-only-docs
.PHONY : clean-openj9-only-docs
clean-openj9-only-docs :
@$(ECHO) Cleaning openj9-only-docs ...
$(RM) -rf $(IMAGES_OUTPUTDIR)/openj9-docs $(SUPPORT_OUTPUTDIR)/openj9-docs
ALL_TARGETS += clean-openj9-only-docs
ifneq (,$(HEALTHCENTER_JAR))
# The content must be extracted before module-info can be compiled.
ibm.healthcenter-java : ibm.healthcenter-copy
endif # HEALTHCENTER_JAR
ifeq (true,$(BUILD_OPENJCEPLUS))
ifeq ($(call And, $(call isTargetOs, windows) $(call isTargetCpu, x86_64)), true)
OPENJCEPLUS_JGSKIT_MAKE := jgskit.win64.mak
else
OPENJCEPLUS_JGSKIT_MAKE := jgskit.mak
endif
openjceplus-copy : openjceplus-libs
.PHONY : openjceplus-clean
openjceplus-clean :
@$(ECHO) Cleaning OpenJCEPlus native code
$(MAKE) -C $(OPENJCEPLUS_TOPDIR)/src/main/native -f $(OPENJCEPLUS_JGSKIT_MAKE) cleanAll
clean-openjceplus : openjceplus-clean
endif # BUILD_OPENJCEPLUS