Print this page
Added gradle and cmake project


 229         format-nonliteral parentheses unused-value unused-function, \
 230     DISABLED_WARNINGS_clang := logical-op-parentheses extern-initializer \
 231         sign-compare format-nonliteral, \
 232     DISABLED_WARNINGS_solstudio := E_DECLARATION_IN_CODE, \
 233     DISABLED_WARNINGS_microsoft := 4244 4267 4996, \
 234     ASFLAGS := $(LIBAWT_ASFLAGS), \
 235     LDFLAGS := $(LDFLAGS_JDKLIB) $(call SET_SHARED_LIBRARY_ORIGIN), \
 236     LDFLAGS_macosx := -L$(INSTALL_LIBRARIES_HERE), \
 237     LDFLAGS_windows := -delayload:user32.dll -delayload:gdi32.dll \
 238         -delayload:shell32.dll -delayload:winmm.dll \
 239         -delayload:winspool.drv -delayload:imm32.dll \
 240         -delayload:ole32.dll -delayload:comdlg32.dll \
 241         -delayload:comctl32.dll -delayload:shlwapi.dll, \
 242     LIBS_unix := -ljvm -ljava $(LIBM), \
 243     LIBS_linux :=  $(LIBDL), \
 244     LIBS_solaris := $(LIBDL), \
 245     LIBS_aix := $(LIBDL),\
 246     LIBS_macosx := -lmlib_image \
 247         -framework Cocoa \
 248         -framework OpenGL \


 249         -framework JavaNativeFoundation \
 250         -framework JavaRuntimeSupport \
 251         -framework ApplicationServices \
 252         -framework AudioToolbox, \
 253     LIBS_windows := kernel32.lib user32.lib gdi32.lib winspool.lib \
 254         imm32.lib ole32.lib uuid.lib shell32.lib \
 255         comdlg32.lib winmm.lib comctl32.lib shlwapi.lib \
 256         delayimp.lib jvm.lib $(WIN_JAVA_LIB) advapi32.lib, \
 257     VERSIONINFO_RESOURCE := $(LIBAWT_VERSIONINFO_RESOURCE), \
 258     RC_FLAGS := $(RC_FLAGS) $(LIBAWT_RC_FLAGS) \
 259         -D "JDK_FNAME=awt.dll" \
 260         -D "JDK_INTERNAL_NAME=awt" \
 261         -D "JDK_FTYPE=0x2L", \
 262 ))
 263 
 264 $(BUILD_LIBAWT): $(call FindLib, java.base, java)
 265 
 266 ifeq ($(OPENJDK_TARGET_OS), macosx)
 267   $(BUILD_LIBAWT): $(BUILD_LIBMLIB_IMAGE)
 268 endif


 805     BUILD_LIBSPLASHSCREEN_splashscreen_gif.c_CFLAGS := -x objective-c -O0
 806     BUILD_LIBSPLASHSCREEN_splashscreen_impl.c_CFLAGS := -x objective-c -O0
 807     BUILD_LIBSPLASHSCREEN_splashscreen_jpeg.c_CFLAGS := -x objective-c -O0
 808     BUILD_LIBSPLASHSCREEN_splashscreen_png.c_CFLAGS := -x objective-c -O0
 809     BUILD_LIBSPLASHSCREEN_splashscreen_sys.m_CFLAGS := -O0
 810 
 811   else ifeq ($(OPENJDK_TARGET_OS), windows)
 812     LIBSPLASHSCREEN_CFLAGS += -DWITH_WIN32
 813   else
 814     LIBSPLASHSCREEN_CFLAGS += -DWITH_X11 $(X_CFLAGS)
 815   endif
 816 
 817   LIBSPLASHSCREEN_LIBS :=
 818 
 819   ifeq ($(OPENJDK_TARGET_OS), macosx)
 820     LIBSPLASHSCREEN_LIBS += \
 821         $(LIBM) -lpthread -liconv -losxapp \
 822         -framework ApplicationServices \
 823         -framework Foundation \
 824         -framework Cocoa \


 825         -framework JavaNativeFoundation
 826   else ifeq ($(OPENJDK_TARGET_OS), windows)
 827     LIBSPLASHSCREEN_LIBS += kernel32.lib user32.lib gdi32.lib delayimp.lib $(WIN_JAVA_LIB) jvm.lib
 828   else
 829     LIBSPLASHSCREEN_LIBS += $(X_LIBS) -lX11 -lXext $(LIBM) -lpthread -ldl
 830   endif
 831 
 832   LIBSPLASHSCREEN_HEADER_DIRS += \
 833       libosxapp \
 834       java.base:include \
 835       java.base:libjava \
 836       #
 837 
 838   $(eval $(call SetupJdkLibrary, BUILD_LIBSPLASHSCREEN, \
 839       NAME := splashscreen, \
 840       EXTRA_SRC := $(LIBSPLASHSCREEN_EXTRA_SRC), \
 841       EXCLUDE_SRC_PATTERNS := $(LIBSPLASHSCREEN_EXCLUDE_SRC_PATTERNS), \
 842       EXCLUDE_FILES := imageioJPEG.c jpegdecoder.c pngtest.c, \
 843       EXCLUDES := $(LIBSPLASHSCREEN_EXCLUDES), \
 844       OPTIMIZATION := LOW, \


 867     $(BUILD_LIBSPLASHSCREEN): $(call FindLib, $(MODULE), osxapp)
 868   endif
 869 
 870 endif
 871 
 872 ################################################################################
 873 
 874 ifeq ($(OPENJDK_TARGET_OS), macosx)
 875 
 876   LIBAWT_LWAWT_EXTRA_SRC := \
 877       $(TOPDIR)/src/$(MODULE)/unix/native/common/awt \
 878       $(TOPDIR)/src/$(MODULE)/share/native/common/font \
 879       $(TOPDIR)/src/$(MODULE)/share/native/common/java2d \
 880       #
 881 
 882   LIBAWT_LWAWT_EXTRA_HEADER_DIRS := \
 883       $(LIBAWT_DEFAULT_HEADER_DIRS) \
 884       libawt_lwawt/awt \
 885       libawt_lwawt/font \
 886       libawt_lwawt/java2d/opengl \

 887       include \
 888       common/awt/debug \
 889       common/java2d/opengl \
 890       libosxapp \
 891       #
 892 
 893   LIBAWT_LWAWT_CFLAGS := $(X_CFLAGS) $(X_LIBS)
 894 
 895   LIBAWT_LWAWT_EXFILES := fontpath.c awt_Font.c X11Color.c
 896   LIBAWT_LWAWT_EXCLUDES := $(TOPDIR)/src/$(MODULE)/unix/native/common/awt/medialib
 897 
 898   $(eval $(call SetupJdkLibrary, BUILD_LIBAWT_LWAWT, \
 899       NAME := awt_lwawt, \
 900       EXTRA_SRC := $(LIBAWT_LWAWT_EXTRA_SRC), \
 901       INCLUDE_FILES := $(LIBAWT_LWAWT_FILES), \
 902       EXCLUDE_FILES := $(LIBAWT_LWAWT_EXFILES), \
 903       EXCLUDES := $(LIBAWT_LWAWT_EXCLUDES), \
 904       OPTIMIZATION := LOW, \
 905       CFLAGS := $(CFLAGS_JDKLIB) \
 906           $(LIBAWT_LWAWT_CFLAGS), \
 907       EXTRA_HEADER_DIRS := $(LIBAWT_LWAWT_EXTRA_HEADER_DIRS), \
 908       DISABLED_WARNINGS_clang := incomplete-implementation enum-conversion \
 909           deprecated-declarations objc-method-access bitwise-op-parentheses \
 910           incompatible-pointer-types parentheses-equality extra-tokens \
 911           sign-compare semicolon-before-method-body format-nonliteral undef \
 912           pointer-arith, \
 913       LDFLAGS := $(LDFLAGS_JDKLIB) \
 914           $(call SET_SHARED_LIBRARY_ORIGIN) \
 915           -L$(INSTALL_LIBRARIES_HERE), \
 916       LIBS := -lawt -lmlib_image -losxapp -ljvm $(LIBM) \
 917           -framework Accelerate \
 918           -framework ApplicationServices \
 919           -framework AudioToolbox \
 920           -framework Carbon \
 921           -framework Cocoa \


 922           -framework Security \
 923           -framework ExceptionHandling \
 924           -framework JavaNativeFoundation \
 925           -framework JavaRuntimeSupport \
 926           -framework OpenGL \
 927           -framework QuartzCore -ljava, \
 928   ))
 929 
 930   TARGETS += $(BUILD_LIBAWT_LWAWT)
 931 
 932   $(BUILD_LIBAWT_LWAWT): $(BUILD_LIBAWT)
 933 
 934   $(BUILD_LIBAWT_LWAWT): $(BUILD_LIBMLIB_IMAGE)
 935 
 936   $(BUILD_LIBAWT_LWAWT): $(call FindLib, $(MODULE), osxapp)
 937 
 938   $(BUILD_LIBAWT_LWAWT): $(call FindLib, java.base, java)
 939 
 940 endif
 941 
 942 ################################################################################
 943 
 944 ifeq ($(OPENJDK_TARGET_OS), macosx)





 945 
 946   $(eval $(call SetupJdkLibrary, BUILD_LIBOSXUI, \
 947       NAME := osxui, \
 948       OPTIMIZATION := LOW, \
 949       CFLAGS := $(CFLAGS_JDKLIB), \
 950       EXTRA_HEADER_DIRS := \
 951           libawt_lwawt/awt \
 952           libosxapp, \
 953       DISABLED_WARNINGS_clang := deprecated-declarations sign-compare, \
 954       LDFLAGS := $(LDFLAGS_JDKLIB) \
 955           $(call SET_SHARED_LIBRARY_ORIGIN) \
 956           -Wl$(COMMA)-rpath$(COMMA)@loader_path \
 957           -L$(INSTALL_LIBRARIES_HERE), \
 958       LIBS := -lawt -losxapp -lawt_lwawt \
 959           -framework Cocoa \



 960           -framework Carbon \
 961           -framework ApplicationServices \
 962           -framework JavaNativeFoundation \
 963           -framework JavaRuntimeSupport \
 964           -ljava -ljvm, \
 965   ))
 966 
 967   TARGETS += $(BUILD_LIBOSXUI)

 968 
 969   $(BUILD_LIBOSXUI): $(BUILD_LIBAWT)
 970 
 971   $(BUILD_LIBOSXUI): $(call FindLib, $(MODULE), osxapp)
 972 
 973   $(BUILD_LIBOSXUI): $(BUILD_LIBAWT_LWAWT)
 974 
 975 endif
 976 
 977 ################################################################################
 978 
 979 # Hook to include the corresponding custom file, if present.
 980 $(eval $(call IncludeCustomExtension, lib/Awt2dLibraries.gmk))


 229         format-nonliteral parentheses unused-value unused-function, \
 230     DISABLED_WARNINGS_clang := logical-op-parentheses extern-initializer \
 231         sign-compare format-nonliteral, \
 232     DISABLED_WARNINGS_solstudio := E_DECLARATION_IN_CODE, \
 233     DISABLED_WARNINGS_microsoft := 4244 4267 4996, \
 234     ASFLAGS := $(LIBAWT_ASFLAGS), \
 235     LDFLAGS := $(LDFLAGS_JDKLIB) $(call SET_SHARED_LIBRARY_ORIGIN), \
 236     LDFLAGS_macosx := -L$(INSTALL_LIBRARIES_HERE), \
 237     LDFLAGS_windows := -delayload:user32.dll -delayload:gdi32.dll \
 238         -delayload:shell32.dll -delayload:winmm.dll \
 239         -delayload:winspool.drv -delayload:imm32.dll \
 240         -delayload:ole32.dll -delayload:comdlg32.dll \
 241         -delayload:comctl32.dll -delayload:shlwapi.dll, \
 242     LIBS_unix := -ljvm -ljava $(LIBM), \
 243     LIBS_linux :=  $(LIBDL), \
 244     LIBS_solaris := $(LIBDL), \
 245     LIBS_aix := $(LIBDL),\
 246     LIBS_macosx := -lmlib_image \
 247         -framework Cocoa \
 248         -framework OpenGL \
 249         -framework Metal \
 250         -framework MetalKit \
 251         -framework JavaNativeFoundation \
 252         -framework JavaRuntimeSupport \
 253         -framework ApplicationServices \
 254         -framework AudioToolbox, \
 255     LIBS_windows := kernel32.lib user32.lib gdi32.lib winspool.lib \
 256         imm32.lib ole32.lib uuid.lib shell32.lib \
 257         comdlg32.lib winmm.lib comctl32.lib shlwapi.lib \
 258         delayimp.lib jvm.lib $(WIN_JAVA_LIB) advapi32.lib, \
 259     VERSIONINFO_RESOURCE := $(LIBAWT_VERSIONINFO_RESOURCE), \
 260     RC_FLAGS := $(RC_FLAGS) $(LIBAWT_RC_FLAGS) \
 261         -D "JDK_FNAME=awt.dll" \
 262         -D "JDK_INTERNAL_NAME=awt" \
 263         -D "JDK_FTYPE=0x2L", \
 264 ))
 265 
 266 $(BUILD_LIBAWT): $(call FindLib, java.base, java)
 267 
 268 ifeq ($(OPENJDK_TARGET_OS), macosx)
 269   $(BUILD_LIBAWT): $(BUILD_LIBMLIB_IMAGE)
 270 endif


 807     BUILD_LIBSPLASHSCREEN_splashscreen_gif.c_CFLAGS := -x objective-c -O0
 808     BUILD_LIBSPLASHSCREEN_splashscreen_impl.c_CFLAGS := -x objective-c -O0
 809     BUILD_LIBSPLASHSCREEN_splashscreen_jpeg.c_CFLAGS := -x objective-c -O0
 810     BUILD_LIBSPLASHSCREEN_splashscreen_png.c_CFLAGS := -x objective-c -O0
 811     BUILD_LIBSPLASHSCREEN_splashscreen_sys.m_CFLAGS := -O0
 812 
 813   else ifeq ($(OPENJDK_TARGET_OS), windows)
 814     LIBSPLASHSCREEN_CFLAGS += -DWITH_WIN32
 815   else
 816     LIBSPLASHSCREEN_CFLAGS += -DWITH_X11 $(X_CFLAGS)
 817   endif
 818 
 819   LIBSPLASHSCREEN_LIBS :=
 820 
 821   ifeq ($(OPENJDK_TARGET_OS), macosx)
 822     LIBSPLASHSCREEN_LIBS += \
 823         $(LIBM) -lpthread -liconv -losxapp \
 824         -framework ApplicationServices \
 825         -framework Foundation \
 826         -framework Cocoa \
 827         -framework Metal \
 828         -framework MetalKit \
 829         -framework JavaNativeFoundation
 830   else ifeq ($(OPENJDK_TARGET_OS), windows)
 831     LIBSPLASHSCREEN_LIBS += kernel32.lib user32.lib gdi32.lib delayimp.lib $(WIN_JAVA_LIB) jvm.lib
 832   else
 833     LIBSPLASHSCREEN_LIBS += $(X_LIBS) -lX11 -lXext $(LIBM) -lpthread -ldl
 834   endif
 835 
 836   LIBSPLASHSCREEN_HEADER_DIRS += \
 837       libosxapp \
 838       java.base:include \
 839       java.base:libjava \
 840       #
 841 
 842   $(eval $(call SetupJdkLibrary, BUILD_LIBSPLASHSCREEN, \
 843       NAME := splashscreen, \
 844       EXTRA_SRC := $(LIBSPLASHSCREEN_EXTRA_SRC), \
 845       EXCLUDE_SRC_PATTERNS := $(LIBSPLASHSCREEN_EXCLUDE_SRC_PATTERNS), \
 846       EXCLUDE_FILES := imageioJPEG.c jpegdecoder.c pngtest.c, \
 847       EXCLUDES := $(LIBSPLASHSCREEN_EXCLUDES), \
 848       OPTIMIZATION := LOW, \


 871     $(BUILD_LIBSPLASHSCREEN): $(call FindLib, $(MODULE), osxapp)
 872   endif
 873 
 874 endif
 875 
 876 ################################################################################
 877 
 878 ifeq ($(OPENJDK_TARGET_OS), macosx)
 879 
 880   LIBAWT_LWAWT_EXTRA_SRC := \
 881       $(TOPDIR)/src/$(MODULE)/unix/native/common/awt \
 882       $(TOPDIR)/src/$(MODULE)/share/native/common/font \
 883       $(TOPDIR)/src/$(MODULE)/share/native/common/java2d \
 884       #
 885 
 886   LIBAWT_LWAWT_EXTRA_HEADER_DIRS := \
 887       $(LIBAWT_DEFAULT_HEADER_DIRS) \
 888       libawt_lwawt/awt \
 889       libawt_lwawt/font \
 890       libawt_lwawt/java2d/opengl \
 891       libawt_lwawt/java2d/metal \
 892       include \
 893       common/awt/debug \
 894       common/java2d/opengl \
 895       libosxapp \
 896       #
 897 
 898   LIBAWT_LWAWT_CFLAGS := $(X_CFLAGS) $(X_LIBS)
 899 
 900   LIBAWT_LWAWT_EXFILES := fontpath.c awt_Font.c X11Color.c
 901   LIBAWT_LWAWT_EXCLUDES := $(TOPDIR)/src/$(MODULE)/unix/native/common/awt/medialib
 902 
 903   $(eval $(call SetupJdkLibrary, BUILD_LIBAWT_LWAWT, \
 904       NAME := awt_lwawt, \
 905       EXTRA_SRC := $(LIBAWT_LWAWT_EXTRA_SRC), \
 906       INCLUDE_FILES := $(LIBAWT_LWAWT_FILES), \
 907       EXCLUDE_FILES := $(LIBAWT_LWAWT_EXFILES), \
 908       EXCLUDES := $(LIBAWT_LWAWT_EXCLUDES), \
 909       OPTIMIZATION := LOW, \
 910       CFLAGS := $(CFLAGS_JDKLIB) \
 911           $(LIBAWT_LWAWT_CFLAGS), \
 912       EXTRA_HEADER_DIRS := $(LIBAWT_LWAWT_EXTRA_HEADER_DIRS), \
 913       DISABLED_WARNINGS_clang := incomplete-implementation enum-conversion \
 914           deprecated-declarations objc-method-access bitwise-op-parentheses \
 915           incompatible-pointer-types parentheses-equality extra-tokens \
 916           sign-compare semicolon-before-method-body format-nonliteral undef \
 917           pointer-arith, \
 918       LDFLAGS := $(LDFLAGS_JDKLIB) \
 919           $(call SET_SHARED_LIBRARY_ORIGIN) \
 920           -L$(INSTALL_LIBRARIES_HERE), \
 921       LIBS := -lawt -lmlib_image -losxapp -ljvm $(LIBM) \
 922           -framework Accelerate \
 923           -framework ApplicationServices \
 924           -framework AudioToolbox \
 925           -framework Carbon \
 926           -framework Cocoa \
 927           -framework Metal \
 928           -framework MetalKit \
 929           -framework Security \
 930           -framework ExceptionHandling \
 931           -framework JavaNativeFoundation \
 932           -framework JavaRuntimeSupport \
 933           -framework OpenGL \
 934           -framework QuartzCore -ljava, \
 935   ))
 936 
 937   TARGETS += $(BUILD_LIBAWT_LWAWT)
 938 
 939   $(BUILD_LIBAWT_LWAWT): $(BUILD_LIBAWT)
 940 
 941   $(BUILD_LIBAWT_LWAWT): $(BUILD_LIBMLIB_IMAGE)
 942 
 943   $(BUILD_LIBAWT_LWAWT): $(call FindLib, $(MODULE), osxapp)
 944 
 945   $(BUILD_LIBAWT_LWAWT): $(call FindLib, java.base, java)
 946 
 947 endif
 948 
 949 ################################################################################
 950 
 951 ifeq ($(OPENJDK_TARGET_OS), macosx)
 952   XCODE_PATH := $(shell /usr/bin/xcode-select -p)
 953   CompileMetalShaders :
 954         $(XCODE_PATH)/Platforms/MacOSX.platform/usr/bin/metal -O2 -std=osx-metal1.1 -o $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libosxui/shaders.air $(TOPDIR)/src/java.desktop/macosx/native/libawt_lwawt/awt/shaders.metal
 955         $(XCODE_PATH)/Platforms/MacOSX.platform/usr/bin/metal-ar r $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libosxui/shaders.metal-ar $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libosxui/shaders.air
 956         $(XCODE_PATH)/Platforms/MacOSX.platform/usr/bin/metallib -o $(INSTALL_LIBRARIES_HERE)/shaders.metallib $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libosxui/shaders.metal-ar
 957 
 958   $(eval $(call SetupJdkLibrary, BUILD_LIBOSXUI, \
 959       NAME := osxui, \
 960       OPTIMIZATION := LOW, \
 961       CFLAGS := $(CFLAGS_JDKLIB), \
 962       EXTRA_HEADER_DIRS := \
 963           libawt_lwawt/awt \
 964           libosxapp, \
 965       DISABLED_WARNINGS_clang := deprecated-declarations sign-compare, \
 966       LDFLAGS := $(LDFLAGS_JDKLIB) \
 967           $(call SET_SHARED_LIBRARY_ORIGIN) \
 968           -Wl$(COMMA)-rpath$(COMMA)@loader_path \
 969           -L$(INSTALL_LIBRARIES_HERE), \
 970       LIBS := -lawt -losxapp -lawt_lwawt \
 971           -framework Cocoa \
 972           -framework Metal \
 973           -framework MetalKit \
 974           -framework OpenGL \
 975           -framework Carbon \
 976           -framework ApplicationServices \
 977           -framework JavaNativeFoundation \
 978           -framework JavaRuntimeSupport \
 979           -ljava -ljvm, \
 980   ))
 981 
 982   TARGETS += $(BUILD_LIBOSXUI)
 983   $(BUILD_LIBOSXUI): CompileMetalShaders
 984 
 985   $(BUILD_LIBOSXUI): $(BUILD_LIBAWT)
 986 
 987   $(BUILD_LIBOSXUI): $(call FindLib, $(MODULE), osxapp)
 988 
 989   $(BUILD_LIBOSXUI): $(BUILD_LIBAWT_LWAWT)
 990 
 991 endif
 992 
 993 ################################################################################
 994 
 995 # Hook to include the corresponding custom file, if present.
 996 $(eval $(call IncludeCustomExtension, lib/Awt2dLibraries.gmk))