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 default: all 27 28 include $(SPEC) 29 include MakeBase.gmk 30 31 ################################################################################ 32 33 # Put the libraries here. Different locations for different target OS types. 34 ifneq ($(OPENJDK_TARGET_OS), windows) 35 HOTSPOT_LIB_DIR := $(HOTSPOT_DIST)/lib$(OPENJDK_TARGET_CPU_LIBDIR) 36 BASE_INSTALL_LIBRARIES_HERE := $(SUPPORT_OUTPUTDIR)/modules_libs/java.base$(OPENJDK_TARGET_CPU_LIBDIR) 37 SA_INSTALL_LIBRARIES_HERE := $(SUPPORT_OUTPUTDIR)/modules_libs/jdk.hotspot.agent$(OPENJDK_TARGET_CPU_LIBDIR) 38 else 39 HOTSPOT_LIB_DIR := $(HOTSPOT_DIST)/bin 40 BASE_INSTALL_LIBRARIES_HERE := $(SUPPORT_OUTPUTDIR)/modules_libs/java.base 41 SA_INSTALL_LIBRARIES_HERE := $(SUPPORT_OUTPUTDIR)/modules_libs/jdk.hotspot.agent 42 endif 43 44 ################################################################################ 45 # 46 # Import hotspot 47 # 48 49 # Don't import jsig library for static builds 50 ifneq ($(STATIC_BUILD), true) 51 JSIG_IMPORT = jsig.* 52 else 53 JSIG_IMPORT = 54 endif 55 56 HOTSPOT_BASE_IMPORT_FILES := \ 57 $(addprefix $(LIBRARY_PREFIX), jvm.* $(JSIG_IMPORT) jvm_db.* jvm_dtrace.*) \ 58 Xusage.txt \ 59 # 60 61 HOTSPOT_SA_IMPORT_FILES := \ 62 $(addprefix $(LIBRARY_PREFIX), saproc.* sawindbg.*) \ 63 # 64 65 $(eval $(call SetupCopyFiles,COPY_HOTSPOT_BASE, \ 66 SRC := $(HOTSPOT_LIB_DIR), \ 67 DEST := $(BASE_INSTALL_LIBRARIES_HERE), \ 68 FILES := $(shell $(FIND) $(HOTSPOT_LIB_DIR) -type f \ 69 -a \( -name DUMMY $(addprefix -o$(SPACE)-name$(SPACE), $(HOTSPOT_BASE_IMPORT_FILES)) \) ))) 70 71 ifeq ($(OPENJDK_TARGET_OS), windows) 72 $(eval $(call SetupCopyFiles,COPY_HOTSPOT_BASE_JVMLIB, \ 73 SRC := $(HOTSPOT_DIST)/lib, \ 74 DEST := $(BASE_INSTALL_LIBRARIES_HERE), \ 75 FILES := $(wildcard $(HOTSPOT_DIST)/lib/*.lib))) 76 endif 77 78 BASE_TARGETS := $(COPY_HOTSPOT_BASE) $(COPY_HOTSPOT_BASE_JVMLIB) 79 80 $(eval $(call SetupCopyFiles,COPY_HOTSPOT_SA, \ 81 SRC := $(HOTSPOT_LIB_DIR), \ 82 DEST := $(SA_INSTALL_LIBRARIES_HERE), \ 83 FILES := $(shell $(FIND) $(HOTSPOT_LIB_DIR) -type f \ 84 -a \( -name DUMMY $(addprefix -o$(SPACE)-name$(SPACE), $(HOTSPOT_SA_IMPORT_FILES)) \) ))) 85 86 SA_TARGETS := $(COPY_HOTSPOT_SA) 87 88 ################################################################################ 89 90 ifneq ($(STATIC_BUILD), true) 91 ifeq ($(OPENJDK_TARGET_OS), macosx) 92 JSIG_DEBUGINFO := $(strip $(wildcard $(HOTSPOT_DIST)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/libjsig$(SHARED_LIBRARY_SUFFIX).dSYM) \ 93 $(wildcard $(HOTSPOT_DIST)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/libjsig.diz) ) 94 else 95 JSIG_DEBUGINFO := $(strip $(wildcard $(HOTSPOT_DIST)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/libjsig.debuginfo) \ 96 $(wildcard $(HOTSPOT_DIST)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/libjsig.diz) ) 97 endif 98 99 ifneq ($(OPENJDK_TARGET_OS), windows) 100 ifeq ($(JVM_VARIANT_SERVER), true) 101 BASE_TARGETS += $(BASE_INSTALL_LIBRARIES_HERE)/server/$(LIBRARY_PREFIX)jsig$(SHARED_LIBRARY_SUFFIX) 102 ifneq (, $(JSIG_DEBUGINFO)) 103 BASE_TARGETS += $(BASE_INSTALL_LIBRARIES_HERE)/server/$(foreach I,$(JSIG_DEBUGINFO),$(notdir $I)) 104 endif 105 endif 106 ifeq ($(JVM_VARIANT_CLIENT), true) 107 BASE_TARGETS += $(BASE_INSTALL_LIBRARIES_HERE)/client/$(LIBRARY_PREFIX)jsig$(SHARED_LIBRARY_SUFFIX) 196 $(LN) -s ../$(@F) $@ 197 198 ifneq ($(OPENJDK_TARGET_OS), macosx) 199 $(BASE_INSTALL_LIBRARIES_HERE)/minimal/%.debuginfo: $(BASE_INSTALL_LIBRARIES_HERE)/%.debuginfo 200 $(MKDIR) -p $(@D) 201 $(RM) $@ 202 $(LN) -s ../$(@F) $@ 203 204 $(BASE_INSTALL_LIBRARIES_HERE)/minimal/%.diz: $(BASE_INSTALL_LIBRARIES_HERE)/%.diz 205 $(MKDIR) -p $(@D) 206 $(RM) $@ 207 $(RM) $@.tmp $(basename $@).debuginfo 208 $(LN) -s ../$(basename $(@F)).debuginfo $(basename $@).debuginfo 209 $(CD) $(@D) && $(ZIP) -q -y $@.tmp $(basename $(@F)).debuginfo 210 $(RM) $(basename $@).debuginfo 211 $(MV) $@.tmp $@ 212 endif 213 214 ################################################################################ 215 216 $(JDK_OUTPUTDIR)/modules/jdk.hotspot.agent/_the.sa.jar.unpacked: $(HOTSPOT_DIST)/lib/sa-jdi.jar \ 217 $(SUPPORT_OUTPUTDIR)/gensrc/jdk.hotspot.agent/_the.sa.services 218 $(ECHO) $(LOG_INFO) Unzipping $(<F) 219 $(RM) -r $(@D) 220 $(MKDIR) -p $(@D) 221 $(CD) $(@D) && $(UNZIP) $< -x META-INF/MANIFEST.MF $(LOG_DEBUG) 222 # We must move the service provider file out of the way so that 223 # Gensrc-jdk.jdi.gmk can combine them. 224 $(MKDIR) -p $(SUPPORT_OUTPUTDIR)/gensrc/jdk.hotspot.agent 225 $(MV) $(JDK_OUTPUTDIR)/modules/jdk.hotspot.agent/META-INF/services/com.sun.jdi.connect.Connector \ 226 $(SUPPORT_OUTPUTDIR)/gensrc/jdk.hotspot.agent/_the.sa.services 227 $(TOUCH) $(SUPPORT_OUTPUTDIR)/gensrc/jdk.hotspot.agent/_the.sa.services 228 $(TOUCH) $@ 229 230 # Declaring this dependency guarantees that _the.sa.services will be rebuilt 231 # even if zip is already unpacked. 232 $(SUPPORT_OUTPUTDIR)/gensrc/jdk.hotspot.agent/_the.sa.services: $(HOTSPOT_DIST)/lib/sa-jdi.jar 233 234 # Some platforms don't have the serviceability agent 235 ifeq (, $(filter $(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU), aix-ppc64)) 236 ifneq ($(JVM_VARIANT_ZERO), true) 237 SA_TARGETS += $(JDK_OUTPUTDIR)/modules/jdk.hotspot.agent/_the.sa.jar.unpacked \ 238 $(SUPPORT_OUTPUTDIR)/gensrc/jdk.hotspot.agent/_the.sa.services 239 endif 240 endif 241 242 ################################################################################ 243 244 ifeq ($(OPENJDK_TARGET_OS), windows) 245 $(eval $(call SetupCopyFiles,BASE_COPY_LIBS_BIN, \ 246 SRC := $(SUPPORT_OUTPUTDIR)/modules_libs/java.base, \ 247 DEST := $(JDK_OUTPUTDIR)/bin, \ 248 FILES := $(filter-out %.lib, $(BASE_TARGETS)))) 249 250 $(eval $(call SetupCopyFiles,BASE_COPY_LIBS_LIB, \ 251 SRC := $(SUPPORT_OUTPUTDIR)/modules_libs/java.base, \ 252 DEST := $(JDK_OUTPUTDIR)/lib, \ 253 FILES := $(filter %.lib, $(BASE_TARGETS)))) 254 255 $(eval $(call SetupCopyFiles,SA_COPY_LIBS, \ 256 SRC := $(SUPPORT_OUTPUTDIR)/modules_libs/jdk.hotspot.agent, \ 257 DEST := $(JDK_OUTPUTDIR)/lib, \ 258 FILES := $(filter $(SUPPORT_OUTPUTDIR)/modules_libs/jdk.hotspot.agent/%, \ 259 $(SA_TARGETS)))) 260 261 $(eval $(call SetupCopyFiles,SA_COPY_LIBS, \ 262 SRC := $(SUPPORT_OUTPUTDIR)/modules_libs/jdk.hotspot.agent, \ 263 DEST := $(JDK_OUTPUTDIR)/bin, \ 264 FILES := $(filter $(SUPPORT_OUTPUTDIR)/modules_libs/jdk.hotspot.agent/%, \ 265 $(SA_TARGETS)))) 266 else 267 $(eval $(call SetupCopyFiles,BASE_COPY_LIBS, \ 268 SRC := $(SUPPORT_OUTPUTDIR)/modules_libs/java.base, \ 269 DEST := $(JDK_OUTPUTDIR)/lib, \ 270 FILES := $(BASE_TARGETS))) 271 272 $(eval $(call SetupCopyFiles,SA_COPY_LIBS, \ 273 SRC := $(SUPPORT_OUTPUTDIR)/modules_libs/jdk.hotspot.agent, \ 274 DEST := $(JDK_OUTPUTDIR)/lib, \ 275 FILES := $(filter $(SUPPORT_OUTPUTDIR)/modules_libs/jdk.hotspot.agent/%, $(SA_TARGETS)))) 276 endif 277 278 ################################################################################ 279 280 all: $(BASE_TARGETS) $(SA_TARGETS) \ 281 $(BASE_COPY_LIBS_BIN) $(BASE_COPY_LIBS_LIB) \ 282 $(BASE_COPY_LIBS) $(SA_COPY_LIBS) 283 284 .PHONY: default all | 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 default: all 27 28 include $(SPEC) 29 include MakeBase.gmk 30 31 ################################################################################ 32 33 # Put the libraries here. Different locations for different target OS types. 34 ifneq ($(OPENJDK_TARGET_OS), windows) 35 HOTSPOT_LIB_DIR := $(HOTSPOT_DIST)/lib$(OPENJDK_TARGET_CPU_LIBDIR) 36 BASE_INSTALL_LIBRARIES_HERE := $(SUPPORT_OUTPUTDIR)/modules_libs/java.base$(OPENJDK_TARGET_CPU_LIBDIR) 37 else 38 HOTSPOT_LIB_DIR := $(HOTSPOT_DIST)/bin 39 BASE_INSTALL_LIBRARIES_HERE := $(SUPPORT_OUTPUTDIR)/modules_libs/java.base 40 endif 41 42 ################################################################################ 43 # 44 # Import hotspot 45 # 46 47 # Don't import jsig library for static builds 48 ifneq ($(STATIC_BUILD), true) 49 JSIG_IMPORT = jsig.* 50 else 51 JSIG_IMPORT = 52 endif 53 54 HOTSPOT_BASE_IMPORT_FILES := \ 55 $(addprefix $(LIBRARY_PREFIX), jvm.* $(JSIG_IMPORT) jvm_db.* jvm_dtrace.*) \ 56 Xusage.txt \ 57 # 58 59 $(eval $(call SetupCopyFiles,COPY_HOTSPOT_BASE, \ 60 SRC := $(HOTSPOT_LIB_DIR), \ 61 DEST := $(BASE_INSTALL_LIBRARIES_HERE), \ 62 FILES := $(shell $(FIND) $(HOTSPOT_LIB_DIR) -type f \ 63 -a \( -name DUMMY $(addprefix -o$(SPACE)-name$(SPACE), $(HOTSPOT_BASE_IMPORT_FILES)) \) ))) 64 65 ifeq ($(OPENJDK_TARGET_OS), windows) 66 $(eval $(call SetupCopyFiles,COPY_HOTSPOT_BASE_JVMLIB, \ 67 SRC := $(HOTSPOT_DIST)/lib, \ 68 DEST := $(BASE_INSTALL_LIBRARIES_HERE), \ 69 FILES := $(wildcard $(HOTSPOT_DIST)/lib/*.lib))) 70 endif 71 72 BASE_TARGETS := $(COPY_HOTSPOT_BASE) $(COPY_HOTSPOT_BASE_JVMLIB) 73 74 ################################################################################ 75 76 ifneq ($(STATIC_BUILD), true) 77 ifeq ($(OPENJDK_TARGET_OS), macosx) 78 JSIG_DEBUGINFO := $(strip $(wildcard $(HOTSPOT_DIST)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/libjsig$(SHARED_LIBRARY_SUFFIX).dSYM) \ 79 $(wildcard $(HOTSPOT_DIST)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/libjsig.diz) ) 80 else 81 JSIG_DEBUGINFO := $(strip $(wildcard $(HOTSPOT_DIST)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/libjsig.debuginfo) \ 82 $(wildcard $(HOTSPOT_DIST)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/libjsig.diz) ) 83 endif 84 85 ifneq ($(OPENJDK_TARGET_OS), windows) 86 ifeq ($(JVM_VARIANT_SERVER), true) 87 BASE_TARGETS += $(BASE_INSTALL_LIBRARIES_HERE)/server/$(LIBRARY_PREFIX)jsig$(SHARED_LIBRARY_SUFFIX) 88 ifneq (, $(JSIG_DEBUGINFO)) 89 BASE_TARGETS += $(BASE_INSTALL_LIBRARIES_HERE)/server/$(foreach I,$(JSIG_DEBUGINFO),$(notdir $I)) 90 endif 91 endif 92 ifeq ($(JVM_VARIANT_CLIENT), true) 93 BASE_TARGETS += $(BASE_INSTALL_LIBRARIES_HERE)/client/$(LIBRARY_PREFIX)jsig$(SHARED_LIBRARY_SUFFIX) 182 $(LN) -s ../$(@F) $@ 183 184 ifneq ($(OPENJDK_TARGET_OS), macosx) 185 $(BASE_INSTALL_LIBRARIES_HERE)/minimal/%.debuginfo: $(BASE_INSTALL_LIBRARIES_HERE)/%.debuginfo 186 $(MKDIR) -p $(@D) 187 $(RM) $@ 188 $(LN) -s ../$(@F) $@ 189 190 $(BASE_INSTALL_LIBRARIES_HERE)/minimal/%.diz: $(BASE_INSTALL_LIBRARIES_HERE)/%.diz 191 $(MKDIR) -p $(@D) 192 $(RM) $@ 193 $(RM) $@.tmp $(basename $@).debuginfo 194 $(LN) -s ../$(basename $(@F)).debuginfo $(basename $@).debuginfo 195 $(CD) $(@D) && $(ZIP) -q -y $@.tmp $(basename $(@F)).debuginfo 196 $(RM) $(basename $@).debuginfo 197 $(MV) $@.tmp $@ 198 endif 199 200 ################################################################################ 201 202 ifeq ($(OPENJDK_TARGET_OS), windows) 203 $(eval $(call SetupCopyFiles,BASE_COPY_LIBS_BIN, \ 204 SRC := $(SUPPORT_OUTPUTDIR)/modules_libs/java.base, \ 205 DEST := $(JDK_OUTPUTDIR)/bin, \ 206 FILES := $(filter-out %.lib, $(BASE_TARGETS)))) 207 208 $(eval $(call SetupCopyFiles,BASE_COPY_LIBS_LIB, \ 209 SRC := $(SUPPORT_OUTPUTDIR)/modules_libs/java.base, \ 210 DEST := $(JDK_OUTPUTDIR)/lib, \ 211 FILES := $(filter %.lib, $(BASE_TARGETS)))) 212 213 else 214 $(eval $(call SetupCopyFiles,BASE_COPY_LIBS, \ 215 SRC := $(SUPPORT_OUTPUTDIR)/modules_libs/java.base, \ 216 DEST := $(JDK_OUTPUTDIR)/lib, \ 217 FILES := $(BASE_TARGETS))) 218 endif 219 220 ################################################################################ 221 222 all: $(BASE_TARGETS) $(BASE_COPY_LIBS_BIN) $(BASE_COPY_LIBS_LIB) \ 223 $(BASE_COPY_LIBS) 224 225 .PHONY: default all |