13 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 # version 2 for more details (a copy is included in the LICENSE file that 15 # accompanied this code). 16 # 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 include LibCommon.gmk 27 28 # Hook to include the corresponding custom file, if present. 29 $(eval $(call IncludeCustomExtension, lib/Lib-java.instrument.gmk)) 30 31 ################################################################################ 32 33 ifeq ($(OPENJDK_TARGET_OS), windows) 34 # equivalent of strcasecmp is stricmp on Windows 35 LIBINSTRUMENT_CFLAGS := -Dstrcasecmp=stricmp 36 WINDOWS_JLI_LIB := $(SUPPORT_OUTPUTDIR)/native/java.base/libjli/jli.lib 37 endif 38 39 $(eval $(call SetupJdkLibrary, BUILD_LIBINSTRUMENT, \ 40 NAME := instrument, \ 41 OPTIMIZATION := LOW, \ 42 CFLAGS := $(CFLAGS_JDKLIB) $(LIBINSTRUMENT_CFLAGS), \ 43 CFLAGS_debug := -DJPLIS_LOGGING, \ 44 CFLAGS_release := -DNO_JPLIS_LOGGING, \ 45 DISABLED_WARNINGS_gcc := unused-function, \ 46 EXTRA_HEADER_DIRS := java.base:libjli, \ 47 LDFLAGS := $(LDFLAGS_JDKLIB) \ 48 $(call SET_SHARED_LIBRARY_ORIGIN) \ 49 $(LIBINSTRUMENT_LDFLAGS), \ 50 LDFLAGS_linux := -L$(call FindLibDirForModule, java.base), \ 51 LDFLAGS_solaris := -L$(call FindLibDirForModule, java.base), \ 52 LDFLAGS_macosx := -L$(call FindLibDirForModule, java.base), \ 53 LDFLAGS_aix := -L$(SUPPORT_OUTPUTDIR)/native/java.base, \ 54 LIBS := $(JDKLIB_LIBS), \ 55 LIBS_unix := -ljava -ljvm $(LIBZ_LIBS), \ 56 LIBS_linux := -ljli $(LIBDL), \ 57 LIBS_solaris := -ljli $(LIBDL), \ 58 LIBS_aix := -liconv -ljli_static $(LIBDL), \ 59 LIBS_macosx := -ljli -liconv -framework Cocoa -framework Security \ 60 -framework ApplicationServices, \ 61 LIBS_windows := jvm.lib $(WIN_JAVA_LIB) advapi32.lib \ 62 $(WINDOWS_JLI_LIB), \ 63 )) 64 65 ifeq ($(OPENJDK_TARGET_OS), aix) 66 $(BUILD_LIBINSTRUMENT): $(call FindStaticLib, java.base, jli_static) 67 else 68 $(BUILD_LIBINSTRUMENT): $(call FindLib, java.base, jli) 69 endif 70 $(BUILD_LIBINSTRUMENT): $(call FindLib, java.base, java) 71 72 TARGETS += $(BUILD_LIBINSTRUMENT) 73 74 ################################################################################ | 13 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 # version 2 for more details (a copy is included in the LICENSE file that 15 # accompanied this code). 16 # 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 include LibCommon.gmk 27 28 # Hook to include the corresponding custom file, if present. 29 $(eval $(call IncludeCustomExtension, lib/Lib-java.instrument.gmk)) 30 31 ################################################################################ 32 33 ifeq ($(call isTargetOs, windows), true) 34 # equivalent of strcasecmp is stricmp on Windows 35 LIBINSTRUMENT_CFLAGS := -Dstrcasecmp=stricmp 36 WINDOWS_JLI_LIB := $(SUPPORT_OUTPUTDIR)/native/java.base/libjli/jli.lib 37 endif 38 39 $(eval $(call SetupJdkLibrary, BUILD_LIBINSTRUMENT, \ 40 NAME := instrument, \ 41 OPTIMIZATION := LOW, \ 42 CFLAGS := $(CFLAGS_JDKLIB) $(LIBINSTRUMENT_CFLAGS), \ 43 CFLAGS_debug := -DJPLIS_LOGGING, \ 44 CFLAGS_release := -DNO_JPLIS_LOGGING, \ 45 DISABLED_WARNINGS_gcc := unused-function, \ 46 EXTRA_HEADER_DIRS := java.base:libjli, \ 47 LDFLAGS := $(LDFLAGS_JDKLIB) \ 48 $(call SET_SHARED_LIBRARY_ORIGIN) \ 49 $(LIBINSTRUMENT_LDFLAGS), \ 50 LDFLAGS_linux := -L$(call FindLibDirForModule, java.base), \ 51 LDFLAGS_solaris := -L$(call FindLibDirForModule, java.base), \ 52 LDFLAGS_macosx := -L$(call FindLibDirForModule, java.base), \ 53 LDFLAGS_aix := -L$(SUPPORT_OUTPUTDIR)/native/java.base, \ 54 LIBS := $(JDKLIB_LIBS), \ 55 LIBS_unix := -ljava -ljvm $(LIBZ_LIBS), \ 56 LIBS_linux := -ljli $(LIBDL), \ 57 LIBS_solaris := -ljli $(LIBDL), \ 58 LIBS_aix := -liconv -ljli_static $(LIBDL), \ 59 LIBS_macosx := -ljli -liconv -framework Cocoa -framework Security \ 60 -framework ApplicationServices, \ 61 LIBS_windows := jvm.lib $(WIN_JAVA_LIB) advapi32.lib \ 62 $(WINDOWS_JLI_LIB), \ 63 )) 64 65 ifeq ($(call isTargetOs, aix), true) 66 $(BUILD_LIBINSTRUMENT): $(call FindStaticLib, java.base, jli_static) 67 else 68 $(BUILD_LIBINSTRUMENT): $(call FindLib, java.base, jli) 69 endif 70 $(BUILD_LIBINSTRUMENT): $(call FindLib, java.base, java) 71 72 TARGETS += $(BUILD_LIBINSTRUMENT) 73 74 ################################################################################ |