2013-10-16 18:24:46 +00:00
|
|
|
#
|
2024-02-27 11:14:11 +00:00
|
|
|
# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved.
|
2013-10-16 18:24:46 +00:00
|
|
|
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
|
|
#
|
|
|
|
# This code is free software; you can redistribute it and/or modify it
|
|
|
|
# under the terms of the GNU General Public License version 2 only, as
|
|
|
|
# published by the Free Software Foundation. Oracle designates this
|
|
|
|
# particular file as subject to the "Classpath" exception as provided
|
|
|
|
# by Oracle in the LICENSE file that accompanied this code.
|
|
|
|
#
|
|
|
|
# This code is distributed in the hope that it will be useful, but WITHOUT
|
|
|
|
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
|
|
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
|
|
# version 2 for more details (a copy is included in the LICENSE file that
|
|
|
|
# accompanied this code).
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License version
|
|
|
|
# 2 along with this work; if not, write to the Free Software Foundation,
|
|
|
|
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
|
|
#
|
|
|
|
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
|
|
# or visit www.oracle.com if you need additional information or have any
|
|
|
|
# questions.
|
|
|
|
#
|
|
|
|
|
2024-04-11 14:15:34 +00:00
|
|
|
include CopyFiles.gmk
|
|
|
|
|
2018-06-08 16:11:32 +00:00
|
|
|
LIBAWT_DEFAULT_HEADER_DIRS := \
|
2022-10-25 09:45:33 +00:00
|
|
|
common/awt/utility \
|
2018-06-08 16:11:32 +00:00
|
|
|
libawt/awt/image \
|
|
|
|
libawt/awt/image/cvutils \
|
|
|
|
libawt/java2d \
|
|
|
|
libawt/java2d/loops \
|
|
|
|
libawt/java2d/pipe \
|
|
|
|
#
|
2013-10-16 18:24:46 +00:00
|
|
|
|
2018-06-08 16:11:32 +00:00
|
|
|
################################################################################
|
2024-03-27 14:44:40 +00:00
|
|
|
## Build libmlib_image
|
|
|
|
################################################################################
|
2013-10-16 18:24:46 +00:00
|
|
|
|
2019-02-07 11:35:45 +00:00
|
|
|
ifeq ($(call isTargetCpuBits, 64), true)
|
2024-03-27 14:44:40 +00:00
|
|
|
LIBMLIB_IMAGE_CFLAGS := -DMLIB_OS64BIT
|
2013-10-16 18:24:46 +00:00
|
|
|
endif
|
|
|
|
|
2018-03-15 00:20:47 +00:00
|
|
|
$(eval $(call SetupJdkLibrary, BUILD_LIBMLIB_IMAGE, \
|
2018-02-28 20:16:11 +00:00
|
|
|
NAME := mlib_image, \
|
2018-06-08 16:11:32 +00:00
|
|
|
EXTRA_SRC := common/awt/medialib, \
|
2024-04-11 09:40:12 +00:00
|
|
|
EXTRA_HEADER_DIRS := java.base:libjava, \
|
2014-08-17 14:54:13 +00:00
|
|
|
EXCLUDE_FILES := mlib_c_ImageBlendTable.c, \
|
2013-10-16 18:24:46 +00:00
|
|
|
OPTIMIZATION := HIGHEST, \
|
2024-03-27 14:44:40 +00:00
|
|
|
CFLAGS := -D__USE_J2D_NAMES -D__MEDIALIB_OLD_NAMES -DMLIB_NO_LIBSUNMATH \
|
|
|
|
$(LIBMLIB_IMAGE_CFLAGS), \
|
2018-09-24 17:26:48 +00:00
|
|
|
DISABLED_WARNINGS_gcc := unused-function, \
|
2024-03-27 14:44:40 +00:00
|
|
|
LIBS_unix := $(LIBDL) $(LIBM), \
|
2016-01-20 08:54:13 +00:00
|
|
|
))
|
2013-10-16 18:24:46 +00:00
|
|
|
|
2014-12-03 14:22:58 +00:00
|
|
|
TARGETS += $(BUILD_LIBMLIB_IMAGE)
|
2013-10-16 18:24:46 +00:00
|
|
|
|
2024-03-27 14:44:40 +00:00
|
|
|
################################################################################
|
|
|
|
## Build libawt
|
2014-08-21 09:05:35 +00:00
|
|
|
################################################################################
|
2013-10-16 18:24:46 +00:00
|
|
|
|
2018-06-08 16:11:32 +00:00
|
|
|
LIBAWT_EXTRA_SRC := \
|
|
|
|
common/awt/debug \
|
|
|
|
$(TOPDIR)/src/$(MODULE)/$(OPENJDK_TARGET_OS_TYPE)/native/common/awt \
|
2014-08-17 14:54:13 +00:00
|
|
|
#
|
2013-10-16 18:24:46 +00:00
|
|
|
|
2019-02-07 11:35:45 +00:00
|
|
|
ifeq ($(call isTargetOs, windows), true)
|
2018-06-08 16:11:32 +00:00
|
|
|
LIBAWT_EXTRA_SRC += \
|
|
|
|
$(TOPDIR)/src/$(MODULE)/share/native/common/awt/utility \
|
|
|
|
$(TOPDIR)/src/$(MODULE)/share/native/common/font \
|
|
|
|
$(TOPDIR)/src/$(MODULE)/share/native/common/java2d/opengl \
|
|
|
|
$(TOPDIR)/src/$(MODULE)/$(OPENJDK_TARGET_OS_TYPE)/native/common/awt/systemscale \
|
|
|
|
#
|
2013-10-16 18:24:46 +00:00
|
|
|
endif
|
|
|
|
|
8244224: Implementation of JEP 381: Remove the Solaris and SPARC Ports
Reviewed-by: alanb, bchristi, dcubed, dfuchs, eosterlund, erikj, glaubitz, ihse, iignatyev, jjiang, kbarrett, ksrini, kvn, naoto, prr, rriggs, serb, sspitsyn, stefank, tschatzl, valeriep, weijun, weijun
2020-05-21 00:33:37 +00:00
|
|
|
ifeq ($(call isTargetOs, linux macosx aix), true)
|
2024-03-27 14:44:40 +00:00
|
|
|
LIBAWT_EXCLUDE_FILES += awt_Font.c CUPSfuncs.c fontpath.c X11Color.c
|
2013-11-26 15:40:31 +00:00
|
|
|
endif
|
|
|
|
|
2019-02-07 11:35:45 +00:00
|
|
|
ifeq ($(call isTargetOs, macosx), true)
|
2024-03-27 14:44:40 +00:00
|
|
|
LIBAWT_EXCLUDE_FILES += initIDs.c img_colors.c
|
2014-08-17 14:54:13 +00:00
|
|
|
endif
|
|
|
|
|
2019-02-07 11:35:45 +00:00
|
|
|
ifeq ($(call isTargetOs, windows), true)
|
2024-03-27 14:44:40 +00:00
|
|
|
LIBAWT_EXCLUDE_FILES += D3DShaderGen.c img_colors.c
|
2018-06-08 16:11:32 +00:00
|
|
|
endif
|
2014-08-17 14:54:13 +00:00
|
|
|
|
2018-06-08 16:11:32 +00:00
|
|
|
LIBAWT_EXTRA_HEADER_DIRS := \
|
|
|
|
$(LIBAWT_DEFAULT_HEADER_DIRS) \
|
|
|
|
$(call GetJavaHeaderDir, java.base) \
|
|
|
|
libawt/awt/medialib \
|
|
|
|
libawt/java2d/d3d \
|
|
|
|
libawt/java2d/opengl \
|
|
|
|
libawt/java2d/windows \
|
|
|
|
libawt/windows \
|
|
|
|
common/awt/medialib \
|
|
|
|
libmlib_image \
|
|
|
|
include \
|
|
|
|
#
|
|
|
|
|
2024-03-27 14:44:40 +00:00
|
|
|
LIBAWT_CFLAGS := -D__MEDIALIB_OLD_NAMES -D__USE_J2D_NAMES -DMLIB_NO_LIBSUNMATH
|
2013-10-16 18:24:46 +00:00
|
|
|
|
2019-02-07 11:35:45 +00:00
|
|
|
ifeq ($(call isTargetOs, windows), true)
|
2013-10-16 18:24:46 +00:00
|
|
|
LIBAWT_CFLAGS += -EHsc -DUNICODE -D_UNICODE
|
2019-02-07 11:35:45 +00:00
|
|
|
ifeq ($(call isTargetCpuBits, 64), true)
|
2013-10-16 18:24:46 +00:00
|
|
|
LIBAWT_CFLAGS += -DMLIB_OS64BIT
|
|
|
|
endif
|
|
|
|
|
2020-07-01 20:39:58 +00:00
|
|
|
LIBAWT_RCFLAGS ?= -I$(TOPDIR)/src/java.base/windows/native/launcher/icons
|
2024-03-27 14:44:40 +00:00
|
|
|
LIBAWT_VERSIONINFO_RESOURCE := \
|
|
|
|
$(TOPDIR)/src/$(MODULE)/windows/native/libawt/windows/awt.rc
|
2016-02-05 14:23:15 +00:00
|
|
|
endif
|
|
|
|
|
2024-03-27 14:44:40 +00:00
|
|
|
# -fgcse-after-reload improves performance of MaskFill in Java2D by 20% for
|
|
|
|
# some gcc
|
2018-03-15 00:20:47 +00:00
|
|
|
$(eval $(call SetupJdkLibrary, BUILD_LIBAWT, \
|
2018-02-28 20:16:11 +00:00
|
|
|
NAME := awt, \
|
2018-06-08 16:11:32 +00:00
|
|
|
EXTRA_SRC := $(LIBAWT_EXTRA_SRC), \
|
2024-03-27 14:44:40 +00:00
|
|
|
EXCLUDE_FILES := $(LIBAWT_EXCLUDE_FILES), \
|
2021-05-13 23:41:56 +00:00
|
|
|
OPTIMIZATION := HIGHEST, \
|
2024-03-27 14:44:40 +00:00
|
|
|
CFLAGS := $(LIBAWT_CFLAGS) $(X_CFLAGS), \
|
|
|
|
CXXFLAGS := $(LIBAWT_CFLAGS) $(X_CFLAGS), \
|
|
|
|
CFLAGS_gcc := -fgcse-after-reload, \
|
2018-06-08 16:11:32 +00:00
|
|
|
EXTRA_HEADER_DIRS := $(LIBAWT_EXTRA_HEADER_DIRS), \
|
2022-10-24 09:50:58 +00:00
|
|
|
DISABLED_WARNINGS_gcc_awt_LoadLibrary.c := unused-result, \
|
2023-04-18 12:55:14 +00:00
|
|
|
DISABLED_WARNINGS_gcc_debug_mem.c := format-nonliteral, \
|
2022-10-24 09:50:58 +00:00
|
|
|
DISABLED_WARNINGS_gcc_ProcessPath.c := maybe-uninitialized, \
|
|
|
|
DISABLED_WARNINGS_gcc_Region.c := maybe-uninitialized, \
|
|
|
|
DISABLED_WARNINGS_gcc_SurfaceData.c := unused-value, \
|
|
|
|
DISABLED_WARNINGS_gcc_TransformHelper.c := sign-compare, \
|
2023-04-18 09:43:08 +00:00
|
|
|
DISABLED_WARNINGS_clang_awt_ImagingLib.c := deprecated-non-prototype, \
|
2022-10-24 09:50:58 +00:00
|
|
|
DISABLED_WARNINGS_clang_debug_trace.c := format-nonliteral, \
|
|
|
|
DISABLED_WARNINGS_clang_Trace.c := format-nonliteral, \
|
|
|
|
DISABLED_WARNINGS_clang_TransformHelper.c := sign-compare, \
|
|
|
|
DISABLED_WARNINGS_microsoft := 4244 4996, \
|
|
|
|
DISABLED_WARNINGS_microsoft_awt_Toolkit.cpp := 4267, \
|
2024-03-27 14:44:40 +00:00
|
|
|
LDFLAGS_windows := -delayload:comctl32.dll -delayload:comdlg32.dll \
|
|
|
|
-delayload:gdi32.dll -delayload:imm32.dll -delayload:ole32.dll \
|
|
|
|
-delayload:shell32.dll -delayload:shlwapi.dll -delayload:user32.dll \
|
|
|
|
-delayload:winmm.dll -delayload:winspool.drv, \
|
2024-04-11 09:40:12 +00:00
|
|
|
JDK_LIBS := java.base:libjava java.base:libjvm, \
|
2024-03-27 14:44:40 +00:00
|
|
|
LIBS_unix := $(LIBM), \
|
|
|
|
LIBS_linux := $(LIBDL), \
|
2015-10-29 15:31:00 +00:00
|
|
|
LIBS_aix := $(LIBDL),\
|
2024-03-27 14:44:40 +00:00
|
|
|
LIBS_macosx := \
|
|
|
|
-framework ApplicationServices \
|
|
|
|
-framework AudioToolbox \
|
2013-10-16 18:24:46 +00:00
|
|
|
-framework Cocoa \
|
|
|
|
-framework JavaRuntimeSupport \
|
2024-03-27 14:44:40 +00:00
|
|
|
-framework Metal \
|
|
|
|
-framework OpenGL, \
|
|
|
|
LIBS_windows := advapi32.lib comctl32.lib comdlg32.lib delayimp.lib \
|
|
|
|
gdi32.lib imm32.lib kernel32.lib ole32.lib shell32.lib shlwapi.lib \
|
|
|
|
user32.lib uuid.lib winmm.lib winspool.lib, \
|
2013-10-16 18:24:46 +00:00
|
|
|
VERSIONINFO_RESOURCE := $(LIBAWT_VERSIONINFO_RESOURCE), \
|
2020-07-01 20:39:58 +00:00
|
|
|
EXTRA_RCFLAGS := $(LIBAWT_RCFLAGS), \
|
2016-01-20 08:54:13 +00:00
|
|
|
))
|
2013-10-16 18:24:46 +00:00
|
|
|
|
2014-12-03 14:22:58 +00:00
|
|
|
TARGETS += $(BUILD_LIBAWT)
|
2013-10-16 18:24:46 +00:00
|
|
|
|
2024-03-27 14:44:40 +00:00
|
|
|
ifeq ($(call isTargetOs, windows macosx)+$(ENABLE_HEADLESS_ONLY), false+false)
|
|
|
|
##############################################################################
|
|
|
|
## Build libawt_xawt
|
|
|
|
##############################################################################
|
2013-10-16 18:24:46 +00:00
|
|
|
|
2024-03-27 14:44:40 +00:00
|
|
|
LIBAWT_XAWT_EXTRA_SRC := \
|
|
|
|
common/awt \
|
|
|
|
common/java2d \
|
|
|
|
common/font \
|
|
|
|
#
|
2014-08-17 14:54:13 +00:00
|
|
|
|
2024-03-27 14:44:40 +00:00
|
|
|
LIBAWT_XAWT_EXTRA_HEADER_DIRS := \
|
|
|
|
$(LIBAWT_DEFAULT_HEADER_DIRS) \
|
|
|
|
libawt_xawt/awt \
|
|
|
|
include \
|
|
|
|
common/awt/debug \
|
|
|
|
common/awt/systemscale \
|
|
|
|
common/font \
|
|
|
|
common/java2d/opengl \
|
|
|
|
common/java2d/x11 \
|
|
|
|
libpipewire/include \
|
2024-04-11 09:40:12 +00:00
|
|
|
java.base:libjvm \
|
2024-03-27 14:44:40 +00:00
|
|
|
#
|
2023-06-07 13:08:11 +00:00
|
|
|
|
2024-03-27 14:44:40 +00:00
|
|
|
ifeq ($(call isTargetOs, linux), true)
|
|
|
|
ifeq ($(DISABLE_XRENDER), true)
|
|
|
|
LIBAWT_XAWT_CFLAGS += -DDISABLE_XRENDER_BY_DEFAULT=true
|
2013-10-16 18:24:46 +00:00
|
|
|
endif
|
2024-03-27 14:44:40 +00:00
|
|
|
endif
|
2013-10-16 18:24:46 +00:00
|
|
|
|
2024-03-27 14:44:40 +00:00
|
|
|
# These are the object files provided by the awt native
|
|
|
|
# library. Do not include these external (non-awt_xawt library)
|
|
|
|
# objects in the static library. When statically linking the java
|
|
|
|
# launcher with all JDK and VM static libraries, we use the
|
|
|
|
# --whole-archive linker option. The duplicate objects in different
|
|
|
|
# static libraries cause linking errors due to duplicate symbols.
|
|
|
|
LIBAWT_XAWT_STATIC_EXCLUDE_OBJS := systemScale.o
|
2013-10-16 18:24:46 +00:00
|
|
|
|
2024-03-27 14:44:40 +00:00
|
|
|
$(eval $(call SetupJdkLibrary, BUILD_LIBAWT_XAWT, \
|
|
|
|
NAME := awt_xawt, \
|
|
|
|
EXTRA_SRC := $(LIBAWT_XAWT_EXTRA_SRC), \
|
|
|
|
EXTRA_HEADER_DIRS := $(LIBAWT_XAWT_EXTRA_HEADER_DIRS), \
|
|
|
|
EXCLUDES := medialib debug, \
|
|
|
|
OPTIMIZATION := LOW, \
|
|
|
|
CFLAGS := -DXAWT -DXAWT_HACK $(LIBAWT_XAWT_CFLAGS) \
|
|
|
|
$(FONTCONFIG_CFLAGS) $(CUPS_CFLAGS) $(X_CFLAGS), \
|
|
|
|
DISABLED_WARNINGS_gcc := int-to-pointer-cast, \
|
|
|
|
DISABLED_WARNINGS_gcc_awt_Taskbar.c := parentheses, \
|
|
|
|
DISABLED_WARNINGS_gcc_GLXSurfaceData.c := unused-function, \
|
|
|
|
DISABLED_WARNINGS_gcc_gtk2_interface.c := parentheses type-limits, \
|
|
|
|
DISABLED_WARNINGS_gcc_gtk3_interface.c := parentheses type-limits \
|
|
|
|
unused-function, \
|
|
|
|
DISABLED_WARNINGS_gcc_OGLBufImgOps.c := format-nonliteral, \
|
|
|
|
DISABLED_WARNINGS_gcc_OGLPaints.c := format-nonliteral, \
|
|
|
|
DISABLED_WARNINGS_gcc_screencast_pipewire.c := undef, \
|
|
|
|
DISABLED_WARNINGS_gcc_screencast_portal.c := undef, \
|
|
|
|
DISABLED_WARNINGS_gcc_sun_awt_X11_GtkFileDialogPeer.c := parentheses, \
|
|
|
|
DISABLED_WARNINGS_gcc_X11SurfaceData.c := implicit-fallthrough \
|
|
|
|
pointer-to-int-cast, \
|
|
|
|
DISABLED_WARNINGS_gcc_XlibWrapper.c := type-limits pointer-to-int-cast, \
|
|
|
|
DISABLED_WARNINGS_gcc_XRBackendNative.c := maybe-uninitialized, \
|
|
|
|
DISABLED_WARNINGS_gcc_XToolkit.c := unused-result, \
|
|
|
|
DISABLED_WARNINGS_gcc_XWindow.c := unused-function, \
|
|
|
|
DISABLED_WARNINGS_clang_awt_Taskbar.c := parentheses, \
|
|
|
|
DISABLED_WARNINGS_clang_gtk2_interface.c := parentheses, \
|
|
|
|
DISABLED_WARNINGS_clang_gtk3_interface.c := parentheses, \
|
|
|
|
DISABLED_WARNINGS_clang_OGLBufImgOps.c := format-nonliteral, \
|
|
|
|
DISABLED_WARNINGS_clang_OGLPaints.c := format-nonliteral, \
|
|
|
|
DISABLED_WARNINGS_clang_screencast_pipewire.c := format-nonliteral, \
|
|
|
|
DISABLED_WARNINGS_clang_sun_awt_X11_GtkFileDialogPeer.c := parentheses, \
|
|
|
|
DISABLED_WARNINGS_clang_aix := deprecated-non-prototype, \
|
|
|
|
DISABLED_WARNINGS_clang_aix_awt_Taskbar.c := parentheses, \
|
|
|
|
DISABLED_WARNINGS_clang_aix_OGLPaints.c := format-nonliteral, \
|
|
|
|
DISABLED_WARNINGS_clang_aix_OGLBufImgOps.c := format-nonliteral, \
|
|
|
|
DISABLED_WARNINGS_clang_aix_gtk2_interface.c := parentheses \
|
|
|
|
logical-op-parentheses, \
|
|
|
|
DISABLED_WARNINGS_clang_aix_gtk3_interface.c := parentheses \
|
|
|
|
logical-op-parentheses, \
|
|
|
|
DISABLED_WARNINGS_clang_aix_sun_awt_X11_GtkFileDialogPeer.c := \
|
|
|
|
parentheses, \
|
|
|
|
DISABLED_WARNINGS_clang_aix_awt_InputMethod.c := sign-compare, \
|
2024-04-11 09:40:12 +00:00
|
|
|
JDK_LIBS := libawt java.base:libjava, \
|
2024-03-27 14:44:40 +00:00
|
|
|
LIBS_unix := $(LIBDL) $(LIBM) $(X_LIBS) -lX11 -lXext -lXi -lXrender \
|
|
|
|
-lXtst, \
|
|
|
|
LIBS_linux := -lpthread, \
|
|
|
|
STATIC_LIB_EXCLUDE_OBJS := $(LIBAWT_XAWT_STATIC_EXCLUDE_OBJS), \
|
|
|
|
))
|
2013-10-16 18:24:46 +00:00
|
|
|
|
2024-03-27 14:44:40 +00:00
|
|
|
TARGETS += $(BUILD_LIBAWT_XAWT)
|
2013-10-16 18:24:46 +00:00
|
|
|
endif
|
|
|
|
|
2014-08-21 09:05:35 +00:00
|
|
|
################################################################################
|
2024-03-27 14:44:40 +00:00
|
|
|
## Build liblcms
|
|
|
|
################################################################################
|
2014-04-29 19:46:16 +00:00
|
|
|
|
|
|
|
ifeq ($(USE_EXTERNAL_LCMS), true)
|
|
|
|
# If we're using an external library, we'll just need the wrapper part.
|
2016-12-02 15:18:10 +00:00
|
|
|
# By including it explicitly, all other files will be excluded.
|
2024-03-27 14:44:40 +00:00
|
|
|
LIBLCMS_INCLUDE_FILES := LCMS.c
|
2018-06-08 16:11:32 +00:00
|
|
|
# If we're using an external library, we can't include our own SRC path
|
|
|
|
# as includes, instead the system headers should be used.
|
|
|
|
LIBLCMS_HEADERS_FROM_SRC := false
|
2024-03-27 14:44:40 +00:00
|
|
|
# FIXME: Keep old behavior and reset LCMS_CFLAGS. This is likely a bug.
|
|
|
|
LCMS_CFLAGS :=
|
2014-04-29 19:46:16 +00:00
|
|
|
endif
|
|
|
|
|
2024-03-27 14:44:40 +00:00
|
|
|
ifeq ($(TOOLCHAIN_TYPE)+$(TOOLCHAIN_VERSION), clang+10.1)
|
|
|
|
# Work around an optimizer bug seen with Xcode 10.1, but fixed by 10.3
|
|
|
|
BUILD_LIBLCMS_cmsopt.c_CFLAGS := -O0
|
2020-02-12 20:18:46 +00:00
|
|
|
endif
|
|
|
|
|
2024-03-27 14:44:40 +00:00
|
|
|
# We use CMS_DONT_USE_FAST_FLOOR and CMS_NO_HALF_SUPPORT since the fast floor
|
|
|
|
# code loses precision.
|
2018-03-15 00:20:47 +00:00
|
|
|
$(eval $(call SetupJdkLibrary, BUILD_LIBLCMS, \
|
2018-02-28 20:16:11 +00:00
|
|
|
NAME := lcms, \
|
2024-03-27 14:44:40 +00:00
|
|
|
INCLUDE_FILES := $(LIBLCMS_INCLUDE_FILES), \
|
2013-10-16 18:24:46 +00:00
|
|
|
OPTIMIZATION := HIGHEST, \
|
2024-03-27 14:44:40 +00:00
|
|
|
CFLAGS := -DCMS_DONT_USE_FAST_FLOOR -DCMS_NO_HALF_SUPPORT $(LCMS_CFLAGS), \
|
2013-10-16 18:24:46 +00:00
|
|
|
CFLAGS_windows := -DCMS_IS_WINDOWS_, \
|
2018-06-08 16:11:32 +00:00
|
|
|
EXTRA_HEADER_DIRS := \
|
|
|
|
common/awt/debug \
|
2024-04-11 09:40:12 +00:00
|
|
|
libawt/java2d \
|
|
|
|
java.base:libjvm, \
|
2018-06-08 16:11:32 +00:00
|
|
|
HEADERS_FROM_SRC := $(LIBLCMS_HEADERS_FROM_SRC), \
|
2024-03-27 14:44:40 +00:00
|
|
|
DISABLED_WARNINGS_gcc := format-nonliteral type-limits \
|
|
|
|
stringop-truncation, \
|
2022-10-24 09:50:58 +00:00
|
|
|
DISABLED_WARNINGS_clang := format-nonliteral, \
|
2024-04-11 09:40:12 +00:00
|
|
|
JDK_LIBS := libawt java.base:libjava, \
|
2024-03-27 14:44:40 +00:00
|
|
|
LIBS_unix := $(LCMS_LIBS) $(LIBM), \
|
2016-01-20 08:54:13 +00:00
|
|
|
))
|
2013-10-16 18:24:46 +00:00
|
|
|
|
2014-12-03 14:22:58 +00:00
|
|
|
TARGETS += $(BUILD_LIBLCMS)
|
2013-10-16 18:24:46 +00:00
|
|
|
|
2014-08-21 09:05:35 +00:00
|
|
|
################################################################################
|
2024-03-27 14:44:40 +00:00
|
|
|
## Build libjavajpeg
|
|
|
|
################################################################################
|
2013-10-16 18:24:46 +00:00
|
|
|
|
2014-05-23 15:04:37 +00:00
|
|
|
ifeq ($(USE_EXTERNAL_LIBJPEG), true)
|
2024-03-27 14:44:40 +00:00
|
|
|
LIBJAVAJPEG_INCLUDE_FILES := \
|
2015-11-06 22:27:27 +00:00
|
|
|
imageioJPEG.c \
|
2014-05-23 15:04:37 +00:00
|
|
|
jpegdecoder.c
|
2018-06-08 16:11:32 +00:00
|
|
|
# If we're using an external library, we can't include our own SRC path
|
|
|
|
# as includes, instead the system headers should be used.
|
2024-03-27 14:44:40 +00:00
|
|
|
LIBJAVAJPEG_HEADERS_FROM_SRC := false
|
2014-05-23 15:04:37 +00:00
|
|
|
endif
|
|
|
|
|
2024-03-27 14:44:40 +00:00
|
|
|
# "DISABLED_WARNINGS_gcc := clobbered" rationale:
|
|
|
|
# Suppress gcc warnings like "variable might be clobbered by 'longjmp'
|
|
|
|
# or 'vfork'": this warning indicates that some variable is placed to
|
|
|
|
# a register by optimized compiler and it's value might be lost on longjmp().
|
|
|
|
# Recommended way to avoid such warning is to declare the variable as
|
|
|
|
# volatile to prevent the optimization. However, this approach does not
|
|
|
|
# work because we have to declare all variables as volatile in result.
|
2018-03-15 00:20:47 +00:00
|
|
|
$(eval $(call SetupJdkLibrary, BUILD_LIBJAVAJPEG, \
|
2018-02-28 20:16:11 +00:00
|
|
|
NAME := javajpeg, \
|
2024-03-27 14:44:40 +00:00
|
|
|
INCLUDE_FILES := $(LIBJAVAJPEG_INCLUDE_FILES), \
|
2013-10-16 18:24:46 +00:00
|
|
|
OPTIMIZATION := HIGHEST, \
|
2024-03-27 14:44:40 +00:00
|
|
|
HEADERS_FROM_SRC := $(LIBJAVAJPEG_HEADERS_FROM_SRC), \
|
2022-10-24 09:50:58 +00:00
|
|
|
DISABLED_WARNINGS_gcc_imageioJPEG.c := clobbered array-bounds, \
|
|
|
|
DISABLED_WARNINGS_gcc_jcmaster.c := implicit-fallthrough, \
|
|
|
|
DISABLED_WARNINGS_gcc_jdphuff.c := shift-negative-value, \
|
2024-04-11 09:40:12 +00:00
|
|
|
JDK_LIBS := java.base:libjava, \
|
2024-03-27 14:44:40 +00:00
|
|
|
LIBS := $(LIBJPEG_LIBS), \
|
2016-01-20 08:54:13 +00:00
|
|
|
))
|
2013-10-16 18:24:46 +00:00
|
|
|
|
2014-12-03 14:22:58 +00:00
|
|
|
TARGETS += $(BUILD_LIBJAVAJPEG)
|
2013-10-16 18:24:46 +00:00
|
|
|
|
|
|
|
|
2016-09-26 12:56:35 +00:00
|
|
|
# Mac and Windows only use the native AWT lib, do not build libawt_headless
|
2019-02-07 11:35:45 +00:00
|
|
|
ifeq ($(call isTargetOs, windows macosx), false)
|
2024-03-27 14:44:40 +00:00
|
|
|
##############################################################################
|
|
|
|
## Build libawt_headless
|
|
|
|
##############################################################################
|
2015-02-03 17:28:21 +00:00
|
|
|
|
2018-06-08 16:11:32 +00:00
|
|
|
LIBAWT_HEADLESS_EXTRA_SRC := \
|
|
|
|
common/font \
|
|
|
|
common/java2d \
|
|
|
|
$(TOPDIR)/src/$(MODULE)/$(OPENJDK_TARGET_OS_TYPE)/native/common/awt \
|
2016-09-26 12:56:35 +00:00
|
|
|
#
|
2015-02-03 17:28:21 +00:00
|
|
|
|
2018-06-08 16:11:32 +00:00
|
|
|
LIBAWT_HEADLESS_EXTRA_HEADER_DIRS := \
|
|
|
|
$(LIBAWT_DEFAULT_HEADER_DIRS) \
|
|
|
|
common/awt/debug \
|
|
|
|
common/font \
|
|
|
|
common/java2d/opengl \
|
2024-04-11 09:40:12 +00:00
|
|
|
java.base:libjvm \
|
2016-09-26 12:56:35 +00:00
|
|
|
#
|
2015-02-03 17:28:21 +00:00
|
|
|
|
2023-06-12 16:22:24 +00:00
|
|
|
# These are the object files provided by the awt native
|
|
|
|
# library. Do not include these external (non-awt_headless library)
|
|
|
|
# objects in the static library. When statically linking the java
|
|
|
|
# launcher with all JDK and VM static libraries, we use the
|
|
|
|
# --whole-archive linker option. The duplicate objects in different
|
|
|
|
# static libraries cause linking errors due to duplicate symbols.
|
|
|
|
LIBAWT_HEADLESS_STATIC_EXCLUDE_OBJS := systemScale.o
|
|
|
|
|
2018-03-15 00:20:47 +00:00
|
|
|
$(eval $(call SetupJdkLibrary, BUILD_LIBAWT_HEADLESS, \
|
2018-02-28 20:16:11 +00:00
|
|
|
NAME := awt_headless, \
|
2018-06-08 16:11:32 +00:00
|
|
|
EXTRA_SRC := $(LIBAWT_HEADLESS_EXTRA_SRC), \
|
2024-03-27 14:44:40 +00:00
|
|
|
EXCLUDES := medialib, \
|
2016-09-26 12:56:35 +00:00
|
|
|
OPTIMIZATION := LOW, \
|
2024-03-27 14:44:40 +00:00
|
|
|
CFLAGS := -DHEADLESS=true $(CUPS_CFLAGS) $(FONTCONFIG_CFLAGS) \
|
|
|
|
$(X_CFLAGS), \
|
2018-06-08 16:11:32 +00:00
|
|
|
EXTRA_HEADER_DIRS := $(LIBAWT_HEADLESS_EXTRA_HEADER_DIRS), \
|
2022-10-24 09:50:58 +00:00
|
|
|
DISABLED_WARNINGS_gcc_X11Renderer.c := unused-function, \
|
|
|
|
DISABLED_WARNINGS_gcc_X11SurfaceData.c := unused-function, \
|
2024-04-11 09:40:12 +00:00
|
|
|
JDK_LIBS := libawt java.base:libjava, \
|
2024-03-27 14:44:40 +00:00
|
|
|
LIBS_linux := $(LIBDL) $(LIBM), \
|
2023-06-12 16:22:24 +00:00
|
|
|
STATIC_LIB_EXCLUDE_OBJS := $(LIBAWT_HEADLESS_STATIC_EXCLUDE_OBJS), \
|
2016-09-26 12:56:35 +00:00
|
|
|
))
|
2015-02-03 17:28:21 +00:00
|
|
|
|
2016-09-26 12:56:35 +00:00
|
|
|
TARGETS += $(BUILD_LIBAWT_HEADLESS)
|
2015-02-03 17:28:21 +00:00
|
|
|
endif
|
|
|
|
|
2024-03-27 14:44:40 +00:00
|
|
|
################################################################################
|
|
|
|
## Build libfreetype
|
2015-02-03 17:28:21 +00:00
|
|
|
################################################################################
|
|
|
|
|
2024-03-27 14:44:40 +00:00
|
|
|
ifeq ($(FREETYPE_TO_USE), bundled)
|
|
|
|
# freetype requires you to manually define DLL_EXPORT for windows (see ftconfig.h)
|
2018-03-15 00:20:47 +00:00
|
|
|
$(eval $(call SetupJdkLibrary, BUILD_LIBFREETYPE, \
|
2018-03-12 20:53:20 +00:00
|
|
|
NAME := freetype, \
|
|
|
|
OPTIMIZATION := HIGHEST, \
|
2024-03-27 14:44:40 +00:00
|
|
|
CFLAGS := -DFT2_BUILD_LIBRARY, \
|
|
|
|
CFLAGS_windows := -DDLL_EXPORT, \
|
|
|
|
EXTRA_HEADER_DIRS := libfreetype/include, \
|
2022-10-24 09:50:58 +00:00
|
|
|
DISABLED_WARNINGS_microsoft := 4267 4244 4996, \
|
2023-01-21 12:05:35 +00:00
|
|
|
DISABLED_WARNINGS_gcc := dangling-pointer stringop-overflow, \
|
2018-03-12 20:53:20 +00:00
|
|
|
))
|
|
|
|
|
|
|
|
TARGETS += $(BUILD_LIBFREETYPE)
|
|
|
|
endif
|
|
|
|
|
2024-03-27 14:44:40 +00:00
|
|
|
################################################################################
|
|
|
|
## Build libfontmanager
|
|
|
|
################################################################################
|
2021-03-16 19:36:04 +00:00
|
|
|
|
2020-08-04 19:20:37 +00:00
|
|
|
ifeq ($(USE_EXTERNAL_HARFBUZZ), true)
|
2021-03-16 19:36:04 +00:00
|
|
|
LIBFONTMANAGER_EXTRA_SRC =
|
2024-03-27 14:44:40 +00:00
|
|
|
LIBFONTMANAGER_LIBS += $(HARFBUZZ_LIBS)
|
2020-08-04 19:20:37 +00:00
|
|
|
else
|
2021-03-16 19:36:04 +00:00
|
|
|
LIBFONTMANAGER_EXTRA_SRC = libharfbuzz
|
|
|
|
|
|
|
|
ifeq ($(call isTargetOs, windows), false)
|
|
|
|
HARFBUZZ_CFLAGS += -DGETPAGESIZE -DHAVE_MPROTECT -DHAVE_PTHREAD \
|
2024-03-27 14:44:40 +00:00
|
|
|
-DHAVE_SYSCONF -DHAVE_SYS_MMAN_H -DHAVE_UNISTD_H \
|
|
|
|
-DHB_NO_PRAGMA_GCC_DIAGNOSTIC
|
2021-03-16 19:36:04 +00:00
|
|
|
endif
|
|
|
|
ifeq ($(call isTargetOs, linux macosx), true)
|
2023-03-14 20:18:44 +00:00
|
|
|
HARFBUZZ_CFLAGS += -DHAVE_INTEL_ATOMIC_PRIMITIVES -DHB_NO_VISIBILITY
|
2021-03-16 19:36:04 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
# hb-ft.cc is not presently needed, and requires freetype 2.4.2 or later.
|
2024-03-27 14:44:40 +00:00
|
|
|
# hb-subset and hb-style APIs are not needed, excluded to cut on compilation
|
|
|
|
# time.
|
|
|
|
LIBFONTMANAGER_EXCLUDE_FILES += gsubgpos-context.cc hb-ft.cc hb-style.cc \
|
|
|
|
hb-subset-cff-common.cc hb-subset-cff1.cc hb-subset-cff2.cc \
|
|
|
|
hb-subset-input.cc hb-subset-instancer-solver.cc hb-subset-plan.cc \
|
|
|
|
hb-subset.cc
|
|
|
|
|
|
|
|
# list of disabled warnings and the compilers for which it was specifically
|
|
|
|
# added.
|
2023-10-31 19:01:15 +00:00
|
|
|
# array-bounds -> GCC 12 on Alpine Linux
|
|
|
|
# parentheses -> GCC 6
|
|
|
|
# range-loop-analysis -> clang on Xcode12
|
|
|
|
|
2024-03-27 14:44:40 +00:00
|
|
|
HARFBUZZ_DISABLED_WARNINGS_gcc := missing-field-initializers \
|
|
|
|
strict-aliasing unused-result array-bounds parentheses
|
2023-04-01 14:36:52 +00:00
|
|
|
# noexcept-type required for GCC 7 builds. Not required for GCC 8+.
|
2023-05-08 13:56:45 +00:00
|
|
|
# expansion-to-defined required for GCC 9 builds. Not required for GCC 10+.
|
2023-11-03 03:49:37 +00:00
|
|
|
# maybe-uninitialized required for GCC 8 builds. Not required for GCC 9+.
|
2024-03-27 14:44:40 +00:00
|
|
|
# calloc-transposed-args required for GCC 14 builds. (fixed upstream in
|
|
|
|
# Harfbuzz 032c931e1c0cfb20f18e5acb8ba005775242bd92)
|
2023-11-03 03:49:37 +00:00
|
|
|
HARFBUZZ_DISABLED_WARNINGS_CXX_gcc := class-memaccess noexcept-type \
|
2024-02-22 06:27:25 +00:00
|
|
|
expansion-to-defined dangling-reference maybe-uninitialized \
|
|
|
|
calloc-transposed-args
|
2024-03-27 14:44:40 +00:00
|
|
|
HARFBUZZ_DISABLED_WARNINGS_clang := missing-field-initializers \
|
|
|
|
range-loop-analysis
|
2022-10-24 09:50:58 +00:00
|
|
|
HARFBUZZ_DISABLED_WARNINGS_microsoft := 4267 4244
|
2020-07-22 14:46:50 +00:00
|
|
|
|
2021-03-16 19:36:04 +00:00
|
|
|
LIBFONTMANAGER_CFLAGS += $(HARFBUZZ_CFLAGS)
|
2020-08-04 19:20:37 +00:00
|
|
|
endif
|
2020-07-22 14:46:50 +00:00
|
|
|
|
2018-06-08 16:11:32 +00:00
|
|
|
LIBFONTMANAGER_EXTRA_HEADER_DIRS := \
|
|
|
|
common/awt \
|
2022-10-25 09:45:33 +00:00
|
|
|
common/awt/utility \
|
2018-06-08 16:11:32 +00:00
|
|
|
common/font \
|
|
|
|
libawt/java2d \
|
|
|
|
libawt/java2d/pipe \
|
|
|
|
libawt/java2d/loops \
|
|
|
|
#
|
|
|
|
|
2024-03-27 14:44:40 +00:00
|
|
|
ifeq ($(FREETYPE_TO_USE), system)
|
|
|
|
LIBFONTMANAGER_CFLAGS += $(FREETYPE_CFLAGS)
|
|
|
|
LIBFONTMANAGER_LIBS += $(FREETYPE_LIBS)
|
|
|
|
else
|
|
|
|
LIBFONTMANAGER_EXTRA_HEADER_DIRS += libfreetype/include
|
2024-04-11 09:40:12 +00:00
|
|
|
LIBFONTMANAGER_JDK_LIBS += libfreetype
|
2024-03-27 14:44:40 +00:00
|
|
|
endif
|
2013-10-16 18:24:46 +00:00
|
|
|
|
2021-03-16 19:36:04 +00:00
|
|
|
LIBFONTMANAGER_OPTIMIZATION := HIGHEST
|
2013-10-16 18:24:46 +00:00
|
|
|
|
2022-03-24 09:49:33 +00:00
|
|
|
ifneq ($(filter $(TOOLCHAIN_TYPE), gcc clang), )
|
|
|
|
# gcc (and to an extent clang) is particularly bad at optimizing these files,
|
|
|
|
# causing a massive spike in compile time. We don't care about these
|
|
|
|
# particular files anyway, so lower optimization level.
|
|
|
|
BUILD_LIBFONTMANAGER_hb-subset.cc_OPTIMIZATION := SIZE
|
|
|
|
BUILD_LIBFONTMANAGER_hb-subset-plan.cc_OPTIMIZATION := SIZE
|
|
|
|
endif
|
|
|
|
|
2019-02-07 11:35:45 +00:00
|
|
|
ifeq ($(call isTargetOs, windows), true)
|
2024-03-27 14:44:40 +00:00
|
|
|
LIBFONTMANAGER_EXCLUDE_FILES += X11FontScaler.c X11TextRenderer.c
|
2013-10-16 18:24:46 +00:00
|
|
|
LIBFONTMANAGER_OPTIMIZATION := HIGHEST
|
2019-02-07 11:35:45 +00:00
|
|
|
else ifeq ($(call isTargetOs, macosx), true)
|
2024-03-27 14:44:40 +00:00
|
|
|
LIBFONTMANAGER_EXCLUDE_FILES += X11FontScaler.c X11TextRenderer.c \
|
|
|
|
fontpath.c lcdglyph.c
|
2013-10-16 18:24:46 +00:00
|
|
|
else
|
2024-03-27 14:44:40 +00:00
|
|
|
LIBFONTMANAGER_EXCLUDE_FILES += fontpath.c lcdglyph.c
|
2013-10-16 18:24:46 +00:00
|
|
|
endif
|
|
|
|
|
2018-06-08 16:11:32 +00:00
|
|
|
LIBFONTMANAGER_CFLAGS += $(X_CFLAGS) -DLE_STANDALONE -DHEADLESS
|
2013-10-16 18:24:46 +00:00
|
|
|
|
2018-04-09 11:28:47 +00:00
|
|
|
# LDFLAGS clarification:
|
|
|
|
# Filter relevant linker flags disallowing unresolved symbols as we cannot
|
|
|
|
# build-time decide to which library to link against (libawt_headless or
|
|
|
|
# libawt_xawt). See JDK-8196516 for details.
|
2018-03-15 00:20:47 +00:00
|
|
|
$(eval $(call SetupJdkLibrary, BUILD_LIBFONTMANAGER, \
|
2018-02-28 20:16:11 +00:00
|
|
|
NAME := fontmanager, \
|
2024-02-27 11:14:11 +00:00
|
|
|
LINK_TYPE := C++, \
|
2013-10-16 18:24:46 +00:00
|
|
|
EXCLUDE_FILES := $(LIBFONTMANAGER_EXCLUDE_FILES) \
|
|
|
|
AccelGlyphCache.c, \
|
2024-03-15 14:36:57 +00:00
|
|
|
CFLAGS := $(LIBFONTMANAGER_CFLAGS), \
|
|
|
|
CXXFLAGS := $(LIBFONTMANAGER_CFLAGS), \
|
2013-10-16 18:24:46 +00:00
|
|
|
OPTIMIZATION := $(LIBFONTMANAGER_OPTIMIZATION), \
|
2014-08-17 14:54:13 +00:00
|
|
|
CFLAGS_windows = -DCC_NOEX, \
|
2018-06-08 16:11:32 +00:00
|
|
|
EXTRA_HEADER_DIRS := $(LIBFONTMANAGER_EXTRA_HEADER_DIRS), \
|
2021-03-16 19:36:04 +00:00
|
|
|
EXTRA_SRC := $(LIBFONTMANAGER_EXTRA_SRC), \
|
|
|
|
DISABLED_WARNINGS_gcc := $(HARFBUZZ_DISABLED_WARNINGS_gcc), \
|
|
|
|
DISABLED_WARNINGS_CXX_gcc := $(HARFBUZZ_DISABLED_WARNINGS_CXX_gcc), \
|
|
|
|
DISABLED_WARNINGS_clang := $(HARFBUZZ_DISABLED_WARNINGS_clang), \
|
|
|
|
DISABLED_WARNINGS_microsoft := $(HARFBUZZ_DISABLED_WARNINGS_microsoft), \
|
2024-03-18 14:41:51 +00:00
|
|
|
LDFLAGS := $(LDFLAGS_CXX_JDK), \
|
|
|
|
LDFLAGS_FILTER_OUT :=-Wl$(COMMA)-z$(COMMA)defs, \
|
2018-04-16 14:43:26 +00:00
|
|
|
LDFLAGS_aix := -Wl$(COMMA)-berok, \
|
2024-04-11 09:40:12 +00:00
|
|
|
JDK_LIBS := libawt java.base:libjava $(LIBFONTMANAGER_JDK_LIBS), \
|
|
|
|
JDK_LIBS_macosx := libawt_lwawt, \
|
2024-03-27 14:44:40 +00:00
|
|
|
LIBS := $(LIBFONTMANAGER_LIBS), \
|
|
|
|
LIBS_unix := $(LIBM), \
|
|
|
|
LIBS_macosx := \
|
|
|
|
-framework CoreFoundation \
|
|
|
|
-framework CoreGraphics \
|
|
|
|
-framework CoreText, \
|
|
|
|
LIBS_windows := advapi32.lib gdi32.lib user32.lib, \
|
2016-01-20 08:54:13 +00:00
|
|
|
))
|
2013-10-16 18:24:46 +00:00
|
|
|
|
2017-12-01 17:46:36 +00:00
|
|
|
TARGETS += $(BUILD_LIBFONTMANAGER)
|
2013-10-16 18:24:46 +00:00
|
|
|
|
2024-03-27 14:44:40 +00:00
|
|
|
################################################################################
|
|
|
|
## Build libjawt
|
2014-08-21 09:05:35 +00:00
|
|
|
################################################################################
|
2013-10-16 18:24:46 +00:00
|
|
|
|
2024-03-27 14:44:40 +00:00
|
|
|
LIBJAWT_EXTRA_HEADER_DIRS := \
|
|
|
|
include \
|
2024-04-11 09:40:12 +00:00
|
|
|
java.base:libjava \
|
2024-03-27 14:44:40 +00:00
|
|
|
#
|
2018-06-08 16:11:32 +00:00
|
|
|
|
2024-03-27 14:44:40 +00:00
|
|
|
ifeq ($(call isTargetOs, windows), true)
|
|
|
|
LIBJAWT_EXTRA_HEADER_DIRS += \
|
2018-06-08 16:11:32 +00:00
|
|
|
common/awt/debug \
|
2022-10-25 09:45:33 +00:00
|
|
|
common/awt/utility \
|
2018-06-08 16:11:32 +00:00
|
|
|
libawt/awt/image/cvutils \
|
|
|
|
libawt/java2d \
|
|
|
|
libawt/java2d/windows \
|
|
|
|
libawt/windows \
|
2024-04-11 09:40:12 +00:00
|
|
|
java.base:libjvm \
|
2014-08-17 14:54:13 +00:00
|
|
|
#
|
2024-03-27 14:44:40 +00:00
|
|
|
else
|
|
|
|
LIBJAWT_EXTRA_HEADER_DIRS += \
|
|
|
|
common/awt \
|
|
|
|
#
|
|
|
|
endif
|
2014-08-17 14:54:13 +00:00
|
|
|
|
2024-03-27 14:44:40 +00:00
|
|
|
ifeq ($(call isTargetOs, macosx), true)
|
|
|
|
# libjawt on macosx does not use the unix code
|
|
|
|
LIBJAWT_EXCLUDE_SRC_PATTERNS := /unix/
|
|
|
|
endif
|
2013-10-16 18:24:46 +00:00
|
|
|
|
2024-03-27 14:44:40 +00:00
|
|
|
ifeq ($(call isTargetOs, linux)+$(ENABLE_HEADLESS_ONLY), true+true)
|
|
|
|
LIBJAWT_CFLAGS += -DHEADLESS
|
|
|
|
endif
|
2013-10-16 18:24:46 +00:00
|
|
|
|
2024-03-27 14:44:40 +00:00
|
|
|
ifeq ($(call isTargetOs, windows)+$(call isTargetCpu, x86), true+true)
|
|
|
|
LIBJAWT_LIBS_windows := kernel32.lib
|
|
|
|
endif
|
2014-08-17 14:54:13 +00:00
|
|
|
|
2024-03-27 14:44:40 +00:00
|
|
|
ifeq ($(call isTargetOsType, unix)+$(call isTargetOs, macosx), true+false)
|
2024-04-11 09:40:12 +00:00
|
|
|
LIBJAWT_JDK_LIBS_unix := libawt
|
2024-03-27 14:44:40 +00:00
|
|
|
ifeq ($(ENABLE_HEADLESS_ONLY), false)
|
2024-04-11 09:40:12 +00:00
|
|
|
LIBJAWT_JDK_LIBS_unix += libawt_xawt
|
2013-10-25 00:47:41 +00:00
|
|
|
else
|
2024-04-11 09:40:12 +00:00
|
|
|
LIBJAWT_JDK_LIBS_unix += libawt_headless
|
2013-10-16 18:24:46 +00:00
|
|
|
endif
|
2024-03-27 14:44:40 +00:00
|
|
|
endif
|
2013-10-16 18:24:46 +00:00
|
|
|
|
2024-03-27 14:44:40 +00:00
|
|
|
$(eval $(call SetupJdkLibrary, BUILD_LIBJAWT, \
|
|
|
|
NAME := jawt, \
|
|
|
|
EXCLUDE_SRC_PATTERNS := $(LIBJAWT_EXCLUDE_SRC_PATTERNS), \
|
|
|
|
OPTIMIZATION := LOW, \
|
|
|
|
CFLAGS := $(LIBJAWT_CFLAGS), \
|
|
|
|
CFLAGS_windows := -EHsc -DUNICODE -D_UNICODE, \
|
|
|
|
CXXFLAGS_windows := -EHsc -DUNICODE -D_UNICODE, \
|
|
|
|
DISABLED_WARNINGS_clang_jawt.m := sign-compare, \
|
|
|
|
EXTRA_HEADER_DIRS := $(LIBJAWT_EXTRA_HEADER_DIRS), \
|
|
|
|
LDFLAGS_windows := $(LDFLAGS_CXX_JDK), \
|
|
|
|
LDFLAGS_macosx := -Wl$(COMMA)-rpath$(COMMA)@loader_path, \
|
2024-04-11 09:40:12 +00:00
|
|
|
JDK_LIBS_unix := $(LIBJAWT_JDK_LIBS_unix), \
|
|
|
|
JDK_LIBS_windows := libawt, \
|
|
|
|
JDK_LIBS_macosx := libawt_lwawt, \
|
2024-03-27 14:44:40 +00:00
|
|
|
LIBS_macosx := -framework Cocoa, \
|
|
|
|
LIBS_windows := advapi32.lib $(LIBJAWT_LIBS_windows), \
|
|
|
|
))
|
2013-10-16 18:24:46 +00:00
|
|
|
|
2014-12-03 14:22:58 +00:00
|
|
|
TARGETS += $(BUILD_LIBJAWT)
|
2013-10-16 18:24:46 +00:00
|
|
|
|
2024-03-27 14:44:40 +00:00
|
|
|
ifeq ($(call isTargetOs, windows), true)
|
|
|
|
$(eval $(call SetupCopyFiles, COPY_JAWT_LIB, \
|
|
|
|
FILES := $(BUILD_LIBJAWT_IMPORT_LIBRARY), \
|
|
|
|
DEST := $(SUPPORT_OUTPUTDIR)/modules_libs/$(MODULE), \
|
|
|
|
))
|
|
|
|
|
|
|
|
$(COPY_JAWT_LIB): $(BUILD_LIBJAWT)
|
|
|
|
|
|
|
|
TARGETS += $(COPY_JAWT_LIB)
|
|
|
|
endif
|
|
|
|
|
|
|
|
################################################################################
|
|
|
|
## Build libsplashscreen
|
2014-08-21 09:05:35 +00:00
|
|
|
################################################################################
|
2013-10-16 18:24:46 +00:00
|
|
|
|
2016-09-26 12:56:35 +00:00
|
|
|
ifeq ($(ENABLE_HEADLESS_ONLY), false)
|
2018-06-08 16:11:32 +00:00
|
|
|
LIBSPLASHSCREEN_EXTRA_SRC := \
|
|
|
|
common/awt/systemscale \
|
2014-08-17 14:54:13 +00:00
|
|
|
#
|
2013-10-16 18:24:46 +00:00
|
|
|
|
2024-03-27 14:44:40 +00:00
|
|
|
LIBSPLASHSCREEN_HEADER_DIRS := \
|
|
|
|
common/awt/utility \
|
|
|
|
libosxapp \
|
|
|
|
java.base:libjava \
|
2024-04-11 09:40:12 +00:00
|
|
|
java.base:libjvm \
|
2024-03-27 14:44:40 +00:00
|
|
|
#
|
2022-07-14 16:04:45 +00:00
|
|
|
|
2018-06-08 16:11:32 +00:00
|
|
|
ifeq ($(USE_EXTERNAL_LIBGIF), false)
|
|
|
|
LIBSPLASHSCREEN_HEADER_DIRS += libsplashscreen/giflib
|
2013-10-16 18:24:46 +00:00
|
|
|
else
|
2024-03-27 14:44:40 +00:00
|
|
|
LIBSPLASHSCREEN_EXCLUDES += giflib
|
2013-10-16 18:24:46 +00:00
|
|
|
endif
|
|
|
|
|
2018-06-08 16:11:32 +00:00
|
|
|
ifeq ($(USE_EXTERNAL_LIBJPEG), false)
|
2024-03-27 14:44:40 +00:00
|
|
|
LIBSPLASHSCREEN_EXTRA_SRC += libjavajpeg
|
2014-05-23 15:04:37 +00:00
|
|
|
endif
|
|
|
|
|
2014-02-20 15:07:54 +00:00
|
|
|
ifeq ($(USE_EXTERNAL_LIBPNG), false)
|
2018-06-08 16:11:32 +00:00
|
|
|
LIBSPLASHSCREEN_HEADER_DIRS += libsplashscreen/libpng
|
2014-08-17 14:54:13 +00:00
|
|
|
else
|
|
|
|
LIBSPLASHSCREEN_EXCLUDES += libpng
|
2014-02-20 15:07:54 +00:00
|
|
|
endif
|
|
|
|
|
2018-06-08 16:11:32 +00:00
|
|
|
ifeq ($(USE_EXTERNAL_LIBZ), false)
|
|
|
|
LIBSPLASHSCREEN_EXTRA_SRC += java.base:libzip/zlib
|
2013-10-16 18:24:46 +00:00
|
|
|
endif
|
2016-03-14 20:10:50 +00:00
|
|
|
|
2019-06-12 20:50:37 +00:00
|
|
|
LIBSPLASHSCREEN_CFLAGS += -DSPLASHSCREEN -DPNG_NO_MMX_CODE \
|
2024-03-27 14:44:40 +00:00
|
|
|
-DPNG_ARM_NEON_OPT=0 -DPNG_ARM_NEON_IMPLEMENTATION=0
|
2013-10-16 18:24:46 +00:00
|
|
|
|
2024-03-27 14:44:40 +00:00
|
|
|
ifeq ($(call isTargetOs, linux)+$(call isTargetCpuArch, ppc), true+true)
|
|
|
|
LIBSPLASHSCREEN_CFLAGS += -DPNG_POWERPC_VSX_OPT=0
|
2018-08-10 07:16:10 +00:00
|
|
|
endif
|
|
|
|
|
2023-06-02 07:34:24 +00:00
|
|
|
# The external libpng submitted in the jdk is a reduced version
|
|
|
|
# which does not contain .png_init_filter_functions_vsx.
|
|
|
|
# Therefore we need to disable PNG_POWERPC_VSX_OPT explicitly by setting
|
|
|
|
# it to 0. If this define is not set, it would be automatically set to 2,
|
|
|
|
# because
|
|
|
|
# "#if defined(__PPC64__) && defined(__ALTIVEC__) && defined(__VSX__)"
|
|
|
|
# expands to true. This would results in the fact that
|
|
|
|
# .png_init_filter_functions_vsx is needed in libpng.
|
|
|
|
ifeq ($(call isTargetOs, aix), true)
|
2024-03-27 14:44:40 +00:00
|
|
|
LIBSPLASHSCREEN_CFLAGS += -DPNG_POWERPC_VSX_OPT=0
|
2023-06-02 07:34:24 +00:00
|
|
|
endif
|
|
|
|
|
2019-02-07 11:35:45 +00:00
|
|
|
ifeq ($(call isTargetOs, macosx), true)
|
2024-03-27 14:44:40 +00:00
|
|
|
# libsplashscreen on macosx does not use the unix code
|
|
|
|
LIBSPLASHSCREEN_EXCLUDE_SRC_PATTERNS := /unix/
|
2013-10-16 18:24:46 +00:00
|
|
|
|
2014-08-17 14:54:13 +00:00
|
|
|
BUILD_LIBSPLASHSCREEN_java_awt_SplashScreen.c_CFLAGS := -x objective-c -O0
|
|
|
|
BUILD_LIBSPLASHSCREEN_splashscreen_gfx_impl.c_CFLAGS := -x objective-c -O0
|
|
|
|
BUILD_LIBSPLASHSCREEN_splashscreen_gif.c_CFLAGS := -x objective-c -O0
|
|
|
|
BUILD_LIBSPLASHSCREEN_splashscreen_impl.c_CFLAGS := -x objective-c -O0
|
|
|
|
BUILD_LIBSPLASHSCREEN_splashscreen_jpeg.c_CFLAGS := -x objective-c -O0
|
|
|
|
BUILD_LIBSPLASHSCREEN_splashscreen_png.c_CFLAGS := -x objective-c -O0
|
|
|
|
BUILD_LIBSPLASHSCREEN_splashscreen_sys.m_CFLAGS := -O0
|
2013-10-16 18:24:46 +00:00
|
|
|
endif
|
|
|
|
|
2019-02-07 11:35:45 +00:00
|
|
|
ifeq ($(call isTargetOs, macosx), true)
|
2024-03-27 14:44:40 +00:00
|
|
|
LIBSPLASHSCREEN_CFLAGS += -DWITH_MACOSX
|
2019-02-07 11:35:45 +00:00
|
|
|
else ifeq ($(call isTargetOs, windows), true)
|
2024-03-27 14:44:40 +00:00
|
|
|
LIBSPLASHSCREEN_CFLAGS += -DWITH_WIN32
|
2014-03-28 14:00:07 +00:00
|
|
|
else
|
2024-03-27 14:44:40 +00:00
|
|
|
LIBSPLASHSCREEN_CFLAGS += -DWITH_X11 $(X_CFLAGS)
|
2013-10-23 15:57:38 +00:00
|
|
|
endif
|
2013-10-16 18:24:46 +00:00
|
|
|
|
2018-03-15 00:20:47 +00:00
|
|
|
$(eval $(call SetupJdkLibrary, BUILD_LIBSPLASHSCREEN, \
|
2018-02-28 20:16:11 +00:00
|
|
|
NAME := splashscreen, \
|
2018-06-08 16:11:32 +00:00
|
|
|
EXTRA_SRC := $(LIBSPLASHSCREEN_EXTRA_SRC), \
|
|
|
|
EXCLUDE_SRC_PATTERNS := $(LIBSPLASHSCREEN_EXCLUDE_SRC_PATTERNS), \
|
2013-10-16 18:24:46 +00:00
|
|
|
EXCLUDE_FILES := imageioJPEG.c jpegdecoder.c pngtest.c, \
|
2014-08-17 14:54:13 +00:00
|
|
|
EXCLUDES := $(LIBSPLASHSCREEN_EXCLUDES), \
|
2013-10-16 18:24:46 +00:00
|
|
|
OPTIMIZATION := LOW, \
|
2024-03-15 14:36:57 +00:00
|
|
|
CFLAGS := $(LIBSPLASHSCREEN_CFLAGS) \
|
2018-02-06 18:12:05 +00:00
|
|
|
$(GIFLIB_CFLAGS) $(LIBJPEG_CFLAGS) $(PNG_CFLAGS) $(LIBZ_CFLAGS), \
|
2024-03-15 14:36:57 +00:00
|
|
|
CXXFLAGS := $(LIBSPLASHSCREEN_CFLAGS) \
|
2023-08-09 12:26:32 +00:00
|
|
|
$(GIFLIB_CFLAGS) $(LIBJPEG_CFLAGS) $(PNG_CFLAGS) $(LIBZ_CFLAGS), \
|
2018-06-08 16:11:32 +00:00
|
|
|
EXTRA_HEADER_DIRS := $(LIBSPLASHSCREEN_HEADER_DIRS), \
|
2022-10-24 09:50:58 +00:00
|
|
|
DISABLED_WARNINGS_gcc_dgif_lib.c := sign-compare, \
|
|
|
|
DISABLED_WARNINGS_gcc_jcmaster.c := implicit-fallthrough, \
|
|
|
|
DISABLED_WARNINGS_gcc_jdphuff.c := shift-negative-value, \
|
|
|
|
DISABLED_WARNINGS_gcc_png.c := maybe-uninitialized, \
|
2022-10-24 20:32:31 +00:00
|
|
|
DISABLED_WARNINGS_gcc_pngerror.c := maybe-uninitialized, \
|
2024-03-27 14:44:40 +00:00
|
|
|
DISABLED_WARNINGS_gcc_splashscreen_gfx_impl.c := implicit-fallthrough \
|
|
|
|
maybe-uninitialized, \
|
|
|
|
DISABLED_WARNINGS_gcc_splashscreen_impl.c := implicit-fallthrough \
|
|
|
|
sign-compare unused-function, \
|
2022-10-24 09:50:58 +00:00
|
|
|
DISABLED_WARNINGS_gcc_splashscreen_sys.c := type-limits unused-result, \
|
2023-01-18 10:32:00 +00:00
|
|
|
DISABLED_WARNINGS_clang := deprecated-non-prototype, \
|
2022-10-24 09:50:58 +00:00
|
|
|
DISABLED_WARNINGS_clang_dgif_lib.c := sign-compare, \
|
|
|
|
DISABLED_WARNINGS_clang_gzwrite.c := format-nonliteral, \
|
|
|
|
DISABLED_WARNINGS_clang_splashscreen_impl.c := sign-compare, \
|
2024-03-27 14:44:40 +00:00
|
|
|
DISABLED_WARNINGS_clang_splashscreen_png.c := \
|
|
|
|
incompatible-pointer-types, \
|
2022-10-24 09:50:58 +00:00
|
|
|
DISABLED_WARNINGS_clang_splashscreen_sys.m := deprecated-declarations, \
|
|
|
|
DISABLED_WARNINGS_microsoft_dgif_lib.c := 4018 4267, \
|
2022-10-26 08:10:42 +00:00
|
|
|
DISABLED_WARNINGS_microsoft_splashscreen_impl.c := 4018 4267 4244, \
|
2022-10-24 09:50:58 +00:00
|
|
|
DISABLED_WARNINGS_microsoft_splashscreen_png.c := 4267, \
|
|
|
|
DISABLED_WARNINGS_microsoft_splashscreen_sys.c := 4267 4244, \
|
2018-03-14 10:23:16 +00:00
|
|
|
LDFLAGS_windows := -delayload:user32.dll, \
|
2024-04-11 09:40:12 +00:00
|
|
|
JDK_LIBS_windows := java.base:libjava, \
|
|
|
|
JDK_LIBS_macosx := libosxapp, \
|
2024-03-27 14:44:40 +00:00
|
|
|
LIBS := $(GIFLIB_LIBS) $(LIBJPEG_LIBS) $(LIBZ_LIBS) $(PNG_LIBS), \
|
|
|
|
LIBS_unix := $(LIBM) -lpthread, \
|
|
|
|
LIBS_linux := $(LIBDL) $(X_LIBS) -lX11 -lXext, \
|
|
|
|
LIBS_macosx := -liconv \
|
|
|
|
-framework ApplicationServices \
|
|
|
|
-framework Cocoa \
|
|
|
|
-framework Foundation \
|
|
|
|
-framework Metal \
|
|
|
|
-framework Security, \
|
|
|
|
LIBS_aix := $(LIBDL) -liconv $(X_LIBS) -lX11 -lXext, \
|
|
|
|
LIBS_windows := delayimp.lib gdi32.lib kernel32.lib user32.lib, \
|
2016-01-20 08:54:13 +00:00
|
|
|
))
|
2013-10-16 18:24:46 +00:00
|
|
|
|
2014-12-03 14:22:58 +00:00
|
|
|
TARGETS += $(BUILD_LIBSPLASHSCREEN)
|
2013-10-16 18:24:46 +00:00
|
|
|
endif
|
|
|
|
|
2019-02-07 11:35:45 +00:00
|
|
|
ifeq ($(call isTargetOs, macosx), true)
|
2024-03-27 14:44:40 +00:00
|
|
|
##############################################################################
|
|
|
|
## Build libawt_lwawt
|
|
|
|
##############################################################################
|
2013-10-16 18:24:46 +00:00
|
|
|
|
2018-06-08 16:11:32 +00:00
|
|
|
LIBAWT_LWAWT_EXTRA_SRC := \
|
|
|
|
$(TOPDIR)/src/$(MODULE)/unix/native/common/awt \
|
|
|
|
$(TOPDIR)/src/$(MODULE)/share/native/common/font \
|
|
|
|
$(TOPDIR)/src/$(MODULE)/share/native/common/java2d \
|
2014-08-17 14:54:13 +00:00
|
|
|
#
|
|
|
|
|
2018-06-08 16:11:32 +00:00
|
|
|
LIBAWT_LWAWT_EXTRA_HEADER_DIRS := \
|
|
|
|
$(LIBAWT_DEFAULT_HEADER_DIRS) \
|
|
|
|
libawt_lwawt/awt \
|
|
|
|
libawt_lwawt/font \
|
|
|
|
libawt_lwawt/java2d/opengl \
|
2021-03-15 06:41:44 +00:00
|
|
|
libawt_lwawt/java2d/metal \
|
2018-06-08 16:11:32 +00:00
|
|
|
include \
|
|
|
|
common/awt/debug \
|
|
|
|
common/java2d/opengl \
|
2024-04-11 09:40:12 +00:00
|
|
|
java.base:libjvm \
|
2014-08-17 14:54:13 +00:00
|
|
|
#
|
|
|
|
|
2024-03-27 14:44:40 +00:00
|
|
|
LIBAWT_LWAWT_EXCLUDE_FILES := fontpath.c awt_Font.c X11Color.c
|
2018-06-08 16:11:32 +00:00
|
|
|
LIBAWT_LWAWT_EXCLUDES := $(TOPDIR)/src/$(MODULE)/unix/native/common/awt/medialib
|
2013-10-16 18:24:46 +00:00
|
|
|
|
2018-03-15 00:20:47 +00:00
|
|
|
$(eval $(call SetupJdkLibrary, BUILD_LIBAWT_LWAWT, \
|
2018-02-28 20:16:11 +00:00
|
|
|
NAME := awt_lwawt, \
|
2018-06-08 16:11:32 +00:00
|
|
|
EXTRA_SRC := $(LIBAWT_LWAWT_EXTRA_SRC), \
|
2024-03-27 14:44:40 +00:00
|
|
|
EXCLUDE_FILES := $(LIBAWT_LWAWT_EXCLUDE_FILES), \
|
2014-08-17 14:54:13 +00:00
|
|
|
EXCLUDES := $(LIBAWT_LWAWT_EXCLUDES), \
|
2013-10-16 18:24:46 +00:00
|
|
|
OPTIMIZATION := LOW, \
|
2018-06-08 16:11:32 +00:00
|
|
|
EXTRA_HEADER_DIRS := $(LIBAWT_LWAWT_EXTRA_HEADER_DIRS), \
|
2024-03-27 14:44:40 +00:00
|
|
|
DISABLED_WARNINGS_clang := incomplete-implementation \
|
|
|
|
deprecated-declarations objc-method-access \
|
|
|
|
incompatible-pointer-types extra-tokens sign-compare undef, \
|
2022-10-24 09:50:58 +00:00
|
|
|
DISABLED_WARNINGS_clang_AWTWindow.m := bitwise-op-parentheses, \
|
|
|
|
DISABLED_WARNINGS_clang_CFileDialog.m := semicolon-before-method-body, \
|
|
|
|
DISABLED_WARNINGS_clang_CGGlyphImages.m := pointer-arith, \
|
|
|
|
DISABLED_WARNINGS_clang_CGLLayer.m := semicolon-before-method-body, \
|
2024-03-27 14:44:40 +00:00
|
|
|
DISABLED_WARNINGS_clang_ImageSurfaceData.m := enum-conversion \
|
|
|
|
parentheses-equality, \
|
2022-10-24 09:50:58 +00:00
|
|
|
DISABLED_WARNINGS_clang_MTLBlitLoops.m := pointer-arith, \
|
2024-03-27 14:44:40 +00:00
|
|
|
DISABLED_WARNINGS_clang_MTLPipelineStatesStorage.m := \
|
|
|
|
semicolon-before-method-body, \
|
2023-01-18 10:32:00 +00:00
|
|
|
DISABLED_WARNINGS_clang_MTLRenderer.m := gnu-folding-constant, \
|
2022-10-24 09:50:58 +00:00
|
|
|
DISABLED_WARNINGS_clang_MTLVertexCache.m := pointer-arith, \
|
|
|
|
DISABLED_WARNINGS_clang_OGLBufImgOps.c := format-nonliteral, \
|
|
|
|
DISABLED_WARNINGS_clang_OGLPaints.c := format-nonliteral, \
|
|
|
|
DISABLED_WARNINGS_clang_PrinterView.m := enum-conversion, \
|
2024-04-11 09:40:12 +00:00
|
|
|
JDK_LIBS := libawt java.base:libjava libosxapp, \
|
2024-03-27 14:44:40 +00:00
|
|
|
LIBS_macosx := $(LIBM) \
|
2013-10-16 18:24:46 +00:00
|
|
|
-framework Accelerate \
|
|
|
|
-framework ApplicationServices \
|
|
|
|
-framework AudioToolbox \
|
|
|
|
-framework Carbon \
|
|
|
|
-framework Cocoa \
|
|
|
|
-framework ExceptionHandling \
|
|
|
|
-framework JavaRuntimeSupport \
|
2024-03-27 14:44:40 +00:00
|
|
|
-framework Metal \
|
2013-10-16 18:24:46 +00:00
|
|
|
-framework OpenGL \
|
2024-03-27 14:44:40 +00:00
|
|
|
-framework QuartzCore \
|
|
|
|
-framework Security, \
|
2016-01-20 08:54:13 +00:00
|
|
|
))
|
2013-10-16 18:24:46 +00:00
|
|
|
|
2014-12-03 14:22:58 +00:00
|
|
|
TARGETS += $(BUILD_LIBAWT_LWAWT)
|
2013-10-16 18:24:46 +00:00
|
|
|
|
2024-03-27 14:44:40 +00:00
|
|
|
##############################################################################
|
|
|
|
## Build libosxui
|
|
|
|
##############################################################################
|
2013-10-16 18:24:46 +00:00
|
|
|
|
2024-03-27 14:44:40 +00:00
|
|
|
SHADERS_SRC := \
|
|
|
|
$(TOPDIR)/src/java.desktop/macosx/native/libawt_lwawt/java2d/metal/shaders.metal
|
2021-03-15 06:41:44 +00:00
|
|
|
SHADERS_SUPPORT_DIR := $(SUPPORT_OUTPUTDIR)/native/java.desktop/libosxui
|
|
|
|
SHADERS_AIR := $(SHADERS_SUPPORT_DIR)/shaders.air
|
2024-04-11 09:40:12 +00:00
|
|
|
SHADERS_LIB := $(call FindLibDirForModule, $(MODULE))/shaders.metallib
|
2021-03-15 06:41:44 +00:00
|
|
|
|
|
|
|
$(eval $(call SetupExecute, metal_shaders, \
|
|
|
|
INFO := Running metal on $(notdir $(SHADERS_SRC)) (for libosxui.dylib), \
|
|
|
|
DEPS := $(SHADERS_SRC), \
|
|
|
|
OUTPUT_FILE := $(SHADERS_AIR), \
|
|
|
|
SUPPORT_DIR := $(SHADERS_SUPPORT_DIR), \
|
2021-11-16 13:18:56 +00:00
|
|
|
COMMAND := $(METAL) -c -std=osx-metal2.0 \
|
2023-10-13 20:24:44 +00:00
|
|
|
-mmacosx-version-min=$(MACOSX_VERSION_MIN) \
|
2021-11-16 13:18:56 +00:00
|
|
|
-o $(SHADERS_AIR) $(SHADERS_SRC), \
|
2021-03-15 06:41:44 +00:00
|
|
|
))
|
|
|
|
|
|
|
|
$(eval $(call SetupExecute, metallib_shaders, \
|
|
|
|
INFO := Running metallib on $(notdir $(SHADERS_AIR)) (for libosxui.dylib), \
|
|
|
|
DEPS := $(SHADERS_AIR), \
|
|
|
|
OUTPUT_FILE := $(SHADERS_LIB), \
|
|
|
|
SUPPORT_DIR := $(SHADERS_SUPPORT_DIR), \
|
|
|
|
COMMAND := $(METALLIB) -o $(SHADERS_LIB) $(SHADERS_AIR), \
|
|
|
|
))
|
|
|
|
|
|
|
|
TARGETS += $(SHADERS_LIB)
|
2013-10-16 18:24:46 +00:00
|
|
|
|
2018-03-15 00:20:47 +00:00
|
|
|
$(eval $(call SetupJdkLibrary, BUILD_LIBOSXUI, \
|
2018-02-28 20:16:11 +00:00
|
|
|
NAME := osxui, \
|
2013-10-16 18:24:46 +00:00
|
|
|
OPTIMIZATION := LOW, \
|
2018-06-08 16:11:32 +00:00
|
|
|
EXTRA_HEADER_DIRS := \
|
2024-04-11 09:40:12 +00:00
|
|
|
libawt_lwawt/awt, \
|
2024-03-27 14:44:40 +00:00
|
|
|
DISABLED_WARNINGS_clang_AquaFileView.m := deprecated-declarations \
|
|
|
|
sign-compare, \
|
2022-10-24 09:50:58 +00:00
|
|
|
DISABLED_WARNINGS_clang_ScreenMenu.m := deprecated-declarations, \
|
2024-03-18 14:41:51 +00:00
|
|
|
APPEND_LDFLAGS := -Wl$(COMMA)-rpath$(COMMA)@loader_path, \
|
2024-04-11 09:40:12 +00:00
|
|
|
JDK_LIBS := java.base:libjava libosxapp, \
|
2024-03-27 14:44:40 +00:00
|
|
|
LIBS_macosx := \
|
2013-10-16 18:24:46 +00:00
|
|
|
-framework ApplicationServices \
|
2024-03-27 14:44:40 +00:00
|
|
|
-framework Carbon \
|
|
|
|
-framework Cocoa \
|
2013-10-16 18:24:46 +00:00
|
|
|
-framework JavaRuntimeSupport \
|
2024-03-27 14:44:40 +00:00
|
|
|
-framework Metal, \
|
2016-01-20 08:54:13 +00:00
|
|
|
))
|
2013-10-16 18:24:46 +00:00
|
|
|
|
2014-12-03 14:22:58 +00:00
|
|
|
TARGETS += $(BUILD_LIBOSXUI)
|
2024-03-27 14:44:40 +00:00
|
|
|
|
2021-03-15 06:41:44 +00:00
|
|
|
$(BUILD_LIBOSXUI): $(SHADERS_LIB)
|
2013-10-16 18:24:46 +00:00
|
|
|
endif
|