36 # elegant solution to this. 37 WIN_JAVA_LIB := $(SUPPORT_OUTPUTDIR)/native/java.base/libjava/java.lib 38 39 ifdef OPENJDK 40 # Build everything with debugging on OpenJDK 41 DEBUG_ALL_BINARIES := true 42 else 43 # Use this variable to set DEBUG_SYMBOLS true on windows for all libraries, but 44 # not on other platforms. 45 ifeq ($(OPENJDK_TARGET_OS), windows) 46 DEBUG_ALL_BINARIES := true 47 else 48 DEBUG_ALL_BINARIES := false 49 endif 50 endif 51 52 ################################################################################ 53 # Find the default set of src dirs for a native library. 54 # Param 1 - module name 55 # Param 2 - library name 56 define FindSrcDirsForLib 57 $(call uniq, $(wildcard \ 58 $(JDK_TOPDIR)/src/$(strip $1)/$(OPENJDK_TARGET_OS)/native/lib$(strip $2) \ 59 $(JDK_TOPDIR)/src/$(strip $1)/$(OPENJDK_TARGET_OS_TYPE)/native/lib$(strip $2) \ 60 $(JDK_TOPDIR)/src/$(strip $1)/share/native/lib$(strip $2))) 61 endef 62 63 ################################################################################ 64 # Find lib dir for module 65 # Param 1 - module name 66 ifeq ($(OPENJDK_TARGET_OS_TYPE), unix) 67 define FindLibDirForModule 68 $(SUPPORT_OUTPUTDIR)/modules_libs/$(strip $1)$(OPENJDK_TARGET_CPU_LIBDIR) 69 endef 70 else 71 define FindLibDirForModule 72 $(SUPPORT_OUTPUTDIR)/modules_libs/$(strip $1) 73 endef 74 endif 75 76 ################################################################################ 77 # Find a library 78 # Param 1 - module name 79 # Param 2 - library name 80 # Param 3 - subdir for library 81 define FindLib 82 $(strip \ 83 $(call FindLibDirForModule, $(strip $1))$(strip $3)/$(LIBRARY_PREFIX)$(strip $2)$(SHARED_LIBRARY_SUFFIX) \ 84 ) 85 endef 86 87 ################################################################################ 88 # Define the header include flags needed to compile against it. 89 LIBJAVA_HEADER_FLAGS := $(addprefix -I, $(call FindSrcDirsForLib, java.base, java)) 90 91 # Put the libraries here. 92 INSTALL_LIBRARIES_HERE := $(call FindLibDirForModule, $(MODULE)) 93 94 ################################################################################ 95 96 # Define it here since there are multiple uses. 97 ifeq ($(USE_EXTERNAL_LIBZ), true) 98 LIBZ := -lz 99 else 100 ZLIB_CPPFLAGS := -I$(JDK_TOPDIR)/src/java.base/share/native/libzip/zlib-1.2.8 101 endif | 36 # elegant solution to this. 37 WIN_JAVA_LIB := $(SUPPORT_OUTPUTDIR)/native/java.base/libjava/java.lib 38 39 ifdef OPENJDK 40 # Build everything with debugging on OpenJDK 41 DEBUG_ALL_BINARIES := true 42 else 43 # Use this variable to set DEBUG_SYMBOLS true on windows for all libraries, but 44 # not on other platforms. 45 ifeq ($(OPENJDK_TARGET_OS), windows) 46 DEBUG_ALL_BINARIES := true 47 else 48 DEBUG_ALL_BINARIES := false 49 endif 50 endif 51 52 ################################################################################ 53 # Find the default set of src dirs for a native library. 54 # Param 1 - module name 55 # Param 2 - library name 56 FindSrcDirsForLib = \ 57 $(call uniq, $(wildcard \ 58 $(JDK_TOPDIR)/src/$(strip $1)/$(OPENJDK_TARGET_OS)/native/lib$(strip $2) \ 59 $(JDK_TOPDIR)/src/$(strip $1)/$(OPENJDK_TARGET_OS_TYPE)/native/lib$(strip $2) \ 60 $(JDK_TOPDIR)/src/$(strip $1)/share/native/lib$(strip $2))) 61 62 ################################################################################ 63 # Find lib dir for module 64 # Param 1 - module name 65 ifeq ($(OPENJDK_TARGET_OS_TYPE), unix) 66 FindLibDirForModule = \ 67 $(SUPPORT_OUTPUTDIR)/modules_libs/$(strip $1)$(OPENJDK_TARGET_CPU_LIBDIR) 68 else 69 FindLibDirForModule = \ 70 $(SUPPORT_OUTPUTDIR)/modules_libs/$(strip $1) 71 endif 72 73 ################################################################################ 74 # Find a library 75 # Param 1 - module name 76 # Param 2 - library name 77 # Param 3 - subdir for library 78 FindLib = \ 79 $(call FindLibDirForModule, \ 80 $(strip $1))$(strip $3)/$(LIBRARY_PREFIX)$(strip $2)$(SHARED_LIBRARY_SUFFIX) 81 82 83 ################################################################################ 84 # Define the header include flags needed to compile against it. 85 LIBJAVA_HEADER_FLAGS := $(addprefix -I, $(call FindSrcDirsForLib, java.base, java)) 86 87 # Put the libraries here. 88 INSTALL_LIBRARIES_HERE := $(call FindLibDirForModule, $(MODULE)) 89 90 ################################################################################ 91 92 # Define it here since there are multiple uses. 93 ifeq ($(USE_EXTERNAL_LIBZ), true) 94 LIBZ := -lz 95 else 96 ZLIB_CPPFLAGS := -I$(JDK_TOPDIR)/src/java.base/share/native/libzip/zlib-1.2.8 97 endif |