make/lib/Awt2dLibraries.gmk

Print this page




   9 # by Oracle in the LICENSE file that accompanied this code.
  10 #
  11 # This code is distributed in the hope that it will be useful, but WITHOUT
  12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  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 # Hook to include the corresponding custom file, if present.
  27 $(eval $(call IncludeCustomExtension, jdk, lib/Awt2dLibraries.gmk))
  28 
  29 # Openwin is defined on Solaris.
  30 OPENWIN_LIB := $(OPENWIN_HOME)/lib
  31 
  32 WIN_AWT_LIB := $(JDK_OUTPUTDIR)/objs/libawt/awt.lib
  33 
  34 ##########################################################################################
  35 
  36 BUILD_LIBMLIB_SRC := $(JDK_TOPDIR)/src/share/native/sun/awt/medialib
  37 BUILD_LIBMLIB_CFLAGS := -D__USE_J2D_NAMES -D__MEDIALIB_OLD_NAMES \
  38     -I$(BUILD_LIBMLIB_SRC) \
  39     -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/awt/medialib
  40 
  41 BUILD_LIBMLIB_LDLIBS :=
  42 BUILD_LIBMLIB_IMAGE_MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libmlib_image/mapfile-vers
  43 
  44 BUILD_LIBMLIB_CFLAGS += -DMLIB_NO_LIBSUNMATH
  45 
  46 ifeq ($(OPENJDK_TARGET_CPU_BITS), 64)
  47   BUILD_LIBMLIB_CFLAGS += -DMLIB_OS64BIT
  48 endif
  49 
  50 ifneq ($(OPENJDK_TARGET_OS), windows)
  51   BUILD_LIBMLIB_LDLIBS += $(LIBM) $(LIBDL)


 464 ifeq ($(MILESTONE), internal)
 465   LIBAWT_CFLAGS += -DINTERNAL_BUILD
 466 endif
 467 
 468 LIBAWT_MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libawt/mapfile-vers
 469 ifeq ($(OPENJDK_TARGET_OS), linux)
 470   LIBAWT_MAPFILE :=
 471 endif
 472 
 473 $(eval $(call SetupNativeCompilation,BUILD_LIBAWT, \
 474     LIBRARY := awt, \
 475     OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
 476     SRC := $(LIBAWT_DIRS), \
 477     INCLUDE_FILES := $(LIBAWT_FILES), \
 478     LANG := $(LIBAWT_LANG), \
 479     OPTIMIZATION := LOW, \
 480     CFLAGS := $(CFLAGS_JDKLIB) $(LIBAWT_CFLAGS), \
 481     ASFLAGS := $(LIBAWT_ASFLAGS), \
 482     MAPFILE := $(LIBAWT_MAPFILE), \
 483     LDFLAGS := $(LDFLAGS_JDKLIB) $(call SET_SHARED_LIBRARY_ORIGIN), \
 484     LDFLAGS_solaris := -R/usr/dt/lib$(OPENJDK_TARGET_CPU_ISADIR) -R$(OPENWIN_LIB)$(OPENJDK_TARGET_CPU_ISADIR), \
 485     LDFLAGS_SUFFIX_linux := -ljvm $(LIBM) $(LIBDL) -ljava, \
 486     LDFLAGS_SUFFIX_solaris := -ljvm $(LIBM) $(LIBDL) -ljava -lc, \
 487     LDFLAGS_SUFFIX_aix :=-ljvm $(LIBM) $(LIBDL) -ljava -lm,\
 488     LDFLAGS_SUFFIX_macosx := -lmlib_image -ljvm $(LIBM) \
 489         -framework Cocoa \
 490         -framework OpenGL \
 491         -F/System/Library/Frameworks/JavaVM.framework/Frameworks \
 492         -framework JavaNativeFoundation \
 493         -framework JavaRuntimeSupport \
 494         -framework ApplicationServices \
 495         -framework AudioToolbox \
 496         -ljava, \
 497     LDFLAGS_SUFFIX_windows := kernel32.lib user32.lib gdi32.lib winspool.lib \
 498         imm32.lib ole32.lib uuid.lib shell32.lib \
 499         comdlg32.lib winmm.lib comctl32.lib shlwapi.lib \
 500         delayimp.lib jvm.lib $(WIN_JAVA_LIB) advapi32.lib \
 501         -DELAYLOAD:user32.dll -DELAYLOAD:gdi32.dll \
 502         -DELAYLOAD:shell32.dll -DELAYLOAD:winmm.dll \
 503         -DELAYLOAD:winspool.drv -DELAYLOAD:imm32.dll \
 504         -DELAYLOAD:ole32.dll -DELAYLOAD:comdlg32.dll \


 621         XRBackendNative.c
 622 
 623     LIBAWT_XAWT_LDFLAGS_SUFFIX := $(LIBM) -lawt -lXext -lX11 -lXrender $(LIBDL) -lXtst -lXi -ljava -ljvm -lc
 624 
 625     ifeq ($(OPENJDK_TARGET_OS), linux)
 626       # To match old build, add this to LDFLAGS instead of suffix.
 627       LIBAWT_XAWT_LDFLAGS += -lpthread
 628     endif
 629 
 630     $(eval $(call SetupNativeCompilation,BUILD_LIBAWT_XAWT, \
 631         LIBRARY := awt_xawt, \
 632         OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
 633         SRC := $(LIBAWT_XAWT_DIRS), \
 634         INCLUDE_FILES := $(LIBAWT_XAWT_FILES), \
 635         LANG := C, \
 636         OPTIMIZATION := LOW, \
 637         CFLAGS := $(CFLAGS_JDKLIB) $(LIBAWT_XAWT_CFLAGS) \
 638             $(X_CFLAGS), \
 639         MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libawt_xawt/mapfile-vers, \
 640         LDFLAGS := $(LDFLAGS_JDKLIB) \
 641             $(X_LIBS) $(LIBAWT_XAWT_LDFLAGS), \
 642         LDFLAGS_linux := $(call SET_SHARED_LIBRARY_ORIGIN) \
 643             $(call SET_SHARED_LIBRARY_ORIGIN,/..), \
 644         LDFLAGS_solaris := -L$(OPENWIN_HOME)/sfw/lib$(OPENJDK_TARGET_CPU_ISADIR) \
 645             -L$(OPENWIN_LIB)$(OPENJDK_TARGET_CPU_ISADIR) \
 646             -R$(OPENWIN_HOME)/sfw/lib$(OPENJDK_TARGET_CPU_ISADIR) \
 647             -R$(OPENWIN_LIB)$(OPENJDK_TARGET_CPU_ISADIR) \
 648             -R/usr/dt/lib$(OPENJDK_TARGET_CPU_ISADIR) \
 649             $(call SET_SHARED_LIBRARY_ORIGIN) \
 650             $(call SET_SHARED_LIBRARY_ORIGIN,/..), \
 651         LDFLAGS_SUFFIX := $(LIBAWT_XAWT_LDFLAGS_SUFFIX), \
 652         VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
 653         RC_FLAGS := $(RC_FLAGS) \
 654             -D "JDK_FNAME=xawt.dll" \
 655             -D "JDK_INTERNAL_NAME=xawt" \
 656             -D "JDK_FTYPE=0x2L", \
 657         OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libawt_xawt, \
 658         DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
 659 
 660     $(BUILD_LIBAWT_XAWT): $(BUILD_LIBJAVA)
 661 
 662     $(BUILD_LIBAWT_XAWT): $(BUILD_LIBAWT)
 663 
 664     BUILD_LIBRARIES += $(BUILD_LIBAWT_XAWT)
 665 
 666   endif
 667 endif
 668 


 959     else
 960       JAWT_LIBS += -lawt_headless
 961       HEADLESS_CFLAG += -DHEADLESS
 962     endif
 963   endif
 964 
 965   $(eval $(call SetupNativeCompilation,BUILD_LIBJAWT, \
 966       LIBRARY := jawt, \
 967       OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
 968       SRC := $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/awt \
 969           $(JDK_TOPDIR)/src/macosx/native/sun/awt, \
 970       INCLUDE_FILES := $(JAWT_FILES), \
 971       LANG := C, \
 972       OPTIMIZATION := LOW, \
 973       CFLAGS := $(CFLAGS_JDKLIB), \
 974       CFLAGS_linux := $(HEADLESS_CFLAG), \
 975       CFLAGS_macosx := -I$(JDK_TOPDIR)/src/solaris/native/sun/awt, \
 976       MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libjawt/mapfile-vers, \
 977       LDFLAGS := $(LDFLAGS_JDKLIB) \
 978           $(call SET_SHARED_LIBRARY_ORIGIN), \
 979       LDFLAGS_solaris := -L$(OPENWIN_HOME)/sfw/lib$(OPENJDK_TARGET_CPU_ISADIR) -L$(OPENWIN_LIB)$(OPENJDK_TARGET_CPU_ISADIR), \
 980       LDFLAGS_SUFFIX_linux := $(JAWT_LIBS) $(LDFLAGS_JDKLIB_SUFFIX), \
 981       LDFLAGS_SUFFIX_aix := $(JAWT_LIBS) $(LDFLAGS_JDKLIB_SUFFIX),\
 982       LDFLAGS_SUFFIX_solaris := $(JAWT_LIBS) $(LDFLAGS_JDKLIB_SUFFIX) -lXrender, \
 983       LDFLAGS_SUFFIX_macosx := -Xlinker -rpath -Xlinker @loader_path $(JAWT_LIBS) \
 984           -framework Cocoa $(LDFLAGS_JDKLIB_SUFFIX), \
 985       OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjawt, \
 986       DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
 987 
 988   ifndef BUILD_HEADLESS_ONLY
 989     $(BUILD_LIBJAWT): $(BUILD_LIBAWT_XAWT)
 990   else
 991     $(BUILD_LIBJAWT): $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)awt_headless$(SHARED_LIBRARY_SUFFIX)
 992   endif
 993 
 994   ifeq ($(OPENJDK_TARGET_OS), macosx)
 995     $(BUILD_LIBJAWT): $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)awt_lwawt$(SHARED_LIBRARY_SUFFIX)
 996   endif
 997 
 998 endif # OPENJDK_TARGET_OS
 999 


1057 ifndef OPENJDK
1058   ifeq ($(OPENJDK_TARGET_OS), solaris)
1059     ifneq ($(OPENJDK_TARGET_CPU), x86_64)
1060 
1061       ifeq ($(shell if test "$(OS_VERSION_MAJOR)" -eq 5 -a "$(OS_VERSION_MINOR)" -le 10; then $(ECHO) ok; fi), ok)
1062 
1063         SUNWJDGA_MAPFILE :=
1064         ifeq ($(OPENJDK_TARGET_CPU_ARCH), sparc)
1065           SUNWJDGA_MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libjdga/mapfile-vers
1066         endif
1067 
1068         $(eval $(call SetupNativeCompilation,BUILD_LIBSUNWJDGA, \
1069             LIBRARY := sunwjdga, \
1070             OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
1071             SRC := $(JDK_TOPDIR)/src/solaris/native/sun/jdga, \
1072             LANG := C, \
1073             OPTIMIZATION := LOW, \
1074             CFLAGS := $(CFLAGS_JDKLIB) \
1075                 -I$(JDK_TOPDIR)/src/share/javavm/export \
1076                 -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/javavm/export \
1077                 -I$(OPENWIN_HOME)/include, \
1078             MAPFILE := $(SUNWJDGA_MAPFILE), \
1079             LDFLAGS := $(LDFLAGS_JDKLIB) \
1080                 $(call SET_SHARED_LIBRARY_ORIGIN), \
1081             LDFLAGS_SUFFIX := -L$(OPENWIN_LIB)$(OPENJDK_TARGET_CPU_ISADIR) -R$(OPENWIN_LIB)$(OPENJDK_TARGET_CPU_ISADIR) -ldga -lX11 $(LIBDL) -lc, \
1082             OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libsunwjdga, \
1083             DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
1084 
1085         BUILD_LIBRARIES += $(BUILD_LIBSUNWJDGA)
1086 
1087       endif
1088     endif
1089   endif
1090 endif
1091 
1092 ##########################################################################################
1093 
1094 ifeq ($(BUILD_HEADLESS), true)
1095   # Mac and Windows only use the native AWT lib, do not build libawt_headless
1096   ifeq ($(findstring $(OPENJDK_TARGET_OS), windows macosx),)
1097 
1098     LIBAWT_HEADLESS_DIRS := $(JDK_TOPDIR)/src/share/native/sun/font \
1099         $(JDK_TOPDIR)/src/share/native/sun/java2d/opengl \
1100         $(JDK_TOPDIR)/src/solaris/native/sun/font \
1101         $(JDK_TOPDIR)/src/solaris/native/sun/awt \


1156 
1157     LIBAWT_HEADLESS_REORDER :=
1158     ifeq ($(OPENJDK_TARGET_OS), solaris)
1159       ifneq ($(OPENJDK_TARGET_CPU), x86_64)
1160         LIBAWT_HEADLESS_REORDER := $(JDK_TOPDIR)/make/mapfiles/libawt_headless/reorder-$(OPENJDK_TARGET_CPU)
1161       endif
1162     endif
1163 
1164     $(eval $(call SetupNativeCompilation,BUILD_LIBAWT_HEADLESS, \
1165         LIBRARY := awt_headless, \
1166         OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
1167         SRC := $(LIBAWT_HEADLESS_DIRS), \
1168         INCLUDE_FILES := $(LIBAWT_HEADLESS_FILES), \
1169         LANG := C, \
1170         OPTIMIZATION := LOW, \
1171         CFLAGS := $(CFLAGS_JDKLIB) $(LIBAWT_HEADLESS_CFLAGS), \
1172         MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libawt_headless/mapfile-vers, \
1173         LDFLAGS := $(LDFLAGS_JDKLIB) \
1174             $(call SET_SHARED_LIBRARY_ORIGIN), \
1175         LDFLAGS_linux := $(call SET_SHARED_LIBRARY_ORIGIN,/..), \
1176         LDFLAGS_solaris := $(call SET_SHARED_LIBRARY_ORIGIN,/..) \
1177             -R/usr/dt/lib$(OPENJDK_TARGET_CPU_ISADIR) \
1178             -R$(OPENWIN_LIB)$(OPENJDK_TARGET_CPU_ISADIR), \
1179         LDFLAGS_macosx := $(call SET_SHARED_LIBRARY_ORIGIN)., \
1180         REORDER := $(LIBAWT_HEADLESS_REORDER), \
1181         LDFLAGS_SUFFIX_linux := -ljvm -lawt -lm $(LIBDL) -ljava, \
1182         LDFLAGS_SUFFIX_aix := -ljvm -lawt -ljava,\
1183         LDFLAGS_SUFFIX_solaris := $(LIBDL) -ljvm -lawt -lm -ljava $(LIBCXX) -lc, \
1184         OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libawt_headless, \
1185         DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
1186 
1187     $(BUILD_LIBAWT_HEADLESS): $(BUILD_LIBAWT)
1188 
1189     BUILD_LIBRARIES += $(BUILD_LIBAWT_HEADLESS)
1190 
1191   endif
1192 endif
1193 
1194 ##########################################################################################
1195 
1196 ifndef BUILD_HEADLESS_ONLY
1197   LIBSPLASHSCREEN_DIRS := \
1198     $(JDK_TOPDIR)/src/share/native/sun/awt/image/jpeg \


1219   LIBSPLASHSCREEN_CFLAGS := -DSPLASHSCREEN -DPNG_NO_MMX_CODE \
1220       $(foreach dir, $(LIBSPLASHSCREEN_DIRS), -I$(dir))
1221 
1222   ifeq ($(OPENJDK_TARGET_OS), macosx)
1223     LIBSPLASHSCREEN_CFLAGS := -I$(JDK_TOPDIR)/src/macosx/native/sun/awt/splashscreen \
1224         $(LIBSPLASHSCREEN_CFLAGS) \
1225         -F/System/Library/Frameworks/JavaVM.framework/Frameworks
1226     LIBSPLASHSCREEN_CFLAGS += -DWITH_MACOSX
1227     LIBSPLASHSCREEN_CFLAGS += -I$(JDK_TOPDIR)/src/macosx/native/sun/osxapp
1228 
1229     LIBSPLASHSCREEN_java_awt_SplashScreen.c_CFLAGS := -x objective-c -O0
1230     LIBSPLASHSCREEN_splashscreen_gfx_impl.c_CFLAGS := -x objective-c -O0
1231     LIBSPLASHSCREEN_splashscreen_gif.c_CFLAGS := -x objective-c -O0
1232     LIBSPLASHSCREEN_splashscreen_impl.c_CFLAGS := -x objective-c -O0
1233     LIBSPLASHSCREEN_splashscreen_jpeg.c_CFLAGS := -x objective-c -O0
1234     LIBSPLASHSCREEN_splashscreen_png.c_CFLAGS := -x objective-c -O0
1235     LIBSPLASHSCREEN_splashscreen_sys.m_CFLAGS := -O0
1236 
1237   else ifeq ($(OPENJDK_TARGET_OS), windows)
1238     LIBSPLASHSCREEN_CFLAGS += -DWITH_WIN32
1239   else ifeq ($(OPENJDK_TARGET_OS), solaris)
1240     LIBSPLASHSCREEN_CFLAGS += -DWITH_X11 -I$(OPENWIN_HOME)/include -I$(OPENWIN_HOME)/include/X11/extensions
1241   else
1242     LIBSPLASHSCREEN_CFLAGS += -DWITH_X11 $(X_CFLAGS)
1243   endif
1244 
1245   LIBSPLASHSCREEN_LDFLAGS_SUFFIX :=
1246 
1247   ifneq ($(USE_EXTERNAL_LIBZ), true)
1248     LIBSPLASHSCREEN_DIRS += $(JDK_TOPDIR)/src/share/native/java/util/zip/zlib-1.2.5
1249     LIBSPLASHSCREEN_CFLAGS += $(ZLIB_CPPFLAGS)
1250   endif
1251 
1252   ifeq ($(OPENJDK_TARGET_OS), macosx)
1253     LIBSPLASHSCREEN_LDFLAGS_SUFFIX += $(LIBM) -lpthread -liconv -losxapp \
1254         -framework ApplicationServices \
1255         -framework Foundation \
1256         -framework Cocoa \
1257         -F/System/Library/Frameworks/JavaVM.framework/Frameworks \
1258         -framework JavaNativeFoundation
1259   else ifeq ($(OPENJDK_TARGET_OS), windows)
1260     LIBSPLASHSCREEN_LDFLAGS_SUFFIX += kernel32.lib user32.lib gdi32.lib delayimp.lib -DELAYLOAD:user32.dll
1261   else ifeq ($(OPENJDK_TARGET_OS), solaris)
1262     # Solaris still uses OPENWIN_LIB ..
1263     LIBSPLASHSCREEN_LDFLAGS_SUFFIX += -L$(OPENWIN_LIB)$(OPENJDK_TARGET_CPU_ISADIR) -lX11 -lXext $(LIBM) -lpthread
1264   else  # .. all other Unixes can use X_LIBS
1265     LIBSPLASHSCREEN_LDFLAGS_SUFFIX += $(X_LIBS) -lX11 -lXext $(LIBM) -lpthread
1266   endif
1267 
1268   $(eval $(call SetupNativeCompilation,LIBSPLASHSCREEN, \
1269       LIBRARY := splashscreen, \
1270       OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
1271       SRC := $(LIBSPLASHSCREEN_DIRS), \
1272       EXCLUDE_FILES := imageioJPEG.c jpegdecoder.c pngtest.c, \
1273       LANG := C, \
1274       OPTIMIZATION := LOW, \
1275       CFLAGS := $(LIBSPLASHSCREEN_CFLAGS) $(CFLAGS_JDKLIB) \
1276                 $(GIFLIB_CFLAGS) $(PNG_CFLAGS), \
1277       MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libsplashscreen/mapfile-vers, \
1278       LDFLAGS := $(LDFLAGS_JDKLIB) \
1279           $(call SET_SHARED_LIBRARY_ORIGIN), \
1280       LDFLAGS_SUFFIX := $(LIBSPLASHSCREEN_LDFLAGS_SUFFIX) $(LIBZ) \
1281                         $(GIFLIB_LDFLAGS) $(PNG_LIBS), \
1282       LDFLAGS_SUFFIX_solaris := -lc, \
1283       VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
1284       RC_FLAGS := $(RC_FLAGS) \




   9 # by Oracle in the LICENSE file that accompanied this code.
  10 #
  11 # This code is distributed in the hope that it will be useful, but WITHOUT
  12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  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 # Hook to include the corresponding custom file, if present.
  27 $(eval $(call IncludeCustomExtension, jdk, lib/Awt2dLibraries.gmk))
  28 



  29 WIN_AWT_LIB := $(JDK_OUTPUTDIR)/objs/libawt/awt.lib
  30 
  31 ##########################################################################################
  32 
  33 BUILD_LIBMLIB_SRC := $(JDK_TOPDIR)/src/share/native/sun/awt/medialib
  34 BUILD_LIBMLIB_CFLAGS := -D__USE_J2D_NAMES -D__MEDIALIB_OLD_NAMES \
  35     -I$(BUILD_LIBMLIB_SRC) \
  36     -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/awt/medialib
  37 
  38 BUILD_LIBMLIB_LDLIBS :=
  39 BUILD_LIBMLIB_IMAGE_MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libmlib_image/mapfile-vers
  40 
  41 BUILD_LIBMLIB_CFLAGS += -DMLIB_NO_LIBSUNMATH
  42 
  43 ifeq ($(OPENJDK_TARGET_CPU_BITS), 64)
  44   BUILD_LIBMLIB_CFLAGS += -DMLIB_OS64BIT
  45 endif
  46 
  47 ifneq ($(OPENJDK_TARGET_OS), windows)
  48   BUILD_LIBMLIB_LDLIBS += $(LIBM) $(LIBDL)


 461 ifeq ($(MILESTONE), internal)
 462   LIBAWT_CFLAGS += -DINTERNAL_BUILD
 463 endif
 464 
 465 LIBAWT_MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libawt/mapfile-vers
 466 ifeq ($(OPENJDK_TARGET_OS), linux)
 467   LIBAWT_MAPFILE :=
 468 endif
 469 
 470 $(eval $(call SetupNativeCompilation,BUILD_LIBAWT, \
 471     LIBRARY := awt, \
 472     OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
 473     SRC := $(LIBAWT_DIRS), \
 474     INCLUDE_FILES := $(LIBAWT_FILES), \
 475     LANG := $(LIBAWT_LANG), \
 476     OPTIMIZATION := LOW, \
 477     CFLAGS := $(CFLAGS_JDKLIB) $(LIBAWT_CFLAGS), \
 478     ASFLAGS := $(LIBAWT_ASFLAGS), \
 479     MAPFILE := $(LIBAWT_MAPFILE), \
 480     LDFLAGS := $(LDFLAGS_JDKLIB) $(call SET_SHARED_LIBRARY_ORIGIN), \

 481     LDFLAGS_SUFFIX_linux := -ljvm $(LIBM) $(LIBDL) -ljava, \
 482     LDFLAGS_SUFFIX_solaris := -ljvm $(LIBM) $(LIBDL) -ljava -lc, \
 483     LDFLAGS_SUFFIX_aix :=-ljvm $(LIBM) $(LIBDL) -ljava -lm,\
 484     LDFLAGS_SUFFIX_macosx := -lmlib_image -ljvm $(LIBM) \
 485         -framework Cocoa \
 486         -framework OpenGL \
 487         -F/System/Library/Frameworks/JavaVM.framework/Frameworks \
 488         -framework JavaNativeFoundation \
 489         -framework JavaRuntimeSupport \
 490         -framework ApplicationServices \
 491         -framework AudioToolbox \
 492         -ljava, \
 493     LDFLAGS_SUFFIX_windows := kernel32.lib user32.lib gdi32.lib winspool.lib \
 494         imm32.lib ole32.lib uuid.lib shell32.lib \
 495         comdlg32.lib winmm.lib comctl32.lib shlwapi.lib \
 496         delayimp.lib jvm.lib $(WIN_JAVA_LIB) advapi32.lib \
 497         -DELAYLOAD:user32.dll -DELAYLOAD:gdi32.dll \
 498         -DELAYLOAD:shell32.dll -DELAYLOAD:winmm.dll \
 499         -DELAYLOAD:winspool.drv -DELAYLOAD:imm32.dll \
 500         -DELAYLOAD:ole32.dll -DELAYLOAD:comdlg32.dll \


 617         XRBackendNative.c
 618 
 619     LIBAWT_XAWT_LDFLAGS_SUFFIX := $(LIBM) -lawt -lXext -lX11 -lXrender $(LIBDL) -lXtst -lXi -ljava -ljvm -lc
 620 
 621     ifeq ($(OPENJDK_TARGET_OS), linux)
 622       # To match old build, add this to LDFLAGS instead of suffix.
 623       LIBAWT_XAWT_LDFLAGS += -lpthread
 624     endif
 625 
 626     $(eval $(call SetupNativeCompilation,BUILD_LIBAWT_XAWT, \
 627         LIBRARY := awt_xawt, \
 628         OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
 629         SRC := $(LIBAWT_XAWT_DIRS), \
 630         INCLUDE_FILES := $(LIBAWT_XAWT_FILES), \
 631         LANG := C, \
 632         OPTIMIZATION := LOW, \
 633         CFLAGS := $(CFLAGS_JDKLIB) $(LIBAWT_XAWT_CFLAGS) \
 634             $(X_CFLAGS), \
 635         MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libawt_xawt/mapfile-vers, \
 636         LDFLAGS := $(LDFLAGS_JDKLIB) \
 637             $(X_LIBS) $(LIBAWT_XAWT_LDFLAGS) \







 638             $(call SET_SHARED_LIBRARY_ORIGIN) \
 639             $(call SET_SHARED_LIBRARY_ORIGIN,/..), \
 640         LDFLAGS_SUFFIX := $(LIBAWT_XAWT_LDFLAGS_SUFFIX), \
 641         VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
 642         RC_FLAGS := $(RC_FLAGS) \
 643             -D "JDK_FNAME=xawt.dll" \
 644             -D "JDK_INTERNAL_NAME=xawt" \
 645             -D "JDK_FTYPE=0x2L", \
 646         OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libawt_xawt, \
 647         DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
 648 
 649     $(BUILD_LIBAWT_XAWT): $(BUILD_LIBJAVA)
 650 
 651     $(BUILD_LIBAWT_XAWT): $(BUILD_LIBAWT)
 652 
 653     BUILD_LIBRARIES += $(BUILD_LIBAWT_XAWT)
 654 
 655   endif
 656 endif
 657 


 948     else
 949       JAWT_LIBS += -lawt_headless
 950       HEADLESS_CFLAG += -DHEADLESS
 951     endif
 952   endif
 953 
 954   $(eval $(call SetupNativeCompilation,BUILD_LIBJAWT, \
 955       LIBRARY := jawt, \
 956       OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
 957       SRC := $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/awt \
 958           $(JDK_TOPDIR)/src/macosx/native/sun/awt, \
 959       INCLUDE_FILES := $(JAWT_FILES), \
 960       LANG := C, \
 961       OPTIMIZATION := LOW, \
 962       CFLAGS := $(CFLAGS_JDKLIB), \
 963       CFLAGS_linux := $(HEADLESS_CFLAG), \
 964       CFLAGS_macosx := -I$(JDK_TOPDIR)/src/solaris/native/sun/awt, \
 965       MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libjawt/mapfile-vers, \
 966       LDFLAGS := $(LDFLAGS_JDKLIB) \
 967           $(call SET_SHARED_LIBRARY_ORIGIN), \
 968       LDFLAGS_solaris := $(X_LIBS), \
 969       LDFLAGS_SUFFIX_linux := $(JAWT_LIBS) $(LDFLAGS_JDKLIB_SUFFIX), \
 970       LDFLAGS_SUFFIX_aix := $(JAWT_LIBS) $(LDFLAGS_JDKLIB_SUFFIX),\
 971       LDFLAGS_SUFFIX_solaris := $(JAWT_LIBS) $(LDFLAGS_JDKLIB_SUFFIX) -lXrender, \
 972       LDFLAGS_SUFFIX_macosx := -Xlinker -rpath -Xlinker @loader_path $(JAWT_LIBS) \
 973           -framework Cocoa $(LDFLAGS_JDKLIB_SUFFIX), \
 974       OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjawt, \
 975       DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
 976 
 977   ifndef BUILD_HEADLESS_ONLY
 978     $(BUILD_LIBJAWT): $(BUILD_LIBAWT_XAWT)
 979   else
 980     $(BUILD_LIBJAWT): $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)awt_headless$(SHARED_LIBRARY_SUFFIX)
 981   endif
 982 
 983   ifeq ($(OPENJDK_TARGET_OS), macosx)
 984     $(BUILD_LIBJAWT): $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)awt_lwawt$(SHARED_LIBRARY_SUFFIX)
 985   endif
 986 
 987 endif # OPENJDK_TARGET_OS
 988 


1046 ifndef OPENJDK
1047   ifeq ($(OPENJDK_TARGET_OS), solaris)
1048     ifneq ($(OPENJDK_TARGET_CPU), x86_64)
1049 
1050       ifeq ($(shell if test "$(OS_VERSION_MAJOR)" -eq 5 -a "$(OS_VERSION_MINOR)" -le 10; then $(ECHO) ok; fi), ok)
1051 
1052         SUNWJDGA_MAPFILE :=
1053         ifeq ($(OPENJDK_TARGET_CPU_ARCH), sparc)
1054           SUNWJDGA_MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libjdga/mapfile-vers
1055         endif
1056 
1057         $(eval $(call SetupNativeCompilation,BUILD_LIBSUNWJDGA, \
1058             LIBRARY := sunwjdga, \
1059             OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
1060             SRC := $(JDK_TOPDIR)/src/solaris/native/sun/jdga, \
1061             LANG := C, \
1062             OPTIMIZATION := LOW, \
1063             CFLAGS := $(CFLAGS_JDKLIB) \
1064                 -I$(JDK_TOPDIR)/src/share/javavm/export \
1065                 -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/javavm/export \
1066                 $(X_CFLAGS), \
1067             MAPFILE := $(SUNWJDGA_MAPFILE), \
1068             LDFLAGS := $(LDFLAGS_JDKLIB) \
1069                 $(call SET_SHARED_LIBRARY_ORIGIN), \
1070             LDFLAGS_SUFFIX := $(X_LIBS) -ldga -lX11 $(LIBDL) -lc, \
1071             OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libsunwjdga, \
1072             DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
1073 
1074         BUILD_LIBRARIES += $(BUILD_LIBSUNWJDGA)
1075 
1076       endif
1077     endif
1078   endif
1079 endif
1080 
1081 ##########################################################################################
1082 
1083 ifeq ($(BUILD_HEADLESS), true)
1084   # Mac and Windows only use the native AWT lib, do not build libawt_headless
1085   ifeq ($(findstring $(OPENJDK_TARGET_OS), windows macosx),)
1086 
1087     LIBAWT_HEADLESS_DIRS := $(JDK_TOPDIR)/src/share/native/sun/font \
1088         $(JDK_TOPDIR)/src/share/native/sun/java2d/opengl \
1089         $(JDK_TOPDIR)/src/solaris/native/sun/font \
1090         $(JDK_TOPDIR)/src/solaris/native/sun/awt \


1145 
1146     LIBAWT_HEADLESS_REORDER :=
1147     ifeq ($(OPENJDK_TARGET_OS), solaris)
1148       ifneq ($(OPENJDK_TARGET_CPU), x86_64)
1149         LIBAWT_HEADLESS_REORDER := $(JDK_TOPDIR)/make/mapfiles/libawt_headless/reorder-$(OPENJDK_TARGET_CPU)
1150       endif
1151     endif
1152 
1153     $(eval $(call SetupNativeCompilation,BUILD_LIBAWT_HEADLESS, \
1154         LIBRARY := awt_headless, \
1155         OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
1156         SRC := $(LIBAWT_HEADLESS_DIRS), \
1157         INCLUDE_FILES := $(LIBAWT_HEADLESS_FILES), \
1158         LANG := C, \
1159         OPTIMIZATION := LOW, \
1160         CFLAGS := $(CFLAGS_JDKLIB) $(LIBAWT_HEADLESS_CFLAGS), \
1161         MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libawt_headless/mapfile-vers, \
1162         LDFLAGS := $(LDFLAGS_JDKLIB) \
1163             $(call SET_SHARED_LIBRARY_ORIGIN), \
1164         LDFLAGS_linux := $(call SET_SHARED_LIBRARY_ORIGIN,/..), \
1165         LDFLAGS_solaris := $(call SET_SHARED_LIBRARY_ORIGIN,/..), \


1166         LDFLAGS_macosx := $(call SET_SHARED_LIBRARY_ORIGIN)., \
1167         REORDER := $(LIBAWT_HEADLESS_REORDER), \
1168         LDFLAGS_SUFFIX_linux := -ljvm -lawt -lm $(LIBDL) -ljava, \
1169         LDFLAGS_SUFFIX_aix := -ljvm -lawt -ljava,\
1170         LDFLAGS_SUFFIX_solaris := $(LIBDL) -ljvm -lawt -lm -ljava $(LIBCXX) -lc, \
1171         OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libawt_headless, \
1172         DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
1173 
1174     $(BUILD_LIBAWT_HEADLESS): $(BUILD_LIBAWT)
1175 
1176     BUILD_LIBRARIES += $(BUILD_LIBAWT_HEADLESS)
1177 
1178   endif
1179 endif
1180 
1181 ##########################################################################################
1182 
1183 ifndef BUILD_HEADLESS_ONLY
1184   LIBSPLASHSCREEN_DIRS := \
1185     $(JDK_TOPDIR)/src/share/native/sun/awt/image/jpeg \


1206   LIBSPLASHSCREEN_CFLAGS := -DSPLASHSCREEN -DPNG_NO_MMX_CODE \
1207       $(foreach dir, $(LIBSPLASHSCREEN_DIRS), -I$(dir))
1208 
1209   ifeq ($(OPENJDK_TARGET_OS), macosx)
1210     LIBSPLASHSCREEN_CFLAGS := -I$(JDK_TOPDIR)/src/macosx/native/sun/awt/splashscreen \
1211         $(LIBSPLASHSCREEN_CFLAGS) \
1212         -F/System/Library/Frameworks/JavaVM.framework/Frameworks
1213     LIBSPLASHSCREEN_CFLAGS += -DWITH_MACOSX
1214     LIBSPLASHSCREEN_CFLAGS += -I$(JDK_TOPDIR)/src/macosx/native/sun/osxapp
1215 
1216     LIBSPLASHSCREEN_java_awt_SplashScreen.c_CFLAGS := -x objective-c -O0
1217     LIBSPLASHSCREEN_splashscreen_gfx_impl.c_CFLAGS := -x objective-c -O0
1218     LIBSPLASHSCREEN_splashscreen_gif.c_CFLAGS := -x objective-c -O0
1219     LIBSPLASHSCREEN_splashscreen_impl.c_CFLAGS := -x objective-c -O0
1220     LIBSPLASHSCREEN_splashscreen_jpeg.c_CFLAGS := -x objective-c -O0
1221     LIBSPLASHSCREEN_splashscreen_png.c_CFLAGS := -x objective-c -O0
1222     LIBSPLASHSCREEN_splashscreen_sys.m_CFLAGS := -O0
1223 
1224   else ifeq ($(OPENJDK_TARGET_OS), windows)
1225     LIBSPLASHSCREEN_CFLAGS += -DWITH_WIN32


1226   else
1227     LIBSPLASHSCREEN_CFLAGS += -DWITH_X11 $(X_CFLAGS)
1228   endif
1229 
1230   LIBSPLASHSCREEN_LDFLAGS_SUFFIX :=
1231 
1232   ifneq ($(USE_EXTERNAL_LIBZ), true)
1233     LIBSPLASHSCREEN_DIRS += $(JDK_TOPDIR)/src/share/native/java/util/zip/zlib-1.2.5
1234     LIBSPLASHSCREEN_CFLAGS += $(ZLIB_CPPFLAGS)
1235   endif
1236 
1237   ifeq ($(OPENJDK_TARGET_OS), macosx)
1238     LIBSPLASHSCREEN_LDFLAGS_SUFFIX += $(LIBM) -lpthread -liconv -losxapp \
1239         -framework ApplicationServices \
1240         -framework Foundation \
1241         -framework Cocoa \
1242         -F/System/Library/Frameworks/JavaVM.framework/Frameworks \
1243         -framework JavaNativeFoundation
1244   else ifeq ($(OPENJDK_TARGET_OS), windows)
1245     LIBSPLASHSCREEN_LDFLAGS_SUFFIX += kernel32.lib user32.lib gdi32.lib delayimp.lib -DELAYLOAD:user32.dll
1246   else



1247     LIBSPLASHSCREEN_LDFLAGS_SUFFIX += $(X_LIBS) -lX11 -lXext $(LIBM) -lpthread
1248   endif
1249 
1250   $(eval $(call SetupNativeCompilation,LIBSPLASHSCREEN, \
1251       LIBRARY := splashscreen, \
1252       OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
1253       SRC := $(LIBSPLASHSCREEN_DIRS), \
1254       EXCLUDE_FILES := imageioJPEG.c jpegdecoder.c pngtest.c, \
1255       LANG := C, \
1256       OPTIMIZATION := LOW, \
1257       CFLAGS := $(LIBSPLASHSCREEN_CFLAGS) $(CFLAGS_JDKLIB) \
1258                 $(GIFLIB_CFLAGS) $(PNG_CFLAGS), \
1259       MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libsplashscreen/mapfile-vers, \
1260       LDFLAGS := $(LDFLAGS_JDKLIB) \
1261           $(call SET_SHARED_LIBRARY_ORIGIN), \
1262       LDFLAGS_SUFFIX := $(LIBSPLASHSCREEN_LDFLAGS_SUFFIX) $(LIBZ) \
1263                         $(GIFLIB_LDFLAGS) $(PNG_LIBS), \
1264       LDFLAGS_SUFFIX_solaris := -lc, \
1265       VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
1266       RC_FLAGS := $(RC_FLAGS) \