make/lib/Awt2dLibraries.gmk

Print this page




 498     MAPFILE := $(BUILD_LIBJAVAJPEG_MAPFILE), \
 499     LDFLAGS := $(LDFLAGS_JDKLIB) $(LIBJPEG_LIBS) \
 500         $(call SET_SHARED_LIBRARY_ORIGIN), \
 501     LDFLAGS_windows := $(WIN_JAVA_LIB) jvm.lib, \
 502     LDFLAGS_SUFFIX := $(LDFLAGS_JDKLIB_SUFFIX), \
 503     VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
 504     RC_FLAGS := $(RC_FLAGS) \
 505         -D "JDK_FNAME=javajpeg.dll" \
 506         -D "JDK_INTERNAL_NAME=javajpeg" \
 507         -D "JDK_FTYPE=0x2L", \
 508     REORDER := $(BUILD_LIBJAVAJPEG_REORDER), \
 509     OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjavajpeg, \
 510     DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
 511 
 512 $(BUILD_LIBJAVAJPEG): $(call FindLib, java.base, java)
 513 
 514 TARGETS += $(BUILD_LIBJAVAJPEG)
 515 
 516 ################################################################################
 517 







































































 518 LIBFONTMANAGER_SRC := $(JDK_TOPDIR)/src/java.desktop/share/native/libfontmanager \
 519     $(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/libfontmanager
 520 LIBFONTMANAGER_CFLAGS := \
 521     $(addprefix -I, $(shell $(FIND) \
 522       $(LIBFONTMANAGER_SRC) \
 523       $(JDK_TOPDIR)/src/java.desktop/share/native/libawt \
 524       $(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/libawt \
 525       $(JDK_TOPDIR)/src/java.desktop/share/native/common \
 526       $(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/common -type d)) \
 527     -I$(SUPPORT_OUTPUTDIR)/headers/java.desktop \
 528     $(LIBJAVA_HEADER_FLAGS) \
 529     #
 530 
 531 ifndef OPENJDK
 532   LIBFONTMANAGER_CFLAGS += -I$(JDK_TOPDIR)/src/closed/java.desktop/share/native/libt2k
 533   BUILD_LIBFONTMANAGER_MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libfontmanager/mapfile-vers
 534   LIBFONTMANAGER_EXCLUDE_FILES += freetypeScaler.c
 535 else
 536   LIBFONTMANAGER_CFLAGS += $(FREETYPE_CFLAGS)
 537   BUILD_LIBFONTMANAGER_MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libfontmanager/mapfile-vers.openjdk


 698       LDFLAGS_SUFFIX_aix := $(JAWT_LIBS) $(LDFLAGS_JDKLIB_SUFFIX),\
 699       LDFLAGS_SUFFIX_solaris := $(JAWT_LIBS) $(LDFLAGS_JDKLIB_SUFFIX) -lXrender, \
 700       LDFLAGS_SUFFIX_macosx := -Xlinker -rpath -Xlinker @loader_path $(JAWT_LIBS) \
 701           -framework Cocoa $(LDFLAGS_JDKLIB_SUFFIX), \
 702       OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjawt, \
 703       DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
 704 
 705   ifndef BUILD_HEADLESS_ONLY
 706     $(BUILD_LIBJAWT): $(BUILD_LIBAWT_XAWT)
 707   else
 708     $(BUILD_LIBJAWT): $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)awt_headless$(SHARED_LIBRARY_SUFFIX)
 709   endif
 710 
 711   ifeq ($(OPENJDK_TARGET_OS), macosx)
 712     $(BUILD_LIBJAWT): $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)awt_lwawt$(SHARED_LIBRARY_SUFFIX)
 713   endif
 714 
 715 endif # OPENJDK_TARGET_OS
 716 
 717 TARGETS += $(BUILD_LIBJAWT)
 718 
 719 ################################################################################
 720 
 721 ifeq ($(BUILD_HEADLESS), true)
 722   # Mac and Windows only use the native AWT lib, do not build libawt_headless
 723   ifeq ($(findstring $(OPENJDK_TARGET_OS), windows macosx),)
 724 
 725     LIBAWT_HEADLESS_DIRS := $(JDK_TOPDIR)/src/java.desktop/unix/native/libawt_headless/awt \
 726         $(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/common/awt \
 727         $(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/common/java2d/opengl \
 728         $(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/common/java2d/x11 \
 729         $(JDK_TOPDIR)/src/java.desktop/share/native/common/java2d/opengl \
 730         $(JDK_TOPDIR)/src/java.desktop/share/native/common/font \
 731         #
 732 
 733     LIBAWT_HEADLESS_EXCLUDES := medialib
 734     LIBAWT_HEADLESS_CFLAGS := -I$(SUPPORT_OUTPUTDIR)/headers/java.desktop \
 735         $(addprefix -I, $(LIBAWT_HEADLESS_DIRS)) \
 736         -I$(JDK_TOPDIR)/src/java.desktop/share/native/libawt/java2d \
 737         -I$(JDK_TOPDIR)/src/java.desktop/share/native/libawt/java2d/loops \
 738         -I$(JDK_TOPDIR)/src/java.desktop/share/native/libawt/awt/image/cvutils \
 739         -I$(JDK_TOPDIR)/src/java.desktop/share/native/libawt/java2d/pipe \
 740         -I$(JDK_TOPDIR)/src/java.desktop/share/native/libawt/awt/image \
 741         -I$(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/libawt/java2d \
 742         -I$(JDK_TOPDIR)/src/java.desktop/share/native/common/font \
 743         -I$(JDK_TOPDIR)/src/java.desktop/share/native/common/awt/debug \
 744         -I$(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/common/font \
 745         -I$(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/libsunwjdga/ \
 746         $(LIBJAVA_HEADER_FLAGS) \
 747         #
 748 
 749     LIBAWT_HEADLESS_REORDER :=
 750     ifeq ($(OPENJDK_TARGET_OS), solaris)
 751       ifneq ($(OPENJDK_TARGET_CPU), x86_64)
 752         LIBAWT_HEADLESS_REORDER := $(JDK_TOPDIR)/make/mapfiles/libawt_headless/reorder-$(OPENJDK_TARGET_CPU)
 753       endif
 754     endif
 755 
 756     $(eval $(call SetupNativeCompilation,BUILD_LIBAWT_HEADLESS, \
 757         LIBRARY := awt_headless, \
 758         OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
 759         SRC := $(LIBAWT_HEADLESS_DIRS), \
 760         EXCLUDES := $(LIBAWT_HEADLESS_EXCLUDES), \
 761         LANG := C, \
 762         OPTIMIZATION := LOW, \
 763         CFLAGS := $(CFLAGS_JDKLIB) \
 764             -DHEADLESS=true \
 765             -DPACKAGE_PATH=\"$(PACKAGE_PATH)\" \
 766             $(CUPS_CFLAGS) \
 767             $(X_CFLAGS) \
 768             $(LIBAWT_HEADLESS_CFLAGS), \
 769         MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libawt_headless/mapfile-vers, \
 770         LDFLAGS := $(LDFLAGS_JDKLIB) \
 771             $(call SET_SHARED_LIBRARY_ORIGIN), \
 772         LDFLAGS_unix := -L$(INSTALL_LIBRARIES_HERE), \
 773         LDFLAGS_linux := $(call SET_SHARED_LIBRARY_ORIGIN,/..), \
 774         LDFLAGS_solaris := $(call SET_SHARED_LIBRARY_ORIGIN,/..), \
 775         LDFLAGS_macosx := $(call SET_SHARED_LIBRARY_ORIGIN)., \
 776         REORDER := $(LIBAWT_HEADLESS_REORDER), \
 777         LDFLAGS_SUFFIX_linux := -ljvm -lawt -lm $(LIBDL) -ljava, \
 778         LDFLAGS_SUFFIX_aix := -ljvm -lawt -ljava,\
 779         LDFLAGS_SUFFIX_solaris := $(LIBDL) -ljvm -lawt -lm -ljava $(LIBCXX) -lc, \
 780         OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libawt_headless, \
 781         DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
 782 
 783     $(BUILD_LIBAWT_HEADLESS): $(BUILD_LIBAWT)
 784 
 785     TARGETS += $(BUILD_LIBAWT_HEADLESS)
 786 
 787   endif
 788 endif
 789 
 790 ################################################################################
 791 
 792 ifndef BUILD_HEADLESS_ONLY
 793 
 794   LIBSPLASHSCREEN_DIRS := \
 795       $(JDK_TOPDIR)/src/java.desktop/share/native/libjavajpeg \
 796       $(JDK_TOPDIR)/src/java.desktop/share/native/libsplashscreen \
 797       #
 798 
 799   ifeq ($(USE_EXTERNAL_LIBGIF), true)
 800     GIFLIB_LDFLAGS := -lgif
 801     LIBSPLASHSCREEN_EXCLUDES := giflib
 802   else
 803     LIBSPLASHSCREEN_CFLAGS += -I$(JDK_TOPDIR)/src/java.desktop/share/native/libsplashscreen/giflib
 804   endif
 805 
 806   ifeq ($(USE_EXTERNAL_LIBJPEG), true)
 807     LIBJPEG_LDFLAGS := -ljpeg
 808   else




 498     MAPFILE := $(BUILD_LIBJAVAJPEG_MAPFILE), \
 499     LDFLAGS := $(LDFLAGS_JDKLIB) $(LIBJPEG_LIBS) \
 500         $(call SET_SHARED_LIBRARY_ORIGIN), \
 501     LDFLAGS_windows := $(WIN_JAVA_LIB) jvm.lib, \
 502     LDFLAGS_SUFFIX := $(LDFLAGS_JDKLIB_SUFFIX), \
 503     VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
 504     RC_FLAGS := $(RC_FLAGS) \
 505         -D "JDK_FNAME=javajpeg.dll" \
 506         -D "JDK_INTERNAL_NAME=javajpeg" \
 507         -D "JDK_FTYPE=0x2L", \
 508     REORDER := $(BUILD_LIBJAVAJPEG_REORDER), \
 509     OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjavajpeg, \
 510     DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
 511 
 512 $(BUILD_LIBJAVAJPEG): $(call FindLib, java.base, java)
 513 
 514 TARGETS += $(BUILD_LIBJAVAJPEG)
 515 
 516 ################################################################################
 517 
 518 ifeq ($(BUILD_HEADLESS), true)
 519   # Mac and Windows only use the native AWT lib, do not build libawt_headless
 520   ifeq ($(findstring $(OPENJDK_TARGET_OS), windows macosx),)
 521 
 522     LIBAWT_HEADLESS_DIRS := $(JDK_TOPDIR)/src/java.desktop/unix/native/libawt_headless/awt \
 523         $(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/common/awt \
 524         $(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/common/java2d/opengl \
 525         $(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/common/java2d/x11 \
 526         $(JDK_TOPDIR)/src/java.desktop/share/native/common/java2d/opengl \
 527         $(JDK_TOPDIR)/src/java.desktop/share/native/common/font \
 528         #
 529 
 530     LIBAWT_HEADLESS_EXCLUDES := medialib
 531     LIBAWT_HEADLESS_CFLAGS := -I$(SUPPORT_OUTPUTDIR)/headers/java.desktop \
 532         $(addprefix -I, $(LIBAWT_HEADLESS_DIRS)) \
 533         -I$(JDK_TOPDIR)/src/java.desktop/share/native/libawt/java2d \
 534         -I$(JDK_TOPDIR)/src/java.desktop/share/native/libawt/java2d/loops \
 535         -I$(JDK_TOPDIR)/src/java.desktop/share/native/libawt/awt/image/cvutils \
 536         -I$(JDK_TOPDIR)/src/java.desktop/share/native/libawt/java2d/pipe \
 537         -I$(JDK_TOPDIR)/src/java.desktop/share/native/libawt/awt/image \
 538         -I$(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/libawt/java2d \
 539         -I$(JDK_TOPDIR)/src/java.desktop/share/native/common/font \
 540         -I$(JDK_TOPDIR)/src/java.desktop/share/native/common/awt/debug \
 541         -I$(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/common/font \
 542         -I$(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/libsunwjdga/ \
 543         $(LIBJAVA_HEADER_FLAGS) \
 544         #
 545 
 546     LIBAWT_HEADLESS_REORDER :=
 547     ifeq ($(OPENJDK_TARGET_OS), solaris)
 548       ifneq ($(OPENJDK_TARGET_CPU), x86_64)
 549         LIBAWT_HEADLESS_REORDER := $(JDK_TOPDIR)/make/mapfiles/libawt_headless/reorder-$(OPENJDK_TARGET_CPU)
 550       endif
 551     endif
 552 
 553     $(eval $(call SetupNativeCompilation,BUILD_LIBAWT_HEADLESS, \
 554         LIBRARY := awt_headless, \
 555         OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
 556         SRC := $(LIBAWT_HEADLESS_DIRS), \
 557         EXCLUDES := $(LIBAWT_HEADLESS_EXCLUDES), \
 558         LANG := C, \
 559         OPTIMIZATION := LOW, \
 560         CFLAGS := $(CFLAGS_JDKLIB) \
 561             -DHEADLESS=true \
 562             -DPACKAGE_PATH=\"$(PACKAGE_PATH)\" \
 563             $(CUPS_CFLAGS) \
 564             $(X_CFLAGS) \
 565             $(LIBAWT_HEADLESS_CFLAGS), \
 566         MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libawt_headless/mapfile-vers, \
 567         LDFLAGS := $(LDFLAGS_JDKLIB) \
 568             $(call SET_SHARED_LIBRARY_ORIGIN), \
 569         LDFLAGS_unix := -L$(INSTALL_LIBRARIES_HERE), \
 570         LDFLAGS_linux := $(call SET_SHARED_LIBRARY_ORIGIN,/..), \
 571         LDFLAGS_solaris := $(call SET_SHARED_LIBRARY_ORIGIN,/..), \
 572         LDFLAGS_macosx := $(call SET_SHARED_LIBRARY_ORIGIN)., \
 573         REORDER := $(LIBAWT_HEADLESS_REORDER), \
 574         LDFLAGS_SUFFIX_linux := -ljvm -lawt -lm $(LIBDL) -ljava, \
 575         LDFLAGS_SUFFIX_aix := -ljvm -lawt -ljava,\
 576         LDFLAGS_SUFFIX_solaris := $(LIBDL) -ljvm -lawt -lm -ljava $(LIBCXX) -lc, \
 577         OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libawt_headless, \
 578         DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
 579 
 580     $(BUILD_LIBAWT_HEADLESS): $(BUILD_LIBAWT)
 581 
 582     TARGETS += $(BUILD_LIBAWT_HEADLESS)
 583 
 584   endif
 585 endif
 586 
 587 ################################################################################
 588 
 589 LIBFONTMANAGER_SRC := $(JDK_TOPDIR)/src/java.desktop/share/native/libfontmanager \
 590     $(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/libfontmanager
 591 LIBFONTMANAGER_CFLAGS := \
 592     $(addprefix -I, $(shell $(FIND) \
 593       $(LIBFONTMANAGER_SRC) \
 594       $(JDK_TOPDIR)/src/java.desktop/share/native/libawt \
 595       $(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/libawt \
 596       $(JDK_TOPDIR)/src/java.desktop/share/native/common \
 597       $(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/common -type d)) \
 598     -I$(SUPPORT_OUTPUTDIR)/headers/java.desktop \
 599     $(LIBJAVA_HEADER_FLAGS) \
 600     #
 601 
 602 ifndef OPENJDK
 603   LIBFONTMANAGER_CFLAGS += -I$(JDK_TOPDIR)/src/closed/java.desktop/share/native/libt2k
 604   BUILD_LIBFONTMANAGER_MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libfontmanager/mapfile-vers
 605   LIBFONTMANAGER_EXCLUDE_FILES += freetypeScaler.c
 606 else
 607   LIBFONTMANAGER_CFLAGS += $(FREETYPE_CFLAGS)
 608   BUILD_LIBFONTMANAGER_MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libfontmanager/mapfile-vers.openjdk


 769       LDFLAGS_SUFFIX_aix := $(JAWT_LIBS) $(LDFLAGS_JDKLIB_SUFFIX),\
 770       LDFLAGS_SUFFIX_solaris := $(JAWT_LIBS) $(LDFLAGS_JDKLIB_SUFFIX) -lXrender, \
 771       LDFLAGS_SUFFIX_macosx := -Xlinker -rpath -Xlinker @loader_path $(JAWT_LIBS) \
 772           -framework Cocoa $(LDFLAGS_JDKLIB_SUFFIX), \
 773       OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjawt, \
 774       DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
 775 
 776   ifndef BUILD_HEADLESS_ONLY
 777     $(BUILD_LIBJAWT): $(BUILD_LIBAWT_XAWT)
 778   else
 779     $(BUILD_LIBJAWT): $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)awt_headless$(SHARED_LIBRARY_SUFFIX)
 780   endif
 781 
 782   ifeq ($(OPENJDK_TARGET_OS), macosx)
 783     $(BUILD_LIBJAWT): $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)awt_lwawt$(SHARED_LIBRARY_SUFFIX)
 784   endif
 785 
 786 endif # OPENJDK_TARGET_OS
 787 
 788 TARGETS += $(BUILD_LIBJAWT)







































































 789 
 790 ################################################################################
 791 
 792 ifndef BUILD_HEADLESS_ONLY
 793 
 794   LIBSPLASHSCREEN_DIRS := \
 795       $(JDK_TOPDIR)/src/java.desktop/share/native/libjavajpeg \
 796       $(JDK_TOPDIR)/src/java.desktop/share/native/libsplashscreen \
 797       #
 798 
 799   ifeq ($(USE_EXTERNAL_LIBGIF), true)
 800     GIFLIB_LDFLAGS := -lgif
 801     LIBSPLASHSCREEN_EXCLUDES := giflib
 802   else
 803     LIBSPLASHSCREEN_CFLAGS += -I$(JDK_TOPDIR)/src/java.desktop/share/native/libsplashscreen/giflib
 804   endif
 805 
 806   ifeq ($(USE_EXTERNAL_LIBJPEG), true)
 807     LIBJPEG_LDFLAGS := -ljpeg
 808   else