< prev index next >

make/lib/Awt2dLibraries.gmk

Print this page




 387     $(BUILD_LIBAWT_XAWT): $(call FindLib, java.base, java)
 388 
 389     $(BUILD_LIBAWT_XAWT): $(BUILD_LIBAWT)
 390 
 391     TARGETS += $(BUILD_LIBAWT_XAWT)
 392 
 393   endif
 394 endif
 395 
 396 ################################################################################
 397 
 398 LIBLCMS_SRC := $(JDK_TOPDIR)/src/java.desktop/share/native/liblcms
 399 LIBLCMS_CPPFLAGS += -I$(SUPPORT_OUTPUTDIR)/headers/java.desktop \
 400     -I$(JDK_TOPDIR)/src/java.desktop/share/native/libawt/java2d \
 401     -I$(JDK_TOPDIR)/src/java.desktop/share/native/common/awt/debug \
 402     $(LIBJAVA_HEADER_FLAGS) \
 403     #
 404 # The fast floor code loses precision.
 405 LCMS_CFLAGS=-DCMS_DONT_USE_FAST_FLOOR
 406 





 407 ifeq ($(USE_EXTERNAL_LCMS), true)
 408   # If we're using an external library, we'll just need the wrapper part.
 409   # By including it explicitely, all other files will be excluded.
 410   BUILD_LIBLCMS_INCLUDE_FILES := LCMS.c
 411 else
 412   BUILD_LIBLCMS_INCLUDE_FILES :=
 413   # If we're using the bundled library, we'll need to include it in the
 414   # include path explicitly. Otherwise the system headers will be used.
 415   LIBLCMS_CPPFLAGS += $(addprefix -I, $(LIBLCMS_SRC))
 416 endif
 417 
 418 $(eval $(call SetupNativeCompilation,BUILD_LIBLCMS, \
 419     LIBRARY := lcms, \
 420     OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
 421     SRC := $(LIBLCMS_SRC), \
 422     INCLUDE_FILES := $(BUILD_LIBLCMS_INCLUDE_FILES), \
 423     OPTIMIZATION := HIGHEST, \
 424     CFLAGS := $(filter-out -xc99=%none, $(CFLAGS_JDKLIB)) \
 425         $(LIBLCMS_CPPFLAGS) \
 426         $(LCMS_CFLAGS), \


 469     BUILD_LIBJAVAJPEG_REORDER := $(JDK_TOPDIR)/make/mapfiles/libjpeg/reorder-$(OPENJDK_TARGET_CPU)
 470   endif
 471 endif
 472 
 473 
 474 # Suppress gcc warnings like "variable might be clobbered by 'longjmp'
 475 # or 'vfork'": this warning indicates that some variable is placed to
 476 # a register by optimized compiler and it's value might be lost on longjmp().
 477 # Recommended way to avoid such warning is to declare the variable as
 478 # volatile to prevent the optimization. However, this approach does not
 479 # work because we have to declare all variables as volatile in result.
 480 #ifndef CROSS_COMPILE_ARCH
 481 #  CC_43_OR_NEWER := \
 482 #      $(shell $(EXPR) $(CC_MAJORVER) \> 4 \| \
 483 #          \( $(CC_MAJORVER) = 4 \& $(CC_MINORVER) \>= 3 \) )
 484 #  ifeq ($(CC_43_OR_NEWER), 1)
 485 #    BUILD_LIBJAVAJPEG_CFLAGS_linux += -Wno-clobbered
 486 #  endif
 487 #endif
 488 






 489 ifeq ($(USE_EXTERNAL_LIBJPEG), true)
 490   LIBJPEG_LIBS := -ljpeg
 491   BUILD_LIBJAVAJPEG_INCLUDE_FILES := \
 492       imageioJPEG.c \
 493       jpegdecoder.c
 494   BUILD_LIBJAVAJPEG_HEADERS :=
 495 else
 496   LIBJPEG_LIBS :=
 497   BUILD_LIBJAVAJPEG_INCLUDE_FILES :=
 498   BUILD_LIBJAVAJPEG_HEADERS := $(addprefix -I, $(LIBJAVAJPEG_SRC))
 499 endif
 500 
 501 $(eval $(call SetupNativeCompilation,BUILD_LIBJAVAJPEG, \
 502     LIBRARY := javajpeg, \
 503     OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
 504     SRC := $(LIBJAVAJPEG_SRC), \
 505     INCLUDE_FILES := $(BUILD_LIBJAVAJPEG_INCLUDE_FILES), \
 506     OPTIMIZATION := HIGHEST, \
 507     CFLAGS := $(CFLAGS_JDKLIB) $(BUILD_LIBJAVAJPEG_HEADERS) \
 508         $(LIBJAVA_HEADER_FLAGS) \

 509         -I$(SUPPORT_OUTPUTDIR)/headers/java.desktop, \
 510     DISABLED_WARNINGS_gcc := clobbered parentheses array-bounds, \
 511     DISABLED_WARNINGS_clang := logical-op-parentheses, \
 512     DISABLED_WARNINGS_microsoft := 4267, \
 513     MAPFILE := $(BUILD_LIBJAVAJPEG_MAPFILE), \
 514     LDFLAGS := $(LDFLAGS_JDKLIB) \
 515         $(call SET_SHARED_LIBRARY_ORIGIN), \
 516     LIBS := $(LIBJPEG_LIBS) $(JDKLIB_LIBS), \
 517     LIBS_windows := $(WIN_JAVA_LIB) jvm.lib, \
 518     VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
 519     RC_FLAGS := $(RC_FLAGS) \
 520         -D "JDK_FNAME=javajpeg.dll" \
 521         -D "JDK_INTERNAL_NAME=javajpeg" \
 522         -D "JDK_FTYPE=0x2L", \
 523     REORDER := $(BUILD_LIBJAVAJPEG_REORDER), \
 524     OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjavajpeg, \
 525 ))
 526 
 527 $(BUILD_LIBJAVAJPEG): $(call FindLib, java.base, java)
 528 


 893       $(addprefix -I, $(LIBSPLASHSCREEN_DIRS)) \
 894       $(LIBJAVA_HEADER_FLAGS) \
 895       #
 896 
 897   ifeq ($(OPENJDK_TARGET_OS), macosx)
 898     LIBSPLASHSCREEN_CFLAGS += -DWITH_MACOSX
 899     LIBSPLASHSCREEN_CFLAGS += -I$(JDK_TOPDIR)/src/java.desktop/macosx/native/libosxapp
 900 
 901     BUILD_LIBSPLASHSCREEN_java_awt_SplashScreen.c_CFLAGS := -x objective-c -O0
 902     BUILD_LIBSPLASHSCREEN_splashscreen_gfx_impl.c_CFLAGS := -x objective-c -O0
 903     BUILD_LIBSPLASHSCREEN_splashscreen_gif.c_CFLAGS := -x objective-c -O0
 904     BUILD_LIBSPLASHSCREEN_splashscreen_impl.c_CFLAGS := -x objective-c -O0
 905     BUILD_LIBSPLASHSCREEN_splashscreen_jpeg.c_CFLAGS := -x objective-c -O0
 906     BUILD_LIBSPLASHSCREEN_splashscreen_png.c_CFLAGS := -x objective-c -O0
 907     BUILD_LIBSPLASHSCREEN_splashscreen_sys.m_CFLAGS := -O0
 908 
 909   else ifeq ($(OPENJDK_TARGET_OS), windows)
 910     LIBSPLASHSCREEN_CFLAGS += -DWITH_WIN32
 911   else
 912     LIBSPLASHSCREEN_CFLAGS += -DWITH_X11 $(X_CFLAGS)







 913   endif
 914 
 915   LIBSPLASHSCREEN_LIBS :=
 916 
 917   ifneq ($(USE_EXTERNAL_LIBZ), true)
 918     LIBSPLASHSCREEN_DIRS += $(JDK_TOPDIR)/src/java.base/share/native/libzip/zlib-1.2.8
 919     LIBSPLASHSCREEN_CFLAGS += $(ZLIB_CPPFLAGS)
 920   endif
 921 
 922   ifeq ($(OPENJDK_TARGET_OS), macosx)
 923     LIBSPLASHSCREEN_LDFLAGS := -L$(INSTALL_LIBRARIES_HERE)
 924     LIBSPLASHSCREEN_LIBS += \
 925         $(LIBM) -lpthread -liconv -losxapp \
 926         -framework ApplicationServices \
 927         -framework Foundation \
 928         -framework Cocoa \
 929         -framework JavaNativeFoundation
 930   else ifeq ($(OPENJDK_TARGET_OS), windows)
 931     LIBSPLASHSCREEN_LDFLAGS := -delayload:user32.dll
 932     LIBSPLASHSCREEN_LIBS += kernel32.lib user32.lib gdi32.lib delayimp.lib $(WIN_JAVA_LIB) jvm.lib




 387     $(BUILD_LIBAWT_XAWT): $(call FindLib, java.base, java)
 388 
 389     $(BUILD_LIBAWT_XAWT): $(BUILD_LIBAWT)
 390 
 391     TARGETS += $(BUILD_LIBAWT_XAWT)
 392 
 393   endif
 394 endif
 395 
 396 ################################################################################
 397 
 398 LIBLCMS_SRC := $(JDK_TOPDIR)/src/java.desktop/share/native/liblcms
 399 LIBLCMS_CPPFLAGS += -I$(SUPPORT_OUTPUTDIR)/headers/java.desktop \
 400     -I$(JDK_TOPDIR)/src/java.desktop/share/native/libawt/java2d \
 401     -I$(JDK_TOPDIR)/src/java.desktop/share/native/common/awt/debug \
 402     $(LIBJAVA_HEADER_FLAGS) \
 403     #
 404 # The fast floor code loses precision.
 405 LCMS_CFLAGS=-DCMS_DONT_USE_FAST_FLOOR
 406 
 407 # Avoid warning for GCC 6
 408 ifeq ($(TOOLCHAIN_TYPE), gcc)
 409   LCMS_CFLAGS += -Wno-misleading-indentation
 410 endif
 411 
 412 ifeq ($(USE_EXTERNAL_LCMS), true)
 413   # If we're using an external library, we'll just need the wrapper part.
 414   # By including it explicitely, all other files will be excluded.
 415   BUILD_LIBLCMS_INCLUDE_FILES := LCMS.c
 416 else
 417   BUILD_LIBLCMS_INCLUDE_FILES :=
 418   # If we're using the bundled library, we'll need to include it in the
 419   # include path explicitly. Otherwise the system headers will be used.
 420   LIBLCMS_CPPFLAGS += $(addprefix -I, $(LIBLCMS_SRC))
 421 endif
 422 
 423 $(eval $(call SetupNativeCompilation,BUILD_LIBLCMS, \
 424     LIBRARY := lcms, \
 425     OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
 426     SRC := $(LIBLCMS_SRC), \
 427     INCLUDE_FILES := $(BUILD_LIBLCMS_INCLUDE_FILES), \
 428     OPTIMIZATION := HIGHEST, \
 429     CFLAGS := $(filter-out -xc99=%none, $(CFLAGS_JDKLIB)) \
 430         $(LIBLCMS_CPPFLAGS) \
 431         $(LCMS_CFLAGS), \


 474     BUILD_LIBJAVAJPEG_REORDER := $(JDK_TOPDIR)/make/mapfiles/libjpeg/reorder-$(OPENJDK_TARGET_CPU)
 475   endif
 476 endif
 477 
 478 
 479 # Suppress gcc warnings like "variable might be clobbered by 'longjmp'
 480 # or 'vfork'": this warning indicates that some variable is placed to
 481 # a register by optimized compiler and it's value might be lost on longjmp().
 482 # Recommended way to avoid such warning is to declare the variable as
 483 # volatile to prevent the optimization. However, this approach does not
 484 # work because we have to declare all variables as volatile in result.
 485 #ifndef CROSS_COMPILE_ARCH
 486 #  CC_43_OR_NEWER := \
 487 #      $(shell $(EXPR) $(CC_MAJORVER) \> 4 \| \
 488 #          \( $(CC_MAJORVER) = 4 \& $(CC_MINORVER) \>= 3 \) )
 489 #  ifeq ($(CC_43_OR_NEWER), 1)
 490 #    BUILD_LIBJAVAJPEG_CFLAGS_linux += -Wno-clobbered
 491 #  endif
 492 #endif
 493 
 494 # Avoid warning for GCC 6
 495 ifeq ($(TOOLCHAIN_TYPE), gcc)
 496   BUILD_LIBJAVAJPEG_CFLAGS += -Wno-shift-negative-value
 497 endif
 498 
 499 
 500 ifeq ($(USE_EXTERNAL_LIBJPEG), true)
 501   LIBJPEG_LIBS := -ljpeg
 502   BUILD_LIBJAVAJPEG_INCLUDE_FILES := \
 503       imageioJPEG.c \
 504       jpegdecoder.c
 505   BUILD_LIBJAVAJPEG_HEADERS :=
 506 else
 507   LIBJPEG_LIBS :=
 508   BUILD_LIBJAVAJPEG_INCLUDE_FILES :=
 509   BUILD_LIBJAVAJPEG_HEADERS := $(addprefix -I, $(LIBJAVAJPEG_SRC))
 510 endif
 511 
 512 $(eval $(call SetupNativeCompilation,BUILD_LIBJAVAJPEG, \
 513     LIBRARY := javajpeg, \
 514     OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
 515     SRC := $(LIBJAVAJPEG_SRC), \
 516     INCLUDE_FILES := $(BUILD_LIBJAVAJPEG_INCLUDE_FILES), \
 517     OPTIMIZATION := HIGHEST, \
 518     CFLAGS := $(CFLAGS_JDKLIB) $(BUILD_LIBJAVAJPEG_HEADERS) \
 519         $(LIBJAVA_HEADER_FLAGS) \
 520         $(BUILD_LIBJAVAJPEG_CFLAGS) \
 521         -I$(SUPPORT_OUTPUTDIR)/headers/java.desktop, \
 522     DISABLED_WARNINGS_gcc := clobbered parentheses array-bounds, \
 523     DISABLED_WARNINGS_clang := logical-op-parentheses, \
 524     DISABLED_WARNINGS_microsoft := 4267, \
 525     MAPFILE := $(BUILD_LIBJAVAJPEG_MAPFILE), \
 526     LDFLAGS := $(LDFLAGS_JDKLIB) \
 527         $(call SET_SHARED_LIBRARY_ORIGIN), \
 528     LIBS := $(LIBJPEG_LIBS) $(JDKLIB_LIBS), \
 529     LIBS_windows := $(WIN_JAVA_LIB) jvm.lib, \
 530     VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
 531     RC_FLAGS := $(RC_FLAGS) \
 532         -D "JDK_FNAME=javajpeg.dll" \
 533         -D "JDK_INTERNAL_NAME=javajpeg" \
 534         -D "JDK_FTYPE=0x2L", \
 535     REORDER := $(BUILD_LIBJAVAJPEG_REORDER), \
 536     OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjavajpeg, \
 537 ))
 538 
 539 $(BUILD_LIBJAVAJPEG): $(call FindLib, java.base, java)
 540 


 905       $(addprefix -I, $(LIBSPLASHSCREEN_DIRS)) \
 906       $(LIBJAVA_HEADER_FLAGS) \
 907       #
 908 
 909   ifeq ($(OPENJDK_TARGET_OS), macosx)
 910     LIBSPLASHSCREEN_CFLAGS += -DWITH_MACOSX
 911     LIBSPLASHSCREEN_CFLAGS += -I$(JDK_TOPDIR)/src/java.desktop/macosx/native/libosxapp
 912 
 913     BUILD_LIBSPLASHSCREEN_java_awt_SplashScreen.c_CFLAGS := -x objective-c -O0
 914     BUILD_LIBSPLASHSCREEN_splashscreen_gfx_impl.c_CFLAGS := -x objective-c -O0
 915     BUILD_LIBSPLASHSCREEN_splashscreen_gif.c_CFLAGS := -x objective-c -O0
 916     BUILD_LIBSPLASHSCREEN_splashscreen_impl.c_CFLAGS := -x objective-c -O0
 917     BUILD_LIBSPLASHSCREEN_splashscreen_jpeg.c_CFLAGS := -x objective-c -O0
 918     BUILD_LIBSPLASHSCREEN_splashscreen_png.c_CFLAGS := -x objective-c -O0
 919     BUILD_LIBSPLASHSCREEN_splashscreen_sys.m_CFLAGS := -O0
 920 
 921   else ifeq ($(OPENJDK_TARGET_OS), windows)
 922     LIBSPLASHSCREEN_CFLAGS += -DWITH_WIN32
 923   else
 924     LIBSPLASHSCREEN_CFLAGS += -DWITH_X11 $(X_CFLAGS)
 925 
 926     # Avoid warning for GCC 6
 927     ifeq ($(TOOLCHAIN_TYPE), gcc)
 928       BUILD_LIBSPLASHSCREEN_jdhuff.c_CFLAGS += -Wno-shift-negative-value
 929       BUILD_LIBSPLASHSCREEN_jdphuff.c_CFLAGS += -Wno-shift-negative-value
 930     endif
 931 
 932   endif
 933 
 934   LIBSPLASHSCREEN_LIBS :=
 935 
 936   ifneq ($(USE_EXTERNAL_LIBZ), true)
 937     LIBSPLASHSCREEN_DIRS += $(JDK_TOPDIR)/src/java.base/share/native/libzip/zlib-1.2.8
 938     LIBSPLASHSCREEN_CFLAGS += $(ZLIB_CPPFLAGS)
 939   endif
 940 
 941   ifeq ($(OPENJDK_TARGET_OS), macosx)
 942     LIBSPLASHSCREEN_LDFLAGS := -L$(INSTALL_LIBRARIES_HERE)
 943     LIBSPLASHSCREEN_LIBS += \
 944         $(LIBM) -lpthread -liconv -losxapp \
 945         -framework ApplicationServices \
 946         -framework Foundation \
 947         -framework Cocoa \
 948         -framework JavaNativeFoundation
 949   else ifeq ($(OPENJDK_TARGET_OS), windows)
 950     LIBSPLASHSCREEN_LDFLAGS := -delayload:user32.dll
 951     LIBSPLASHSCREEN_LIBS += kernel32.lib user32.lib gdi32.lib delayimp.lib $(WIN_JAVA_LIB) jvm.lib


< prev index next >