79 ifneq ($(COMPILE_TYPE), cross) 80 # This is not a cross compile, regenerate the offset file, so that we 81 # can compare it with the version in the source code repository. 82 83 # Generate the C code for the program that will output the offset file. 84 $(GENSRC_X11WRAPPERS_TMP)/sizer.%.c: $(GENSRC_SIZER_DIR)/xlibtypes.txt $(BUILD_TOOLS_JDK) 85 $(ECHO) "Generating X11 wrapper ($*-bit version)" 86 $(MKDIR) -p $(@D) 87 $(TOOL_WRAPPERGENERATOR) $(@D) $(GENSRC_SIZER_DIR)/xlibtypes.txt "sizer" $* 88 89 # use -m32/-m64 only if the compiler supports it 90 ifeq ($(COMPILER_SUPPORTS_TARGET_BITS_FLAG), true) 91 MEMORY_MODEL_FLAG="$(COMPILER_TARGET_BITS_FLAG)$*" 92 endif 93 94 SIZER_CFLAGS := -I$(JDK_OUTPUTDIR)/include \ 95 -I$(JDK_TOPDIR)/src/java.base/share/native/include \ 96 -I$(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_EXPORT_DIR)/native/include \ 97 -I$(JDK_TOPDIR)/src/java.base/share/native/libjava \ 98 -I$(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_API_DIR)/native/libjava \ 99 -I$(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_API_DIR)/native/common/sun/awt \ 100 -I$(JDK_TOPDIR)/src/java.desktop/share/native/common/sun/awt/debug \ 101 -I$(JDK_TOPDIR)/src/java.desktop/share/native/libawt/sun/awt/image/cvutils \ 102 # 103 104 # Compile the C code into an executable. 105 $(GENSRC_X11WRAPPERS_TMP)/sizer.%.exe: $(GENSRC_X11WRAPPERS_TMP)/sizer.%.c 106 $(MKDIR) -p $(@D) 107 (cd $(@D) && $(CC) $(MEMORY_MODEL_FLAG) -o $@ $< \ 108 $(X_CFLAGS) \ 109 $(X_LIBS) \ 110 $(SIZER_CFLAGS) -lc) 111 112 .PRECIOUS: $(GENSRC_X11WRAPPERS_TMP)/sizer.%.exe $(GENSRC_X11WRAPPERS_TMP)/sizer.%.c 113 114 # Run the executable create the offset file and check that it is identical 115 # to the offset file in the source code repository. 116 $(GENSRC_X11WRAPPERS_TMP)/sizes.%.verification: $(GENSRC_X11WRAPPERS_TMP)/sizer.%.exe 117 $(MKDIR) -p $(@D) 118 $(GENSRC_X11WRAPPERS_TMP)/sizer.$*.exe | $(SORT) > $@.tmp 119 $(ECHO) Verifying $(GENSRC_X11WRAPPERS_TMP)/sizes.$*.verification.tmp to $(GENSRC_X11WRAPPERS_TMP)/sizes.$* 120 $(DIFF) $(GENSRC_X11WRAPPERS_TMP)/sizes.$*.verification.tmp $(GENSRC_X11WRAPPERS_TMP)/sizes.$* 121 mv $@.tmp $@ | 79 ifneq ($(COMPILE_TYPE), cross) 80 # This is not a cross compile, regenerate the offset file, so that we 81 # can compare it with the version in the source code repository. 82 83 # Generate the C code for the program that will output the offset file. 84 $(GENSRC_X11WRAPPERS_TMP)/sizer.%.c: $(GENSRC_SIZER_DIR)/xlibtypes.txt $(BUILD_TOOLS_JDK) 85 $(ECHO) "Generating X11 wrapper ($*-bit version)" 86 $(MKDIR) -p $(@D) 87 $(TOOL_WRAPPERGENERATOR) $(@D) $(GENSRC_SIZER_DIR)/xlibtypes.txt "sizer" $* 88 89 # use -m32/-m64 only if the compiler supports it 90 ifeq ($(COMPILER_SUPPORTS_TARGET_BITS_FLAG), true) 91 MEMORY_MODEL_FLAG="$(COMPILER_TARGET_BITS_FLAG)$*" 92 endif 93 94 SIZER_CFLAGS := -I$(JDK_OUTPUTDIR)/include \ 95 -I$(JDK_TOPDIR)/src/java.base/share/native/include \ 96 -I$(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_EXPORT_DIR)/native/include \ 97 -I$(JDK_TOPDIR)/src/java.base/share/native/libjava \ 98 -I$(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_API_DIR)/native/libjava \ 99 -I$(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_API_DIR)/native/common/awt \ 100 -I$(JDK_TOPDIR)/src/java.desktop/share/native/common/awt/debug \ 101 -I$(JDK_TOPDIR)/src/java.desktop/share/native/libawt/awt/image/cvutils \ 102 # 103 104 # Compile the C code into an executable. 105 $(GENSRC_X11WRAPPERS_TMP)/sizer.%.exe: $(GENSRC_X11WRAPPERS_TMP)/sizer.%.c 106 $(MKDIR) -p $(@D) 107 (cd $(@D) && $(CC) $(MEMORY_MODEL_FLAG) -o $@ $< \ 108 $(X_CFLAGS) \ 109 $(X_LIBS) \ 110 $(SIZER_CFLAGS) -lc) 111 112 .PRECIOUS: $(GENSRC_X11WRAPPERS_TMP)/sizer.%.exe $(GENSRC_X11WRAPPERS_TMP)/sizer.%.c 113 114 # Run the executable create the offset file and check that it is identical 115 # to the offset file in the source code repository. 116 $(GENSRC_X11WRAPPERS_TMP)/sizes.%.verification: $(GENSRC_X11WRAPPERS_TMP)/sizer.%.exe 117 $(MKDIR) -p $(@D) 118 $(GENSRC_X11WRAPPERS_TMP)/sizer.$*.exe | $(SORT) > $@.tmp 119 $(ECHO) Verifying $(GENSRC_X11WRAPPERS_TMP)/sizes.$*.verification.tmp to $(GENSRC_X11WRAPPERS_TMP)/sizes.$* 120 $(DIFF) $(GENSRC_X11WRAPPERS_TMP)/sizes.$*.verification.tmp $(GENSRC_X11WRAPPERS_TMP)/sizes.$* 121 mv $@.tmp $@ |