make/lib/Awt2dLibraries.gmk
author ihse
Thu, 03 May 2018 14:30:20 +0200
branchihse-jdk-library-branch
changeset 56511 2b67c11c0db6
parent 56488 a6cb200daa5d
child 56512 c030d6f39dfd
permissions -rw-r--r--
Introduce EXTRA_SRC and supply headers as dirs.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
     1
#
49070
d7859531621b 8198751: Refactor SetupNativeCompilation to take NAME and TYPE
ihse
parents: 48766
diff changeset
     2
# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
     3
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
     4
#
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
     5
# This code is free software; you can redistribute it and/or modify it
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
     6
# under the terms of the GNU General Public License version 2 only, as
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
     7
# published by the Free Software Foundation.  Oracle designates this
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
     8
# particular file as subject to the "Classpath" exception as provided
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
     9
# by Oracle in the LICENSE file that accompanied this code.
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    10
#
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    11
# This code is distributed in the hope that it will be useful, but WITHOUT
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    12
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    13
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    14
# version 2 for more details (a copy is included in the LICENSE file that
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    15
# accompanied this code).
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    16
#
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    17
# You should have received a copy of the GNU General Public License version
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    18
# 2 along with this work; if not, write to the Free Software Foundation,
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    19
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    20
#
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    21
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    22
# or visit www.oracle.com if you need additional information or have any
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    23
# questions.
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    24
#
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    25
47314
743814386712 8188814: Simplify IncludeCustomExtension
ihse
parents: 47217
diff changeset
    26
$(eval $(call IncludeCustomExtension, lib/Awt2dLibraries-pre.gmk))
39504
96c700e62710 8003593: build-infra: Paths to optional platform-specific files should not be hardwired to src/closed
erikj
parents: 39025
diff changeset
    27
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 26751
diff changeset
    28
WIN_AWT_LIB := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libawt/awt.lib
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    29
26191
a0ff4b39d34b 8055188: General cleanup of minor issues from source restructure
erikj
parents: 25993
diff changeset
    30
################################################################################
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    31
56511
2b67c11c0db6 Introduce EXTRA_SRC and supply headers as dirs.
ihse
parents: 56488
diff changeset
    32
# We must not include java.desktop/unix/native/libmlib_image, which is only
2b67c11c0db6 Introduce EXTRA_SRC and supply headers as dirs.
ihse
parents: 56488
diff changeset
    33
# for usage by solaris-sparc in libmlib_image_v.
47217
72e3ae9a25eb 8187444: Forest Consolidation: Make build work
erikj
parents: 47216
diff changeset
    34
BUILD_LIBMLIB_SRC := $(TOPDIR)/src/java.desktop/share/native/libmlib_image \
72e3ae9a25eb 8187444: Forest Consolidation: Make build work
erikj
parents: 47216
diff changeset
    35
    $(TOPDIR)/src/java.desktop/share/native/common/awt/medialib
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    36
56433
c3cf838aa2da Initial fix for setting SRC automatically + HEADER_FLAGS.
ihse
parents: 56421
diff changeset
    37
BUILD_LIBMLIB_CFLAGS := -D__USE_J2D_NAMES -D__MEDIALIB_OLD_NAMES -DMLIB_NO_LIBSUNMATH
13702
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
    38
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
    39
ifeq ($(OPENJDK_TARGET_CPU_BITS), 64)
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    40
  BUILD_LIBMLIB_CFLAGS += -DMLIB_OS64BIT
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
    41
endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
    42
49244
995a5556edfa 8199639: Introduce SetupJdkLibrary and SetupJdkExecutable
ihse
parents: 49241
diff changeset
    43
$(eval $(call SetupJdkLibrary, BUILD_LIBMLIB_IMAGE, \
49070
d7859531621b 8198751: Refactor SetupNativeCompilation to take NAME and TYPE
ihse
parents: 48766
diff changeset
    44
    NAME := mlib_image, \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    45
    SRC := $(BUILD_LIBMLIB_SRC), \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
    46
    EXCLUDE_FILES := mlib_c_ImageBlendTable.c, \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    47
    OPTIMIZATION := HIGHEST, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    48
    CFLAGS := $(CFLAGS_JDKLIB) \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    49
        $(BUILD_LIBMLIB_CFLAGS), \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    50
    LDFLAGS := $(LDFLAGS_JDKLIB) \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    51
        $(call SET_SHARED_LIBRARY_ORIGIN), \
56433
c3cf838aa2da Initial fix for setting SRC automatically + HEADER_FLAGS.
ihse
parents: 56421
diff changeset
    52
    LIBS := $(JDKLIB_LIBS), \
c3cf838aa2da Initial fix for setting SRC automatically + HEADER_FLAGS.
ihse
parents: 56421
diff changeset
    53
    LIBS_unix := $(LIBM) $(LIBDL), \
35276
50b3cdcef339 8145596: Enable debug symbols for all libraries
ihse
parents: 35241
diff changeset
    54
))
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    55
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 26751
diff changeset
    56
$(BUILD_LIBMLIB_IMAGE): $(call FindLib, java.base, java)
13164
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents: 12892
diff changeset
    57
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 26751
diff changeset
    58
TARGETS += $(BUILD_LIBMLIB_IMAGE)
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
    59
26191
a0ff4b39d34b 8055188: General cleanup of minor issues from source restructure
erikj
parents: 25993
diff changeset
    60
################################################################################
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
    61
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    62
ifeq ($(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU_ARCH), solaris-sparc)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    63
56433
c3cf838aa2da Initial fix for setting SRC automatically + HEADER_FLAGS.
ihse
parents: 56421
diff changeset
    64
  LIBMLIB_IMAGE_V_SRC := \
c3cf838aa2da Initial fix for setting SRC automatically + HEADER_FLAGS.
ihse
parents: 56421
diff changeset
    65
    $(call FindSrcDirsForLib, java.desktop, mlib_image) \
c3cf838aa2da Initial fix for setting SRC automatically + HEADER_FLAGS.
ihse
parents: 56421
diff changeset
    66
    $(call FindSrcDirsForComponent, java.desktop, common/awt/medialib) \
c3cf838aa2da Initial fix for setting SRC automatically + HEADER_FLAGS.
ihse
parents: 56421
diff changeset
    67
    #
c3cf838aa2da Initial fix for setting SRC automatically + HEADER_FLAGS.
ihse
parents: 56421
diff changeset
    68
c3cf838aa2da Initial fix for setting SRC automatically + HEADER_FLAGS.
ihse
parents: 56421
diff changeset
    69
  LIBMLIB_IMAGE_V_CFLAGS := -xarch=sparcvis -D__USE_J2D_NAMES -D__MEDIALIB_OLD_NAMES \
c3cf838aa2da Initial fix for setting SRC automatically + HEADER_FLAGS.
ihse
parents: 56421
diff changeset
    70
      $(TOPDIR)/src/java.desktop/unix/native/libmlib_image/vis_$(OPENJDK_TARGET_CPU_BITS).il
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    71
56484
dd465b7efca9 Fix issues on solaris.
ihse
parents: 56469
diff changeset
    72
  ifeq ($(OPENJDK_TARGET_CPU_BITS), 64)
dd465b7efca9 Fix issues on solaris.
ihse
parents: 56469
diff changeset
    73
    LIBMLIB_IMAGE_V_CFLAGS += -DMLIB_OS64BIT
dd465b7efca9 Fix issues on solaris.
ihse
parents: 56469
diff changeset
    74
  endif
dd465b7efca9 Fix issues on solaris.
ihse
parents: 56469
diff changeset
    75
dd465b7efca9 Fix issues on solaris.
ihse
parents: 56469
diff changeset
    76
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
    77
  BUILD_LIBMLIB_IMAGE_V_EXFILES := \
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
    78
      awt_ImagingLib.c \
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
    79
      mlib_c_ImageAffine_BC.c \
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
    80
      mlib_c_ImageAffine_BC_S16.c \
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
    81
      mlib_c_ImageAffine_BC_U16.c \
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
    82
      mlib_c_ImageAffine_BL.c \
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
    83
      mlib_c_ImageAffine_BL_S16.c \
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
    84
      mlib_c_ImageAffine_BL_U16.c \
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
    85
      mlib_c_ImageAffine_NN.c \
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
    86
      mlib_c_ImageConvClearEdge.c \
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
    87
      mlib_c_ImageConvCopyEdge.c \
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
    88
      mlib_c_ImageConv_f.c \
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
    89
      mlib_c_ImageConvVersion.c \
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
    90
      mlib_c_ImageCopy.c \
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
    91
      mlib_c_ImageLookUp.c \
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
    92
      mlib_c_ImageLookUp_f.c \
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
    93
      #
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
    94
49244
995a5556edfa 8199639: Introduce SetupJdkLibrary and SetupJdkExecutable
ihse
parents: 49241
diff changeset
    95
  $(eval $(call SetupJdkLibrary, BUILD_LIBMLIB_IMAGE_V, \
49070
d7859531621b 8198751: Refactor SetupNativeCompilation to take NAME and TYPE
ihse
parents: 48766
diff changeset
    96
      NAME := mlib_image_v, \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
    97
      SRC := $(LIBMLIB_IMAGE_V_SRC), \
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
    98
      EXCLUDE_FILES := $(BUILD_LIBMLIB_IMAGE_V_EXFILES), \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    99
      OPTIMIZATION := HIGHEST, \
56433
c3cf838aa2da Initial fix for setting SRC automatically + HEADER_FLAGS.
ihse
parents: 56421
diff changeset
   100
      CFLAGS := $(CFLAGS_JDKLIB) \
c3cf838aa2da Initial fix for setting SRC automatically + HEADER_FLAGS.
ihse
parents: 56421
diff changeset
   101
          $(LIBMLIB_IMAGE_V_CFLAGS), \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   102
      LDFLAGS := $(LDFLAGS_JDKLIB) \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   103
          $(call SET_SHARED_LIBRARY_ORIGIN), \
56484
dd465b7efca9 Fix issues on solaris.
ihse
parents: 56469
diff changeset
   104
      LIBS := -ljava -ljvm $(LIBM) $(LIBDL), \
35276
50b3cdcef339 8145596: Enable debug symbols for all libraries
ihse
parents: 35241
diff changeset
   105
  ))
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   106
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 26751
diff changeset
   107
  $(BUILD_LIBMLIB_IMAGE_V): $(call FindLib, java.base, java)
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   108
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 26751
diff changeset
   109
  TARGETS += $(BUILD_LIBMLIB_IMAGE_V)
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   110
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   111
endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   112
26191
a0ff4b39d34b 8055188: General cleanup of minor issues from source restructure
erikj
parents: 25993
diff changeset
   113
################################################################################
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   114
56511
2b67c11c0db6 Introduce EXTRA_SRC and supply headers as dirs.
ihse
parents: 56488
diff changeset
   115
LIBAWT_EXTRA_SRC := \
47217
72e3ae9a25eb 8187444: Forest Consolidation: Make build work
erikj
parents: 47216
diff changeset
   116
    $(TOPDIR)/src/java.desktop/share/native/common/awt/debug \
72e3ae9a25eb 8187444: Forest Consolidation: Make build work
erikj
parents: 47216
diff changeset
   117
    $(TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/common/awt \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   118
    #
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   119
56467
0d2a92ed27e9 Make libawt compile on Solaris.
ihse
parents: 56462
diff changeset
   120
ifeq ($(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU_ARCH), solaris-sparc)
56511
2b67c11c0db6 Introduce EXTRA_SRC and supply headers as dirs.
ihse
parents: 56488
diff changeset
   121
  LIBAWT_EXTRA_SRC += $(TOPDIR)/src/java.desktop/share/native/common/awt/medialib
26225
3c7e92c78bab 8056246: Fix AIX build after the Modular Source Code change 8054834
simonis
parents: 26191
diff changeset
   122
endif
3c7e92c78bab 8056246: Fix AIX build after the Modular Source Code change 8054834
simonis
parents: 26191
diff changeset
   123
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   124
ifeq ($(OPENJDK_TARGET_OS), windows)
56511
2b67c11c0db6 Introduce EXTRA_SRC and supply headers as dirs.
ihse
parents: 56488
diff changeset
   125
  LIBAWT_EXTRA_SRC += \
56467
0d2a92ed27e9 Make libawt compile on Solaris.
ihse
parents: 56462
diff changeset
   126
      $(TOPDIR)/src/java.desktop/share/native/common/awt/utility \
0d2a92ed27e9 Make libawt compile on Solaris.
ihse
parents: 56462
diff changeset
   127
      $(TOPDIR)/src/java.desktop/share/native/common/font \
0d2a92ed27e9 Make libawt compile on Solaris.
ihse
parents: 56462
diff changeset
   128
      $(TOPDIR)/src/java.desktop/share/native/common/java2d/opengl \
0d2a92ed27e9 Make libawt compile on Solaris.
ihse
parents: 56462
diff changeset
   129
      $(TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/common/awt/systemscale \
0d2a92ed27e9 Make libawt compile on Solaris.
ihse
parents: 56462
diff changeset
   130
      #
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   131
endif
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   132
26225
3c7e92c78bab 8056246: Fix AIX build after the Modular Source Code change 8054834
simonis
parents: 26191
diff changeset
   133
ifneq ($(filter $(OPENJDK_TARGET_OS), solaris linux macosx aix), )
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   134
  LIBAWT_EXFILES += awt_Font.c CUPSfuncs.c fontpath.c X11Color.c
14231
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents: 13702
diff changeset
   135
endif
13164
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents: 12892
diff changeset
   136
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   137
ifeq ($(OPENJDK_TARGET_OS), macosx)
26751
70bac69b37c9 8056216: Remove "sun" directory layer from libawt and common
prr
parents: 26741
diff changeset
   138
  LIBAWT_EXFILES += initIDs.c awt/image/cvutils/img_colors.c
22597
7515a991bb37 8024854: PPC64: Basic changes and files to build the class library on AIX
simonis
parents: 22595
diff changeset
   139
endif
7515a991bb37 8024854: PPC64: Basic changes and files to build the class library on AIX
simonis
parents: 22595
diff changeset
   140
56468
3ba02ddcb1b1 Clean up libawt.
ihse
parents: 56467
diff changeset
   141
ifeq ($(OPENJDK_TARGET_OS), windows)
3ba02ddcb1b1 Clean up libawt.
ihse
parents: 56467
diff changeset
   142
  LIBAWT_EXFILES += \
3ba02ddcb1b1 Clean up libawt.
ihse
parents: 56467
diff changeset
   143
      java2d/d3d/D3DShaderGen.c \
3ba02ddcb1b1 Clean up libawt.
ihse
parents: 56467
diff changeset
   144
      awt/image/cvutils/img_colors.c \
3ba02ddcb1b1 Clean up libawt.
ihse
parents: 56467
diff changeset
   145
      #
3ba02ddcb1b1 Clean up libawt.
ihse
parents: 56467
diff changeset
   146
endif
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   147
56433
c3cf838aa2da Initial fix for setting SRC automatically + HEADER_FLAGS.
ihse
parents: 56421
diff changeset
   148
ifeq ($(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU), solaris-sparcv9)
26751
70bac69b37c9 8056216: Remove "sun" directory layer from libawt and common
prr
parents: 26741
diff changeset
   149
  LIBAWT_EXFILES += java2d/loops/MapAccelFunc.c
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   150
else
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   151
  LIBAWT_EXCLUDES += \
47217
72e3ae9a25eb 8187444: Forest Consolidation: Make build work
erikj
parents: 47216
diff changeset
   152
      $(TOPDIR)/src/java.desktop/unix/native/libawt/awt/medialib \
72e3ae9a25eb 8187444: Forest Consolidation: Make build work
erikj
parents: 47216
diff changeset
   153
      $(TOPDIR)/src/java.desktop/unix/native/libawt/java2d/loops \
72e3ae9a25eb 8187444: Forest Consolidation: Make build work
erikj
parents: 47216
diff changeset
   154
      $(TOPDIR)/src/java.desktop/unix/native/common/awt/medialib \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   155
      #
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   156
endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   157
56468
3ba02ddcb1b1 Clean up libawt.
ihse
parents: 56467
diff changeset
   158
LIBAWT_CFLAGS += -D__MEDIALIB_OLD_NAMES -D__USE_J2D_NAMES $(X_CFLAGS)
3ba02ddcb1b1 Clean up libawt.
ihse
parents: 56467
diff changeset
   159
3ba02ddcb1b1 Clean up libawt.
ihse
parents: 56467
diff changeset
   160
ifeq ($(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU), solaris-sparcv9)
3ba02ddcb1b1 Clean up libawt.
ihse
parents: 56467
diff changeset
   161
  LIBAWT_CFLAGS += -xarch=sparcvis -DMLIB_ADD_SUFF \
3ba02ddcb1b1 Clean up libawt.
ihse
parents: 56467
diff changeset
   162
      $(TOPDIR)/src/java.desktop/unix/native/libmlib_image/vis_$(OPENJDK_TARGET_CPU_BITS).il
3ba02ddcb1b1 Clean up libawt.
ihse
parents: 56467
diff changeset
   163
3ba02ddcb1b1 Clean up libawt.
ihse
parents: 56467
diff changeset
   164
  LIBAWT_ASFLAGS = -P -xarch=v9a
3ba02ddcb1b1 Clean up libawt.
ihse
parents: 56467
diff changeset
   165
endif
3ba02ddcb1b1 Clean up libawt.
ihse
parents: 56467
diff changeset
   166
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   167
ifneq ($(OPENJDK_TARGET_OS), solaris)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   168
  LIBAWT_CFLAGS += -DMLIB_NO_LIBSUNMATH
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   169
endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   170
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   171
ifeq ($(OPENJDK_TARGET_OS), windows)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   172
  LIBAWT_CFLAGS += -EHsc -DUNICODE -D_UNICODE
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   173
  ifeq ($(OPENJDK_TARGET_CPU_BITS), 64)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   174
    LIBAWT_CFLAGS += -DMLIB_OS64BIT
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   175
  endif
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   176
47217
72e3ae9a25eb 8187444: Forest Consolidation: Make build work
erikj
parents: 47216
diff changeset
   177
  LIBAWT_RC_FLAGS ?= -I $(TOPDIR)/src/java.base/windows/native/launcher/icons
72e3ae9a25eb 8187444: Forest Consolidation: Make build work
erikj
parents: 47216
diff changeset
   178
  LIBAWT_VERSIONINFO_RESOURCE := $(TOPDIR)/src/java.desktop/windows/native/libawt/windows/awt.rc
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   179
endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   180
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   181
ifeq ($(OPENJDK_TARGET_OS), linux)
49440
396ea30afbd5 8200178: Remove mapfiles for JDK native libraries
ihse
parents: 49263
diff changeset
   182
  # FIXME: This is probably not what we want to do, but keep it now for compatibility.
396ea30afbd5 8200178: Remove mapfiles for JDK native libraries
ihse
parents: 49263
diff changeset
   183
  LIBAWT_CFLAGS += $(EXPORT_ALL_SYMBOLS)
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   184
endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   185
35711
d08f24178498 8148629: Disable remaining warnings in awt/fontmanager
erikj
parents: 35276
diff changeset
   186
# Turn off all warnings for debug_mem.c This is needed because the specific warning
d08f24178498 8148629: Disable remaining warnings in awt/fontmanager
erikj
parents: 35276
diff changeset
   187
# about initializing a declared 'extern' cannot be turned off individually. Only
d08f24178498 8148629: Disable remaining warnings in awt/fontmanager
erikj
parents: 35276
diff changeset
   188
# applies to debug builds.
d08f24178498 8148629: Disable remaining warnings in awt/fontmanager
erikj
parents: 35276
diff changeset
   189
ifeq ($(TOOLCHAIN_TYPE), gcc)
d08f24178498 8148629: Disable remaining warnings in awt/fontmanager
erikj
parents: 35276
diff changeset
   190
  BUILD_LIBAWT_debug_mem.c_CFLAGS := -w
43082
cf17b8a17dc0 8140266: Performance loss between jdk8 and jdk9 on Maskfill
serb
parents: 42747
diff changeset
   191
  # This option improves performance of MaskFill in Java2D by 20% for some gcc
cf17b8a17dc0 8140266: Performance loss between jdk8 and jdk9 on Maskfill
serb
parents: 42747
diff changeset
   192
  LIBAWT_CFLAGS += -fgcse-after-reload
35711
d08f24178498 8148629: Disable remaining warnings in awt/fontmanager
erikj
parents: 35276
diff changeset
   193
endif
d08f24178498 8148629: Disable remaining warnings in awt/fontmanager
erikj
parents: 35276
diff changeset
   194
49244
995a5556edfa 8199639: Introduce SetupJdkLibrary and SetupJdkExecutable
ihse
parents: 49241
diff changeset
   195
$(eval $(call SetupJdkLibrary, BUILD_LIBAWT, \
49070
d7859531621b 8198751: Refactor SetupNativeCompilation to take NAME and TYPE
ihse
parents: 48766
diff changeset
   196
    NAME := awt, \
56511
2b67c11c0db6 Introduce EXTRA_SRC and supply headers as dirs.
ihse
parents: 56488
diff changeset
   197
    EXTRA_SRC := $(LIBAWT_EXTRA_SRC), \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   198
    EXCLUDES := $(LIBAWT_EXCLUDES), \
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   199
    EXCLUDE_FILES := $(LIBAWT_EXFILES), \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   200
    OPTIMIZATION := LOW, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   201
    CFLAGS := $(CFLAGS_JDKLIB) $(LIBAWT_CFLAGS), \
56511
2b67c11c0db6 Introduce EXTRA_SRC and supply headers as dirs.
ihse
parents: 56488
diff changeset
   202
    EXTRA_HEADER_DIRS := \
2b67c11c0db6 Introduce EXTRA_SRC and supply headers as dirs.
ihse
parents: 56488
diff changeset
   203
        $(call FindHeaderDirForModule, java.base) \
2b67c11c0db6 Introduce EXTRA_SRC and supply headers as dirs.
ihse
parents: 56488
diff changeset
   204
        $(call FindSrcDirsForComponent, java.desktop, libawt/java2d) \
2b67c11c0db6 Introduce EXTRA_SRC and supply headers as dirs.
ihse
parents: 56488
diff changeset
   205
        $(call FindSrcDirsForComponent, java.desktop, libawt/java2d/d3d) \
2b67c11c0db6 Introduce EXTRA_SRC and supply headers as dirs.
ihse
parents: 56488
diff changeset
   206
        $(call FindSrcDirsForComponent, java.desktop, libawt/java2d/loops) \
2b67c11c0db6 Introduce EXTRA_SRC and supply headers as dirs.
ihse
parents: 56488
diff changeset
   207
        $(call FindSrcDirsForComponent, java.desktop, libawt/java2d/opengl) \
2b67c11c0db6 Introduce EXTRA_SRC and supply headers as dirs.
ihse
parents: 56488
diff changeset
   208
        $(call FindSrcDirsForComponent, java.desktop, libawt/java2d/windows) \
2b67c11c0db6 Introduce EXTRA_SRC and supply headers as dirs.
ihse
parents: 56488
diff changeset
   209
        $(call FindSrcDirsForComponent, java.desktop, libawt/windows) \
2b67c11c0db6 Introduce EXTRA_SRC and supply headers as dirs.
ihse
parents: 56488
diff changeset
   210
        $(call FindSrcDirsForComponent, java.desktop, common/awt/medialib) \
2b67c11c0db6 Introduce EXTRA_SRC and supply headers as dirs.
ihse
parents: 56488
diff changeset
   211
        $(call FindSrcDirsForLib, java.desktop, mlib_image) \
2b67c11c0db6 Introduce EXTRA_SRC and supply headers as dirs.
ihse
parents: 56488
diff changeset
   212
        $(call FindSrcDirsForLib, java.base, java) \
2b67c11c0db6 Introduce EXTRA_SRC and supply headers as dirs.
ihse
parents: 56488
diff changeset
   213
        $(call FindSrcDirsForComponent, java.base, include) \
2b67c11c0db6 Introduce EXTRA_SRC and supply headers as dirs.
ihse
parents: 56488
diff changeset
   214
        $(call FindSrcDirsForComponent, java.desktop, include) \
2b67c11c0db6 Introduce EXTRA_SRC and supply headers as dirs.
ihse
parents: 56488
diff changeset
   215
        $(TOPDIR)/src/java.desktop/share/native/libawt/awt/image \
2b67c11c0db6 Introduce EXTRA_SRC and supply headers as dirs.
ihse
parents: 56488
diff changeset
   216
        $(TOPDIR)/src/java.desktop/share/native/libawt/awt/image/cvutils \
2b67c11c0db6 Introduce EXTRA_SRC and supply headers as dirs.
ihse
parents: 56488
diff changeset
   217
        $(TOPDIR)/src/java.desktop/share/native/libawt/awt/medialib \
2b67c11c0db6 Introduce EXTRA_SRC and supply headers as dirs.
ihse
parents: 56488
diff changeset
   218
        $(TOPDIR)/src/java.desktop/share/native/libawt/java2d/pipe, \
29374
f031a666744a 8074096: Disable (most) native warnings in JDK on a per-library basis
ihse
parents: 29006
diff changeset
   219
    DISABLED_WARNINGS_gcc := sign-compare unused-result maybe-uninitialized \
f031a666744a 8074096: Disable (most) native warnings in JDK on a per-library basis
ihse
parents: 29006
diff changeset
   220
        format-nonliteral parentheses, \
30434
6b881118c93b 8074859: Turn on warnings as error
ihse
parents: 30325
diff changeset
   221
    DISABLED_WARNINGS_clang := logical-op-parentheses extern-initializer, \
29374
f031a666744a 8074096: Disable (most) native warnings in JDK on a per-library basis
ihse
parents: 29006
diff changeset
   222
    DISABLED_WARNINGS_solstudio := E_DECLARATION_IN_CODE, \
49838
b37e0785ce0b 8202052: Disable warnings when building libawt with VS2017
mikael
parents: 49697
diff changeset
   223
    DISABLED_WARNINGS_microsoft := 4297 4244 4267 4291 4302 4311 4996, \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   224
    ASFLAGS := $(LIBAWT_ASFLAGS), \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   225
    LDFLAGS := $(LDFLAGS_JDKLIB) $(call SET_SHARED_LIBRARY_ORIGIN), \
33406
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 33305
diff changeset
   226
    LDFLAGS_macosx := -L$(INSTALL_LIBRARIES_HERE), \
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 33305
diff changeset
   227
    LDFLAGS_windows := -delayload:user32.dll -delayload:gdi32.dll \
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 33305
diff changeset
   228
        -delayload:shell32.dll -delayload:winmm.dll \
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 33305
diff changeset
   229
        -delayload:winspool.drv -delayload:imm32.dll \
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 33305
diff changeset
   230
        -delayload:ole32.dll -delayload:comdlg32.dll \
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 33305
diff changeset
   231
        -delayload:comctl32.dll -delayload:shlwapi.dll, \
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 33305
diff changeset
   232
    LIBS_unix := -ljvm -ljava $(LIBM), \
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 33305
diff changeset
   233
    LIBS_linux :=  $(LIBDL), \
49241
de4b3a04feae 8199606: Set -lc as global LIBS on solstudio
ihse
parents: 49239
diff changeset
   234
    LIBS_solaris := $(LIBDL), \
33406
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 33305
diff changeset
   235
    LIBS_aix := $(LIBDL),\
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 33305
diff changeset
   236
    LIBS_macosx := -lmlib_image \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   237
        -framework Cocoa \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   238
        -framework OpenGL \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   239
        -framework JavaNativeFoundation \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   240
        -framework JavaRuntimeSupport \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   241
        -framework ApplicationServices \
33406
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 33305
diff changeset
   242
        -framework AudioToolbox, \
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 33305
diff changeset
   243
    LIBS_windows := kernel32.lib user32.lib gdi32.lib winspool.lib \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   244
        imm32.lib ole32.lib uuid.lib shell32.lib \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   245
        comdlg32.lib winmm.lib comctl32.lib shlwapi.lib \
33406
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 33305
diff changeset
   246
        delayimp.lib jvm.lib $(WIN_JAVA_LIB) advapi32.lib, \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   247
    VERSIONINFO_RESOURCE := $(LIBAWT_VERSIONINFO_RESOURCE), \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   248
    RC_FLAGS := $(RC_FLAGS) $(LIBAWT_RC_FLAGS) \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   249
        -D "JDK_FNAME=awt.dll" \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   250
        -D "JDK_INTERNAL_NAME=awt" \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   251
        -D "JDK_FTYPE=0x2L", \
35276
50b3cdcef339 8145596: Enable debug symbols for all libraries
ihse
parents: 35241
diff changeset
   252
))
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   253
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 26751
diff changeset
   254
$(BUILD_LIBAWT): $(call FindLib, java.base, java)
13164
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents: 12892
diff changeset
   255
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents: 12892
diff changeset
   256
ifeq ($(OPENJDK_TARGET_OS), macosx)
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   257
  $(BUILD_LIBAWT): $(BUILD_LIBMLIB_IMAGE)
13164
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents: 12892
diff changeset
   258
endif
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents: 12892
diff changeset
   259
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 26751
diff changeset
   260
TARGETS += $(BUILD_LIBAWT)
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   261
26191
a0ff4b39d34b 8055188: General cleanup of minor issues from source restructure
erikj
parents: 25993
diff changeset
   262
################################################################################
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   263
56511
2b67c11c0db6 Introduce EXTRA_SRC and supply headers as dirs.
ihse
parents: 56488
diff changeset
   264
ifeq ($(findstring $(OPENJDK_TARGET_OS), windows macosx), )
41132
2a3c61e80af0 8163102: Fix headless only configuration option
erikj
parents: 40205
diff changeset
   265
  ifeq ($(ENABLE_HEADLESS_ONLY), false)
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   266
56511
2b67c11c0db6 Introduce EXTRA_SRC and supply headers as dirs.
ihse
parents: 56488
diff changeset
   267
    LIBAWT_XAWT_EXTRA_SRC := \
2b67c11c0db6 Introduce EXTRA_SRC and supply headers as dirs.
ihse
parents: 56488
diff changeset
   268
        $(call FindSrcDirsForComponent, java.desktop, common/awt) \
2b67c11c0db6 Introduce EXTRA_SRC and supply headers as dirs.
ihse
parents: 56488
diff changeset
   269
        $(call FindSrcDirsForComponent, java.desktop, common/java2d) \
47217
72e3ae9a25eb 8187444: Forest Consolidation: Make build work
erikj
parents: 47216
diff changeset
   270
        $(TOPDIR)/src/java.desktop/share/native/common/font \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   271
        #
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   272
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   273
    LIBAWT_XAWT_EXCLUDES := medialib
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   274
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   275
    LIBAWT_XAWT_CFLAGS += -DXAWT -DXAWT_HACK \
21130
0f0b9c8f701a 8025673: [macosx] Disable X11 AWT toolkit
dholmes
parents: 20901
diff changeset
   276
        -DPACKAGE_PATH=\"$(PACKAGE_PATH)\" \
47507
5a270d2dfa5d 8170681: Remove fontconfig header files from JDK source tree
prr
parents: 47314
diff changeset
   277
        $(FONTCONFIG_CFLAGS) \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   278
        $(CUPS_CFLAGS)
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   279
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   280
    ifeq ($(OPENJDK_TARGET_OS), solaris)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   281
      LIBAWT_XAWT_CFLAGS += -DFUNCPROTO=15
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   282
    endif
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   283
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   284
    ifeq ($(OPENJDK_TARGET_OS), linux)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   285
      ifeq ($(DISABLE_XRENDER), true)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   286
        LIBAWT_XAWT_CFLAGS += -DDISABLE_XRENDER_BY_DEFAULT=true
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   287
      endif
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   288
    endif
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   289
49241
de4b3a04feae 8199606: Set -lc as global LIBS on solstudio
ihse
parents: 49239
diff changeset
   290
    LIBAWT_XAWT_LIBS := $(LIBM) -lawt -lXext -lX11 -lXrender $(LIBDL) -lXtst -lXi -ljava -ljvm
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   291
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   292
    ifeq ($(OPENJDK_TARGET_OS), linux)
33406
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 33305
diff changeset
   293
      LIBAWT_XAWT_LIBS += -lpthread
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   294
    endif
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   295
35711
d08f24178498 8148629: Disable remaining warnings in awt/fontmanager
erikj
parents: 35276
diff changeset
   296
    ifeq ($(TOOLCHAIN_TYPE), gcc)
d08f24178498 8148629: Disable remaining warnings in awt/fontmanager
erikj
parents: 35276
diff changeset
   297
      # Turn off all warnings for the following files since they contain warnings
d08f24178498 8148629: Disable remaining warnings in awt/fontmanager
erikj
parents: 35276
diff changeset
   298
      # that cannot be turned of individually.
d08f24178498 8148629: Disable remaining warnings in awt/fontmanager
erikj
parents: 35276
diff changeset
   299
      # redefining a macro
d08f24178498 8148629: Disable remaining warnings in awt/fontmanager
erikj
parents: 35276
diff changeset
   300
      BUILD_LIBAWT_XAWT_gtk2_interface.c_CFLAGS := -w
d08f24178498 8148629: Disable remaining warnings in awt/fontmanager
erikj
parents: 35276
diff changeset
   301
      # comparison between pointer and integer
d08f24178498 8148629: Disable remaining warnings in awt/fontmanager
erikj
parents: 35276
diff changeset
   302
      BUILD_LIBAWT_XAWT_awt_Font.c_CFLAGS := -w
d08f24178498 8148629: Disable remaining warnings in awt/fontmanager
erikj
parents: 35276
diff changeset
   303
      # initializing a declared 'extern'
d08f24178498 8148629: Disable remaining warnings in awt/fontmanager
erikj
parents: 35276
diff changeset
   304
      BUILD_LIBAWT_XAWT_debug_mem.c_CFLAGS := -w
56454
82c3ae69914f Cleaning up HEADER_FLAGS.
ihse
parents: 56435
diff changeset
   305
    endif
82c3ae69914f Cleaning up HEADER_FLAGS.
ihse
parents: 56435
diff changeset
   306
35711
d08f24178498 8148629: Disable remaining warnings in awt/fontmanager
erikj
parents: 35276
diff changeset
   307
49244
995a5556edfa 8199639: Introduce SetupJdkLibrary and SetupJdkExecutable
ihse
parents: 49241
diff changeset
   308
    $(eval $(call SetupJdkLibrary, BUILD_LIBAWT_XAWT, \
49070
d7859531621b 8198751: Refactor SetupNativeCompilation to take NAME and TYPE
ihse
parents: 48766
diff changeset
   309
        NAME := awt_xawt, \
56511
2b67c11c0db6 Introduce EXTRA_SRC and supply headers as dirs.
ihse
parents: 56488
diff changeset
   310
        EXTRA_SRC := $(LIBAWT_XAWT_EXTRA_SRC), \
2b67c11c0db6 Introduce EXTRA_SRC and supply headers as dirs.
ihse
parents: 56488
diff changeset
   311
        EXTRA_HEADER_DIRS := \
2b67c11c0db6 Introduce EXTRA_SRC and supply headers as dirs.
ihse
parents: 56488
diff changeset
   312
            $(call FindSrcDirsForComponent, java.desktop, libawt_xawt/awt) \
2b67c11c0db6 Introduce EXTRA_SRC and supply headers as dirs.
ihse
parents: 56488
diff changeset
   313
            $(call FindSrcDirsForComponent, java.desktop, include) \
2b67c11c0db6 Introduce EXTRA_SRC and supply headers as dirs.
ihse
parents: 56488
diff changeset
   314
            $(call FindSrcDirsForComponent, java.desktop, common/awt/systemscale) \
2b67c11c0db6 Introduce EXTRA_SRC and supply headers as dirs.
ihse
parents: 56488
diff changeset
   315
            $(call FindSrcDirsForComponent, java.desktop, common/font) \
2b67c11c0db6 Introduce EXTRA_SRC and supply headers as dirs.
ihse
parents: 56488
diff changeset
   316
            $(call FindSrcDirsForComponent, java.desktop, common/java2d/opengl) \
2b67c11c0db6 Introduce EXTRA_SRC and supply headers as dirs.
ihse
parents: 56488
diff changeset
   317
            $(call FindSrcDirsForComponent, java.desktop, common/java2d/x11) \
2b67c11c0db6 Introduce EXTRA_SRC and supply headers as dirs.
ihse
parents: 56488
diff changeset
   318
            $(call FindSrcDirsForComponent, java.desktop, libawt/java2d) \
2b67c11c0db6 Introduce EXTRA_SRC and supply headers as dirs.
ihse
parents: 56488
diff changeset
   319
            $(TOPDIR)/src/java.desktop/share/native/libawt/awt/image \
2b67c11c0db6 Introduce EXTRA_SRC and supply headers as dirs.
ihse
parents: 56488
diff changeset
   320
            $(TOPDIR)/src/java.desktop/share/native/libawt/awt/image/cvutils \
2b67c11c0db6 Introduce EXTRA_SRC and supply headers as dirs.
ihse
parents: 56488
diff changeset
   321
            $(TOPDIR)/src/java.desktop/share/native/libawt/java2d/loops \
2b67c11c0db6 Introduce EXTRA_SRC and supply headers as dirs.
ihse
parents: 56488
diff changeset
   322
            $(TOPDIR)/src/java.desktop/share/native/libawt/java2d/pipe \
2b67c11c0db6 Introduce EXTRA_SRC and supply headers as dirs.
ihse
parents: 56488
diff changeset
   323
            $(TOPDIR)/src/java.desktop/share/native/common/awt/debug, \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   324
        EXCLUDES := $(LIBAWT_XAWT_EXCLUDES), \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   325
        OPTIMIZATION := LOW, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   326
        CFLAGS := $(CFLAGS_JDKLIB) $(LIBAWT_XAWT_CFLAGS) \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   327
            $(X_CFLAGS), \
37529
868c7195632c 8154087: Fix AIX and Linux/ppc64le after the integration of the new hotspot build
simonis
parents: 36110
diff changeset
   328
        WARNINGS_AS_ERRORS_xlc := false, \
29374
f031a666744a 8074096: Disable (most) native warnings in JDK on a per-library basis
ihse
parents: 29006
diff changeset
   329
        DISABLED_WARNINGS_gcc := type-limits pointer-to-int-cast \
42194
4c928df88d20 8160146: Resolve disabled GCC warning 'deprecated-declarations' for libawt_xawt
aghaisas
parents: 41132
diff changeset
   330
            unused-result maybe-uninitialized format \
48766
2c4d1993b5f9 8196985: Disable new warnings from GCC 7.3 in jdk libraries
erikj
parents: 48751
diff changeset
   331
            format-security int-to-pointer-cast parentheses \
2c4d1993b5f9 8196985: Disable new warnings from GCC 7.3 in jdk libraries
erikj
parents: 48751
diff changeset
   332
            implicit-fallthrough, \
29374
f031a666744a 8074096: Disable (most) native warnings in JDK on a per-library basis
ihse
parents: 29006
diff changeset
   333
        DISABLED_WARNINGS_solstudio := E_DECLARATION_IN_CODE \
f031a666744a 8074096: Disable (most) native warnings in JDK on a per-library basis
ihse
parents: 29006
diff changeset
   334
            E_ASSIGNMENT_TYPE_MISMATCH E_NON_CONST_INIT, \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   335
        LDFLAGS := $(LDFLAGS_JDKLIB) \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   336
            $(call SET_SHARED_LIBRARY_ORIGIN) \
27944
c6d5edd39016 8066752: Remove space after -L on linker lines
erikj
parents: 27799
diff changeset
   337
            -L$(INSTALL_LIBRARIES_HERE), \
33406
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 33305
diff changeset
   338
        LIBS :=  $(X_LIBS) $(LIBAWT_XAWT_LIBS), \
35276
50b3cdcef339 8145596: Enable debug symbols for all libraries
ihse
parents: 35241
diff changeset
   339
    ))
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   340
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 26751
diff changeset
   341
    $(BUILD_LIBAWT_XAWT): $(call FindLib, java.base, java)
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   342
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   343
    $(BUILD_LIBAWT_XAWT): $(BUILD_LIBAWT)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   344
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 26751
diff changeset
   345
    TARGETS += $(BUILD_LIBAWT_XAWT)
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   346
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   347
  endif
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   348
endif
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   349
26191
a0ff4b39d34b 8055188: General cleanup of minor issues from source restructure
erikj
parents: 25993
diff changeset
   350
################################################################################
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   351
33285
5b20fc9010b7 8086092: More palette improvements
prr
parents: 32872
diff changeset
   352
# The fast floor code loses precision.
5b20fc9010b7 8086092: More palette improvements
prr
parents: 32872
diff changeset
   353
LCMS_CFLAGS=-DCMS_DONT_USE_FAST_FLOOR
24540
41aa84a568f3 8042159: Allow using a system-installed lcms2
omajid
parents: 23592
diff changeset
   354
56433
c3cf838aa2da Initial fix for setting SRC automatically + HEADER_FLAGS.
ihse
parents: 56421
diff changeset
   355
LCMS_CFLAGS_JDKLIB := $(filter-out -xc99=%none, $(CFLAGS_JDKLIB))
c3cf838aa2da Initial fix for setting SRC automatically + HEADER_FLAGS.
ihse
parents: 56421
diff changeset
   356
24540
41aa84a568f3 8042159: Allow using a system-installed lcms2
omajid
parents: 23592
diff changeset
   357
ifeq ($(USE_EXTERNAL_LCMS), true)
41aa84a568f3 8042159: Allow using a system-installed lcms2
omajid
parents: 23592
diff changeset
   358
  # If we're using an external library, we'll just need the wrapper part.
42352
4036fe6d110d 8039103: "explicitly" is misspelled as "explicitely" in configure scripts
ihse
parents: 42340
diff changeset
   359
  # By including it explicitly, all other files will be excluded.
24540
41aa84a568f3 8042159: Allow using a system-installed lcms2
omajid
parents: 23592
diff changeset
   360
  BUILD_LIBLCMS_INCLUDE_FILES := LCMS.c
56433
c3cf838aa2da Initial fix for setting SRC automatically + HEADER_FLAGS.
ihse
parents: 56421
diff changeset
   361
  # If we're using an external library, we'll can't include our own SRC path
c3cf838aa2da Initial fix for setting SRC automatically + HEADER_FLAGS.
ihse
parents: 56421
diff changeset
   362
  # as includes, instead the system headers should be used.
c3cf838aa2da Initial fix for setting SRC automatically + HEADER_FLAGS.
ihse
parents: 56421
diff changeset
   363
  LIBLCMS_HEADERS_FROM_SRC := false
24540
41aa84a568f3 8042159: Allow using a system-installed lcms2
omajid
parents: 23592
diff changeset
   364
else
41aa84a568f3 8042159: Allow using a system-installed lcms2
omajid
parents: 23592
diff changeset
   365
  BUILD_LIBLCMS_INCLUDE_FILES :=
41aa84a568f3 8042159: Allow using a system-installed lcms2
omajid
parents: 23592
diff changeset
   366
endif
41aa84a568f3 8042159: Allow using a system-installed lcms2
omajid
parents: 23592
diff changeset
   367
49244
995a5556edfa 8199639: Introduce SetupJdkLibrary and SetupJdkExecutable
ihse
parents: 49241
diff changeset
   368
$(eval $(call SetupJdkLibrary, BUILD_LIBLCMS, \
49070
d7859531621b 8198751: Refactor SetupNativeCompilation to take NAME and TYPE
ihse
parents: 48766
diff changeset
   369
    NAME := lcms, \
24540
41aa84a568f3 8042159: Allow using a system-installed lcms2
omajid
parents: 23592
diff changeset
   370
    INCLUDE_FILES := $(BUILD_LIBLCMS_INCLUDE_FILES), \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   371
    OPTIMIZATION := HIGHEST, \
56433
c3cf838aa2da Initial fix for setting SRC automatically + HEADER_FLAGS.
ihse
parents: 56421
diff changeset
   372
    CFLAGS := $(LCMS_CFLAGS_JDKLIB) \
24540
41aa84a568f3 8042159: Allow using a system-installed lcms2
omajid
parents: 23592
diff changeset
   373
        $(LCMS_CFLAGS), \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   374
    CFLAGS_solaris := -xc99=no_lib, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   375
    CFLAGS_windows := -DCMS_IS_WINDOWS_, \
56511
2b67c11c0db6 Introduce EXTRA_SRC and supply headers as dirs.
ihse
parents: 56488
diff changeset
   376
    EXTRA_HEADER_DIRS := \
2b67c11c0db6 Introduce EXTRA_SRC and supply headers as dirs.
ihse
parents: 56488
diff changeset
   377
        $(call FindSrcDirsForComponent, java.desktop, common/awt/debug) \
2b67c11c0db6 Introduce EXTRA_SRC and supply headers as dirs.
ihse
parents: 56488
diff changeset
   378
        $(call FindSrcDirsForComponent, java.desktop, libawt/java2d), \
56433
c3cf838aa2da Initial fix for setting SRC automatically + HEADER_FLAGS.
ihse
parents: 56421
diff changeset
   379
    HEADERS_FROM_SRC := $(LIBLCMS_HEADERS_FROM_SRC), \
39550
8d587cab45d2 8160294: Some client libraries cannot be built with GCC 6
ysuenaga
parents: 39025
diff changeset
   380
    DISABLED_WARNINGS_gcc := format-nonliteral type-limits misleading-indentation, \
29374
f031a666744a 8074096: Disable (most) native warnings in JDK on a per-library basis
ihse
parents: 29006
diff changeset
   381
    DISABLED_WARNINGS_clang := tautological-compare, \
f031a666744a 8074096: Disable (most) native warnings in JDK on a per-library basis
ihse
parents: 29006
diff changeset
   382
    DISABLED_WARNINGS_solstudio := E_STATEMENT_NOT_REACHED, \
42747
807791cafb87 8170954: non-ASCII characters in lcms and harfbuzz break Windows builds on some locales
dbuck
parents: 42352
diff changeset
   383
    DISABLED_WARNINGS_microsoft := 4819, \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   384
    LDFLAGS := $(LDFLAGS_JDKLIB) \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   385
        $(call SET_SHARED_LIBRARY_ORIGIN), \
27944
c6d5edd39016 8066752: Remove space after -L on linker lines
erikj
parents: 27799
diff changeset
   386
    LDFLAGS_unix := -L$(INSTALL_LIBRARIES_HERE), \
49640
dd76fcbda95f 8200383: Can't build on SPARC Hotspot with code which use math functions
kvn
parents: 49263
diff changeset
   387
    LIBS_unix := -lawt -ljvm -ljava $(LCMS_LIBS) $(LIBM), \
33406
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 33305
diff changeset
   388
    LIBS_windows := $(WIN_AWT_LIB) $(WIN_JAVA_LIB), \
35276
50b3cdcef339 8145596: Enable debug symbols for all libraries
ihse
parents: 35241
diff changeset
   389
))
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   390
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 26751
diff changeset
   391
TARGETS += $(BUILD_LIBLCMS)
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   392
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   393
$(BUILD_LIBLCMS): $(BUILD_LIBAWT)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   394
26191
a0ff4b39d34b 8055188: General cleanup of minor issues from source restructure
erikj
parents: 25993
diff changeset
   395
################################################################################
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   396
49440
396ea30afbd5 8200178: Remove mapfiles for JDK native libraries
ihse
parents: 49263
diff changeset
   397
# "DISABLED_WARNINGS_gcc := clobbered" rationale:
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   398
# Suppress gcc warnings like "variable might be clobbered by 'longjmp'
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   399
# or 'vfork'": this warning indicates that some variable is placed to
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   400
# a register by optimized compiler and it's value might be lost on longjmp().
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   401
# Recommended way to avoid such warning is to declare the variable as
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   402
# volatile to prevent the optimization. However, this approach does not
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   403
# work because we have to declare all variables as volatile in result.
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   404
25103
4dcb7cd7652e 8043805: Allow using a system-installed libjpeg
omajid
parents: 24566
diff changeset
   405
ifeq ($(USE_EXTERNAL_LIBJPEG), true)
4dcb7cd7652e 8043805: Allow using a system-installed libjpeg
omajid
parents: 24566
diff changeset
   406
  LIBJPEG_LIBS := -ljpeg
4dcb7cd7652e 8043805: Allow using a system-installed libjpeg
omajid
parents: 24566
diff changeset
   407
  BUILD_LIBJAVAJPEG_INCLUDE_FILES := \
33647
2665054d3864 8139932: Typo in makefile changes for 8043805 [Allow using a system-installed libjpeg]
omajid
parents: 33518
diff changeset
   408
      imageioJPEG.c \
25103
4dcb7cd7652e 8043805: Allow using a system-installed libjpeg
omajid
parents: 24566
diff changeset
   409
      jpegdecoder.c
56433
c3cf838aa2da Initial fix for setting SRC automatically + HEADER_FLAGS.
ihse
parents: 56421
diff changeset
   410
  # If we're using an external library, we'll can't include our own SRC path
c3cf838aa2da Initial fix for setting SRC automatically + HEADER_FLAGS.
ihse
parents: 56421
diff changeset
   411
  # as includes, instead the system headers should be used.
c3cf838aa2da Initial fix for setting SRC automatically + HEADER_FLAGS.
ihse
parents: 56421
diff changeset
   412
  LIBJPEG_HEADERS_FROM_SRC := false
25103
4dcb7cd7652e 8043805: Allow using a system-installed libjpeg
omajid
parents: 24566
diff changeset
   413
else
4dcb7cd7652e 8043805: Allow using a system-installed libjpeg
omajid
parents: 24566
diff changeset
   414
  LIBJPEG_LIBS :=
4dcb7cd7652e 8043805: Allow using a system-installed libjpeg
omajid
parents: 24566
diff changeset
   415
  BUILD_LIBJAVAJPEG_INCLUDE_FILES :=
4dcb7cd7652e 8043805: Allow using a system-installed libjpeg
omajid
parents: 24566
diff changeset
   416
endif
4dcb7cd7652e 8043805: Allow using a system-installed libjpeg
omajid
parents: 24566
diff changeset
   417
49244
995a5556edfa 8199639: Introduce SetupJdkLibrary and SetupJdkExecutable
ihse
parents: 49241
diff changeset
   418
$(eval $(call SetupJdkLibrary, BUILD_LIBJAVAJPEG, \
49070
d7859531621b 8198751: Refactor SetupNativeCompilation to take NAME and TYPE
ihse
parents: 48766
diff changeset
   419
    NAME := javajpeg, \
25103
4dcb7cd7652e 8043805: Allow using a system-installed libjpeg
omajid
parents: 24566
diff changeset
   420
    INCLUDE_FILES := $(BUILD_LIBJAVAJPEG_INCLUDE_FILES), \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   421
    OPTIMIZATION := HIGHEST, \
56433
c3cf838aa2da Initial fix for setting SRC automatically + HEADER_FLAGS.
ihse
parents: 56421
diff changeset
   422
    CFLAGS := $(CFLAGS_JDKLIB), \
c3cf838aa2da Initial fix for setting SRC automatically + HEADER_FLAGS.
ihse
parents: 56421
diff changeset
   423
    HEADERS_FROM_SRC := $(LIBJPEG_HEADERS_FROM_SRC), \
48766
2c4d1993b5f9 8196985: Disable new warnings from GCC 7.3 in jdk libraries
erikj
parents: 48751
diff changeset
   424
    DISABLED_WARNINGS_gcc := clobbered implicit-fallthrough shift-negative-value, \
33305
ed708a0e3482 8140223: fix the build with a toolchain with a linker defaulting to ld --as-needed
erikj
parents: 33285
diff changeset
   425
    LDFLAGS := $(LDFLAGS_JDKLIB) \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   426
        $(call SET_SHARED_LIBRARY_ORIGIN), \
33406
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 33305
diff changeset
   427
    LIBS := $(LIBJPEG_LIBS) $(JDKLIB_LIBS), \
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 33305
diff changeset
   428
    LIBS_windows := $(WIN_JAVA_LIB) jvm.lib, \
35276
50b3cdcef339 8145596: Enable debug symbols for all libraries
ihse
parents: 35241
diff changeset
   429
))
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   430
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 26751
diff changeset
   431
$(BUILD_LIBJAVAJPEG): $(call FindLib, java.base, java)
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   432
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 26751
diff changeset
   433
TARGETS += $(BUILD_LIBJAVAJPEG)
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   434
26191
a0ff4b39d34b 8055188: General cleanup of minor issues from source restructure
erikj
parents: 25993
diff changeset
   435
################################################################################
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   436
41132
2a3c61e80af0 8163102: Fix headless only configuration option
erikj
parents: 40205
diff changeset
   437
# Mac and Windows only use the native AWT lib, do not build libawt_headless
2a3c61e80af0 8163102: Fix headless only configuration option
erikj
parents: 40205
diff changeset
   438
ifeq ($(findstring $(OPENJDK_TARGET_OS), windows macosx),)
29006
0d72c5ab72d8 8072116: [Solaris] : Fix for 8071710 needs to be updated for build dependency checking
prr
parents: 29002
diff changeset
   439
56511
2b67c11c0db6 Introduce EXTRA_SRC and supply headers as dirs.
ihse
parents: 56488
diff changeset
   440
  LIBAWT_HEADLESS_EXTRA_SRC := \
2b67c11c0db6 Introduce EXTRA_SRC and supply headers as dirs.
ihse
parents: 56488
diff changeset
   441
      $(call FindSrcDirsForComponent, java.desktop, common/java2d) \
47217
72e3ae9a25eb 8187444: Forest Consolidation: Make build work
erikj
parents: 47216
diff changeset
   442
      $(TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/common/awt \
72e3ae9a25eb 8187444: Forest Consolidation: Make build work
erikj
parents: 47216
diff changeset
   443
      $(TOPDIR)/src/java.desktop/share/native/common/font \
41132
2a3c61e80af0 8163102: Fix headless only configuration option
erikj
parents: 40205
diff changeset
   444
      #
29006
0d72c5ab72d8 8072116: [Solaris] : Fix for 8071710 needs to be updated for build dependency checking
prr
parents: 29002
diff changeset
   445
41132
2a3c61e80af0 8163102: Fix headless only configuration option
erikj
parents: 40205
diff changeset
   446
  LIBAWT_HEADLESS_EXCLUDES := medialib
56433
c3cf838aa2da Initial fix for setting SRC automatically + HEADER_FLAGS.
ihse
parents: 56421
diff changeset
   447
  LIBAWT_HEADLESS_CFLAGS := $(CUPS_CFLAGS) $(FONTCONFIG_CFLAGS) $(X_CFLAGS) \
c3cf838aa2da Initial fix for setting SRC automatically + HEADER_FLAGS.
ihse
parents: 56421
diff changeset
   448
      -DHEADLESS=true -DPACKAGE_PATH=\"$(PACKAGE_PATH)\"
29006
0d72c5ab72d8 8072116: [Solaris] : Fix for 8071710 needs to be updated for build dependency checking
prr
parents: 29002
diff changeset
   449
49244
995a5556edfa 8199639: Introduce SetupJdkLibrary and SetupJdkExecutable
ihse
parents: 49241
diff changeset
   450
  $(eval $(call SetupJdkLibrary, BUILD_LIBAWT_HEADLESS, \
49070
d7859531621b 8198751: Refactor SetupNativeCompilation to take NAME and TYPE
ihse
parents: 48766
diff changeset
   451
      NAME := awt_headless, \
56511
2b67c11c0db6 Introduce EXTRA_SRC and supply headers as dirs.
ihse
parents: 56488
diff changeset
   452
      EXTRA_SRC := $(LIBAWT_HEADLESS_EXTRA_SRC), \
41132
2a3c61e80af0 8163102: Fix headless only configuration option
erikj
parents: 40205
diff changeset
   453
      EXCLUDES := $(LIBAWT_HEADLESS_EXCLUDES), \
2a3c61e80af0 8163102: Fix headless only configuration option
erikj
parents: 40205
diff changeset
   454
      OPTIMIZATION := LOW, \
2a3c61e80af0 8163102: Fix headless only configuration option
erikj
parents: 40205
diff changeset
   455
      CFLAGS := $(CFLAGS_JDKLIB) \
2a3c61e80af0 8163102: Fix headless only configuration option
erikj
parents: 40205
diff changeset
   456
          $(LIBAWT_HEADLESS_CFLAGS), \
56511
2b67c11c0db6 Introduce EXTRA_SRC and supply headers as dirs.
ihse
parents: 56488
diff changeset
   457
      EXTRA_HEADER_DIRS := \
2b67c11c0db6 Introduce EXTRA_SRC and supply headers as dirs.
ihse
parents: 56488
diff changeset
   458
            $(call FindSrcDirsForComponent, java.desktop, common/awt/debug) \
2b67c11c0db6 Introduce EXTRA_SRC and supply headers as dirs.
ihse
parents: 56488
diff changeset
   459
            $(call FindSrcDirsForComponent, java.desktop, common/font) \
2b67c11c0db6 Introduce EXTRA_SRC and supply headers as dirs.
ihse
parents: 56488
diff changeset
   460
            $(call FindSrcDirsForComponent, java.desktop, common/java2d/opengl) \
2b67c11c0db6 Introduce EXTRA_SRC and supply headers as dirs.
ihse
parents: 56488
diff changeset
   461
            $(call FindSrcDirsForComponent, java.desktop, libawt/java2d) \
2b67c11c0db6 Introduce EXTRA_SRC and supply headers as dirs.
ihse
parents: 56488
diff changeset
   462
            $(TOPDIR)/src/java.desktop/share/native/libawt/awt/image \
2b67c11c0db6 Introduce EXTRA_SRC and supply headers as dirs.
ihse
parents: 56488
diff changeset
   463
            $(TOPDIR)/src/java.desktop/share/native/libawt/awt/image/cvutils \
2b67c11c0db6 Introduce EXTRA_SRC and supply headers as dirs.
ihse
parents: 56488
diff changeset
   464
            $(TOPDIR)/src/java.desktop/share/native/libawt/java2d/loops \
2b67c11c0db6 Introduce EXTRA_SRC and supply headers as dirs.
ihse
parents: 56488
diff changeset
   465
            $(TOPDIR)/src/java.desktop/share/native/libawt/java2d/pipe, \
41132
2a3c61e80af0 8163102: Fix headless only configuration option
erikj
parents: 40205
diff changeset
   466
      DISABLED_WARNINGS_xlc := 1506-356, \
2a3c61e80af0 8163102: Fix headless only configuration option
erikj
parents: 40205
diff changeset
   467
      DISABLED_WARNINGS_solstudio := E_EMPTY_TRANSLATION_UNIT, \
2a3c61e80af0 8163102: Fix headless only configuration option
erikj
parents: 40205
diff changeset
   468
      LDFLAGS := $(LDFLAGS_JDKLIB) \
2a3c61e80af0 8163102: Fix headless only configuration option
erikj
parents: 40205
diff changeset
   469
          $(call SET_SHARED_LIBRARY_ORIGIN), \
2a3c61e80af0 8163102: Fix headless only configuration option
erikj
parents: 40205
diff changeset
   470
      LDFLAGS_unix := -L$(INSTALL_LIBRARIES_HERE), \
2a3c61e80af0 8163102: Fix headless only configuration option
erikj
parents: 40205
diff changeset
   471
      LIBS_unix := -lawt -ljvm -ljava, \
2a3c61e80af0 8163102: Fix headless only configuration option
erikj
parents: 40205
diff changeset
   472
      LIBS_linux := $(LIBM) $(LIBDL), \
49241
de4b3a04feae 8199606: Set -lc as global LIBS on solstudio
ihse
parents: 49239
diff changeset
   473
      LIBS_solaris := $(LIBM) $(LIBDL) $(LIBCXX), \
41132
2a3c61e80af0 8163102: Fix headless only configuration option
erikj
parents: 40205
diff changeset
   474
  ))
29006
0d72c5ab72d8 8072116: [Solaris] : Fix for 8071710 needs to be updated for build dependency checking
prr
parents: 29002
diff changeset
   475
41132
2a3c61e80af0 8163102: Fix headless only configuration option
erikj
parents: 40205
diff changeset
   476
  # AIX warning explanation:
2a3c61e80af0 8163102: Fix headless only configuration option
erikj
parents: 40205
diff changeset
   477
  # 1506-356 : (W) Compilation unit is empty.
2a3c61e80af0 8163102: Fix headless only configuration option
erikj
parents: 40205
diff changeset
   478
  #            This happens during the headless build
37529
868c7195632c 8154087: Fix AIX and Linux/ppc64le after the integration of the new hotspot build
simonis
parents: 36110
diff changeset
   479
41132
2a3c61e80af0 8163102: Fix headless only configuration option
erikj
parents: 40205
diff changeset
   480
  $(BUILD_LIBAWT_HEADLESS): $(BUILD_LIBAWT)
29006
0d72c5ab72d8 8072116: [Solaris] : Fix for 8071710 needs to be updated for build dependency checking
prr
parents: 29002
diff changeset
   481
41132
2a3c61e80af0 8163102: Fix headless only configuration option
erikj
parents: 40205
diff changeset
   482
  TARGETS += $(BUILD_LIBAWT_HEADLESS)
29006
0d72c5ab72d8 8072116: [Solaris] : Fix for 8071710 needs to be updated for build dependency checking
prr
parents: 29002
diff changeset
   483
0d72c5ab72d8 8072116: [Solaris] : Fix for 8071710 needs to be updated for build dependency checking
prr
parents: 29002
diff changeset
   484
endif
0d72c5ab72d8 8072116: [Solaris] : Fix for 8071710 needs to be updated for build dependency checking
prr
parents: 29002
diff changeset
   485
0d72c5ab72d8 8072116: [Solaris] : Fix for 8071710 needs to be updated for build dependency checking
prr
parents: 29002
diff changeset
   486
################################################################################
0d72c5ab72d8 8072116: [Solaris] : Fix for 8071710 needs to be updated for build dependency checking
prr
parents: 29002
diff changeset
   487
49234
3375a8039fde 8193017: Import freetype sources into OpenJDK source tree
prr
parents: 49106
diff changeset
   488
ifeq ($(FREETYPE_TO_USE), system)
56433
c3cf838aa2da Initial fix for setting SRC automatically + HEADER_FLAGS.
ihse
parents: 56421
diff changeset
   489
  # For use by libfontmanager:
49234
3375a8039fde 8193017: Import freetype sources into OpenJDK source tree
prr
parents: 49106
diff changeset
   490
  LIBFREETYPE_CFLAGS := $(FREETYPE_CFLAGS)
3375a8039fde 8193017: Import freetype sources into OpenJDK source tree
prr
parents: 49106
diff changeset
   491
  LIBFREETYPE_LIBS := $(FREETYPE_LIBS)
3375a8039fde 8193017: Import freetype sources into OpenJDK source tree
prr
parents: 49106
diff changeset
   492
else
56511
2b67c11c0db6 Introduce EXTRA_SRC and supply headers as dirs.
ihse
parents: 56488
diff changeset
   493
  BUILD_LIBFREETYPE_HEADER_DIRS := $(TOPDIR)/src/java.desktop/share/native/libfreetype/include
56433
c3cf838aa2da Initial fix for setting SRC automatically + HEADER_FLAGS.
ihse
parents: 56421
diff changeset
   494
  BUILD_LIBFREETYPE_CFLAGS := -DFT2_BUILD_LIBRARY $(EXPORT_ALL_SYMBOLS)
c3cf838aa2da Initial fix for setting SRC automatically + HEADER_FLAGS.
ihse
parents: 56421
diff changeset
   495
c3cf838aa2da Initial fix for setting SRC automatically + HEADER_FLAGS.
ihse
parents: 56421
diff changeset
   496
  # For use by libfontmanager:
49234
3375a8039fde 8193017: Import freetype sources into OpenJDK source tree
prr
parents: 49106
diff changeset
   497
  LIBFREETYPE_CFLAGS := $(BUILD_LIBFREETYPE_HEADERS)
3375a8039fde 8193017: Import freetype sources into OpenJDK source tree
prr
parents: 49106
diff changeset
   498
  ifeq ($(OPENJDK_TARGET_OS), windows)
3375a8039fde 8193017: Import freetype sources into OpenJDK source tree
prr
parents: 49106
diff changeset
   499
    LIBFREETYPE_LIBS := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libfreetype/freetype.lib
3375a8039fde 8193017: Import freetype sources into OpenJDK source tree
prr
parents: 49106
diff changeset
   500
  else
3375a8039fde 8193017: Import freetype sources into OpenJDK source tree
prr
parents: 49106
diff changeset
   501
    LIBFREETYPE_LIBS := -lfreetype
3375a8039fde 8193017: Import freetype sources into OpenJDK source tree
prr
parents: 49106
diff changeset
   502
  endif
3375a8039fde 8193017: Import freetype sources into OpenJDK source tree
prr
parents: 49106
diff changeset
   503
49244
995a5556edfa 8199639: Introduce SetupJdkLibrary and SetupJdkExecutable
ihse
parents: 49241
diff changeset
   504
  $(eval $(call SetupJdkLibrary, BUILD_LIBFREETYPE, \
49234
3375a8039fde 8193017: Import freetype sources into OpenJDK source tree
prr
parents: 49106
diff changeset
   505
      NAME := freetype, \
3375a8039fde 8193017: Import freetype sources into OpenJDK source tree
prr
parents: 49106
diff changeset
   506
      OPTIMIZATION := HIGHEST, \
56433
c3cf838aa2da Initial fix for setting SRC automatically + HEADER_FLAGS.
ihse
parents: 56421
diff changeset
   507
      CFLAGS := $(CFLAGS_JDKLIB) \
c3cf838aa2da Initial fix for setting SRC automatically + HEADER_FLAGS.
ihse
parents: 56421
diff changeset
   508
          $(BUILD_LIBFREETYPE_CFLAGS), \
56511
2b67c11c0db6 Introduce EXTRA_SRC and supply headers as dirs.
ihse
parents: 56488
diff changeset
   509
      EXTRA_HEADER_DIRS := $(BUILD_LIBFREETYPE_HEADER_DIRS), \
49234
3375a8039fde 8193017: Import freetype sources into OpenJDK source tree
prr
parents: 49106
diff changeset
   510
      DISABLED_WARNINGS_solstudio := \
3375a8039fde 8193017: Import freetype sources into OpenJDK source tree
prr
parents: 49106
diff changeset
   511
         E_STATEMENT_NOT_REACHED \
3375a8039fde 8193017: Import freetype sources into OpenJDK source tree
prr
parents: 49106
diff changeset
   512
         E_END_OF_LOOP_CODE_NOT_REACHED, \
49566
7c224ec572d0 8201267: Disable warnings for VS2017 to enable building
erikj
parents: 49539
diff changeset
   513
      DISABLED_WARNINGS_microsoft := 4267 4244 4312, \
49234
3375a8039fde 8193017: Import freetype sources into OpenJDK source tree
prr
parents: 49106
diff changeset
   514
      LDFLAGS := $(LDFLAGS_JDKLIB) \
3375a8039fde 8193017: Import freetype sources into OpenJDK source tree
prr
parents: 49106
diff changeset
   515
          $(call SET_SHARED_LIBRARY_ORIGIN), \
3375a8039fde 8193017: Import freetype sources into OpenJDK source tree
prr
parents: 49106
diff changeset
   516
  ))
3375a8039fde 8193017: Import freetype sources into OpenJDK source tree
prr
parents: 49106
diff changeset
   517
3375a8039fde 8193017: Import freetype sources into OpenJDK source tree
prr
parents: 49106
diff changeset
   518
  TARGETS += $(BUILD_LIBFREETYPE)
3375a8039fde 8193017: Import freetype sources into OpenJDK source tree
prr
parents: 49106
diff changeset
   519
endif
3375a8039fde 8193017: Import freetype sources into OpenJDK source tree
prr
parents: 49106
diff changeset
   520
3375a8039fde 8193017: Import freetype sources into OpenJDK source tree
prr
parents: 49106
diff changeset
   521
###########################################################################
3375a8039fde 8193017: Import freetype sources into OpenJDK source tree
prr
parents: 49106
diff changeset
   522
34414
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents: 33647
diff changeset
   523
#### Begin harfbuzz configuration
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents: 33647
diff changeset
   524
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents: 33647
diff changeset
   525
HARFBUZZ_CFLAGS := -DHAVE_OT -DHAVE_FALLBACK -DHAVE_UCDN
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents: 33647
diff changeset
   526
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents: 33647
diff changeset
   527
ifneq ($(OPENJDK_TARGET_OS), windows)
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents: 33647
diff changeset
   528
  HARFBUZZ_CFLAGS += -DGETPAGESIZE -DHAVE_MPROTECT -DHAVE_PTHREAD \
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents: 33647
diff changeset
   529
                      -DHAVE_SYSCONF -DHAVE_SYS_MMAN_H -DHAVE_UNISTD_H
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents: 33647
diff changeset
   530
endif
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents: 33647
diff changeset
   531
ifneq (, $(findstring $(OPENJDK_TARGET_OS), linux macosx))
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents: 33647
diff changeset
   532
  HARFBUZZ_CFLAGS += -DHAVE_INTEL_ATOMIC_PRIMITIVES
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents: 33647
diff changeset
   533
endif
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents: 33647
diff changeset
   534
ifeq ($(OPENJDK_TARGET_OS), solaris)
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents: 33647
diff changeset
   535
  HARFBUZZ_CFLAGS += -DHAVE_SOLARIS_ATOMIC_OPS
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents: 33647
diff changeset
   536
endif
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents: 33647
diff changeset
   537
ifeq ($(OPENJDK_TARGET_OS), macosx)
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents: 33647
diff changeset
   538
  HARFBUZZ_CFLAGS += -DHAVE_CORETEXT
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents: 33647
diff changeset
   539
endif
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents: 33647
diff changeset
   540
ifneq ($(OPENJDK_TARGET_OS), macosx)
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents: 33647
diff changeset
   541
  LIBFONTMANAGER_EXCLUDE_FILES += harfbuzz/hb-coretext.cc
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents: 33647
diff changeset
   542
endif
34432
958d65712d3e 8144616: Problem building OpenJDK/harfbuzz on jprt
prr
parents: 34414
diff changeset
   543
# hb-ft.cc is not presently needed, and requires freetype 2.4.2 or later.
958d65712d3e 8144616: Problem building OpenJDK/harfbuzz on jprt
prr
parents: 34414
diff changeset
   544
LIBFONTMANAGER_EXCLUDE_FILES += harfbuzz/hb-ft.cc
34414
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents: 33647
diff changeset
   545
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents: 33647
diff changeset
   546
LIBFONTMANAGER_CFLAGS += $(HARFBUZZ_CFLAGS)
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents: 33647
diff changeset
   547
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents: 33647
diff changeset
   548
#### End harfbuzz configuration
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents: 33647
diff changeset
   549
49234
3375a8039fde 8193017: Import freetype sources into OpenJDK source tree
prr
parents: 49106
diff changeset
   550
LIBFONTMANAGER_CFLAGS += $(LIBFREETYPE_CFLAGS)
3375a8039fde 8193017: Import freetype sources into OpenJDK source tree
prr
parents: 49106
diff changeset
   551
BUILD_LIBFONTMANAGER_FONTLIB += $(LIBFREETYPE_LIBS)
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   552
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   553
LIBFONTMANAGER_OPTIMIZATION := HIGH
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   554
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   555
ifeq ($(OPENJDK_TARGET_OS), windows)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   556
  LIBFONTMANAGER_EXCLUDE_FILES += X11FontScaler.c \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   557
      X11TextRenderer.c
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   558
  LIBFONTMANAGER_OPTIMIZATION := HIGHEST
21130
0f0b9c8f701a 8025673: [macosx] Disable X11 AWT toolkit
dholmes
parents: 20901
diff changeset
   559
else ifeq ($(OPENJDK_TARGET_OS), macosx)
0f0b9c8f701a 8025673: [macosx] Disable X11 AWT toolkit
dholmes
parents: 20901
diff changeset
   560
  LIBFONTMANAGER_EXCLUDE_FILES += X11FontScaler.c \
0f0b9c8f701a 8025673: [macosx] Disable X11 AWT toolkit
dholmes
parents: 20901
diff changeset
   561
      X11TextRenderer.c \
0f0b9c8f701a 8025673: [macosx] Disable X11 AWT toolkit
dholmes
parents: 20901
diff changeset
   562
      fontpath.c \
0f0b9c8f701a 8025673: [macosx] Disable X11 AWT toolkit
dholmes
parents: 20901
diff changeset
   563
      lcdglyph.c
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   564
else
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   565
  LIBFONTMANAGER_EXCLUDE_FILES += fontpath.c \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   566
      lcdglyph.c
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   567
endif
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   568
56433
c3cf838aa2da Initial fix for setting SRC automatically + HEADER_FLAGS.
ihse
parents: 56421
diff changeset
   569
LIBFONTMANAGER_CFLAGS += $(X_CFLAGS) -DLE_STANDALONE -DHEADLESS
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   570
35711
d08f24178498 8148629: Disable remaining warnings in awt/fontmanager
erikj
parents: 35276
diff changeset
   571
ifeq ($(TOOLCHAIN_TYPE), gcc)
d08f24178498 8148629: Disable remaining warnings in awt/fontmanager
erikj
parents: 35276
diff changeset
   572
  # Turn off all warnings for sunFont.c. This is needed because the specific warning
d08f24178498 8148629: Disable remaining warnings in awt/fontmanager
erikj
parents: 35276
diff changeset
   573
  # about discarding 'const' qualifier cannot be turned off individually.
d08f24178498 8148629: Disable remaining warnings in awt/fontmanager
erikj
parents: 35276
diff changeset
   574
  BUILD_LIBFONTMANAGER_sunFont.c_CFLAGS := -w
d08f24178498 8148629: Disable remaining warnings in awt/fontmanager
erikj
parents: 35276
diff changeset
   575
  # Turn off aliasing with GCC for ExtensionSubtables.cpp
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   576
  BUILD_LIBFONTMANAGER_ExtensionSubtables.cpp_CXXFLAGS := -fno-strict-aliasing
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   577
endif
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   578
49693
fa23ea24dade 8196516: libfontmanager must be built with LDFLAGS allowing unresolved symbols
sgehwolf
parents: 49566
diff changeset
   579
# LDFLAGS clarification:
fa23ea24dade 8196516: libfontmanager must be built with LDFLAGS allowing unresolved symbols
sgehwolf
parents: 49566
diff changeset
   580
#   Filter relevant linker flags disallowing unresolved symbols as we cannot
fa23ea24dade 8196516: libfontmanager must be built with LDFLAGS allowing unresolved symbols
sgehwolf
parents: 49566
diff changeset
   581
#   build-time decide to which library to link against (libawt_headless or
fa23ea24dade 8196516: libfontmanager must be built with LDFLAGS allowing unresolved symbols
sgehwolf
parents: 49566
diff changeset
   582
#   libawt_xawt). See JDK-8196516 for details.
49244
995a5556edfa 8199639: Introduce SetupJdkLibrary and SetupJdkExecutable
ihse
parents: 49241
diff changeset
   583
$(eval $(call SetupJdkLibrary, BUILD_LIBFONTMANAGER, \
49070
d7859531621b 8198751: Refactor SetupNativeCompilation to take NAME and TYPE
ihse
parents: 48766
diff changeset
   584
    NAME := fontmanager, \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   585
    EXCLUDE_FILES := $(LIBFONTMANAGER_EXCLUDE_FILES) \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   586
        AccelGlyphCache.c, \
29931
64e274ed6567 8077824: Introduce DefineNativeToolchain to handle toolchain configurations
erikj
parents: 29734
diff changeset
   587
    TOOLCHAIN := TOOLCHAIN_LINK_CXX, \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   588
    CFLAGS := $(CFLAGS_JDKLIB) $(LIBFONTMANAGER_CFLAGS), \
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   589
    CXXFLAGS := $(CXXFLAGS_JDKLIB) $(LIBFONTMANAGER_CFLAGS), \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   590
    OPTIMIZATION := $(LIBFONTMANAGER_OPTIMIZATION), \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   591
    CFLAGS_windows = -DCC_NOEX, \
56511
2b67c11c0db6 Introduce EXTRA_SRC and supply headers as dirs.
ihse
parents: 56488
diff changeset
   592
    EXTRA_HEADER_DIRS := \
2b67c11c0db6 Introduce EXTRA_SRC and supply headers as dirs.
ihse
parents: 56488
diff changeset
   593
        $(call FindSrcDirsForComponent, java.desktop, common/awt) \
2b67c11c0db6 Introduce EXTRA_SRC and supply headers as dirs.
ihse
parents: 56488
diff changeset
   594
        $(call FindSrcDirsForComponent, java.desktop, common/font) \
2b67c11c0db6 Introduce EXTRA_SRC and supply headers as dirs.
ihse
parents: 56488
diff changeset
   595
        $(call FindSrcDirsForComponent, java.desktop, libawt/java2d) \
2b67c11c0db6 Introduce EXTRA_SRC and supply headers as dirs.
ihse
parents: 56488
diff changeset
   596
        $(TOPDIR)/src/java.desktop/share/native/libfontmanager/harfbuzz \
2b67c11c0db6 Introduce EXTRA_SRC and supply headers as dirs.
ihse
parents: 56488
diff changeset
   597
        $(TOPDIR)/src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ucdn \
2b67c11c0db6 Introduce EXTRA_SRC and supply headers as dirs.
ihse
parents: 56488
diff changeset
   598
        $(TOPDIR)/src/java.desktop/share/native/libawt/java2d/loops \
2b67c11c0db6 Introduce EXTRA_SRC and supply headers as dirs.
ihse
parents: 56488
diff changeset
   599
        $(TOPDIR)/src/java.desktop/share/native/libawt/java2d/pipe, \
37529
868c7195632c 8154087: Fix AIX and Linux/ppc64le after the integration of the new hotspot build
simonis
parents: 36110
diff changeset
   600
    WARNINGS_AS_ERRORS_xlc := false, \
35711
d08f24178498 8148629: Disable remaining warnings in awt/fontmanager
erikj
parents: 35276
diff changeset
   601
    DISABLED_WARNINGS_gcc := sign-compare int-to-pointer-cast \
48766
2c4d1993b5f9 8196985: Disable new warnings from GCC 7.3 in jdk libraries
erikj
parents: 48751
diff changeset
   602
        type-limits missing-field-initializers implicit-fallthrough, \
35711
d08f24178498 8148629: Disable remaining warnings in awt/fontmanager
erikj
parents: 35276
diff changeset
   603
    DISABLED_WARNINGS_CXX_gcc := reorder delete-non-virtual-dtor strict-overflow \
d08f24178498 8148629: Disable remaining warnings in awt/fontmanager
erikj
parents: 35276
diff changeset
   604
        maybe-uninitialized, \
30434
6b881118c93b 8074859: Turn on warnings as error
ihse
parents: 30325
diff changeset
   605
    DISABLED_WARNINGS_clang := unused-value incompatible-pointer-types \
6b881118c93b 8074859: Turn on warnings as error
ihse
parents: 30325
diff changeset
   606
        tautological-constant-out-of-range-compare int-to-pointer-cast, \
35711
d08f24178498 8148629: Disable remaining warnings in awt/fontmanager
erikj
parents: 35276
diff changeset
   607
    DISABLED_WARNINGS_C_solstudio = \
d08f24178498 8148629: Disable remaining warnings in awt/fontmanager
erikj
parents: 35276
diff changeset
   608
        E_INTEGER_OVERFLOW_DETECTED \
d08f24178498 8148629: Disable remaining warnings in awt/fontmanager
erikj
parents: 35276
diff changeset
   609
        E_ARG_INCOMPATIBLE_WITH_ARG_L \
d08f24178498 8148629: Disable remaining warnings in awt/fontmanager
erikj
parents: 35276
diff changeset
   610
        E_ENUM_VAL_OVERFLOWS_INT_MAX, \
d08f24178498 8148629: Disable remaining warnings in awt/fontmanager
erikj
parents: 35276
diff changeset
   611
    DISABLED_WARNINGS_CXX_solstudio := \
d08f24178498 8148629: Disable remaining warnings in awt/fontmanager
erikj
parents: 35276
diff changeset
   612
        truncwarn wvarhidenmem wvarhidemem wbadlkginit identexpected \
d08f24178498 8148629: Disable remaining warnings in awt/fontmanager
erikj
parents: 35276
diff changeset
   613
        hidevf w_novirtualdescr arrowrtn2, \
48274
51772bf1fb0c 8188836: Upgrade to Harfbuzz 1.7.1 in JDK 10
prr
parents: 48040
diff changeset
   614
    DISABLED_WARNINGS_microsoft := 4267 4244 4018 4090 4996 4146 4334 4819 4101, \
49693
fa23ea24dade 8196516: libfontmanager must be built with LDFLAGS allowing unresolved symbols
sgehwolf
parents: 49566
diff changeset
   615
    LDFLAGS := $(subst -Xlinker -z -Xlinker defs,, \
fa23ea24dade 8196516: libfontmanager must be built with LDFLAGS allowing unresolved symbols
sgehwolf
parents: 49566
diff changeset
   616
        $(subst -Wl$(COMMA)-z$(COMMA)defs,,$(LDFLAGS_JDKLIB))) $(LDFLAGS_CXX_JDK) \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   617
        $(call SET_SHARED_LIBRARY_ORIGIN), \
27944
c6d5edd39016 8066752: Remove space after -L on linker lines
erikj
parents: 27799
diff changeset
   618
    LDFLAGS_unix := -L$(INSTALL_LIBRARIES_HERE), \
33406
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 33305
diff changeset
   619
    LIBS := $(BUILD_LIBFONTMANAGER_FONTLIB), \
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 33305
diff changeset
   620
    LIBS_unix := -lawt -ljava -ljvm $(LIBM) $(LIBCXX), \
49533
0eaddc72d8f4 8199608: Clean up LDFLAGS for libfontmanager
ihse
parents: 49523
diff changeset
   621
    LIBS_aix := -lawt_headless, \
0eaddc72d8f4 8199608: Clean up LDFLAGS for libfontmanager
ihse
parents: 49523
diff changeset
   622
    LIBS_macosx := -lawt_lwawt -framework CoreText -framework CoreFoundation \
0eaddc72d8f4 8199608: Clean up LDFLAGS for libfontmanager
ihse
parents: 49523
diff changeset
   623
        -framework CoreGraphics, \
33406
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 33305
diff changeset
   624
    LIBS_windows := $(WIN_JAVA_LIB) advapi32.lib user32.lib gdi32.lib \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   625
        $(WIN_AWT_LIB), \
35276
50b3cdcef339 8145596: Enable debug symbols for all libraries
ihse
parents: 35241
diff changeset
   626
))
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   627
48040
26f1193f1348 8192876: MacOS build fails intermittently after JDK-8139653
erikj
parents: 48032
diff changeset
   628
$(BUILD_LIBFONTMANAGER): $(BUILD_LIBAWT)
26f1193f1348 8192876: MacOS build fails intermittently after JDK-8139653
erikj
parents: 48032
diff changeset
   629
48731
c832897a3a23 8196509: Linux UI applications broken by the build change for JDK-8196218
prr
parents: 48730
diff changeset
   630
ifneq (, $(findstring $(OPENJDK_TARGET_OS), solaris aix))
48040
26f1193f1348 8192876: MacOS build fails intermittently after JDK-8139653
erikj
parents: 48032
diff changeset
   631
  $(BUILD_LIBFONTMANAGER): $(BUILD_LIBAWT_HEADLESS)
26f1193f1348 8192876: MacOS build fails intermittently after JDK-8139653
erikj
parents: 48032
diff changeset
   632
endif
26f1193f1348 8192876: MacOS build fails intermittently after JDK-8139653
erikj
parents: 48032
diff changeset
   633
49533
0eaddc72d8f4 8199608: Clean up LDFLAGS for libfontmanager
ihse
parents: 49523
diff changeset
   634
ifeq ($(OPENJDK_TARGET_OS), macosx)
49539
af97dd04d913 8201221: JDK-8199608 introduced a build race on macosx
erikj
parents: 49533
diff changeset
   635
  $(BUILD_LIBFONTMANAGER): $(call FindLib, java.desktop, awt_lwawt)
49533
0eaddc72d8f4 8199608: Clean up LDFLAGS for libfontmanager
ihse
parents: 49523
diff changeset
   636
endif
0eaddc72d8f4 8199608: Clean up LDFLAGS for libfontmanager
ihse
parents: 49523
diff changeset
   637
49234
3375a8039fde 8193017: Import freetype sources into OpenJDK source tree
prr
parents: 49106
diff changeset
   638
ifeq ($(FREETYPE_TO_USE), bundled)
3375a8039fde 8193017: Import freetype sources into OpenJDK source tree
prr
parents: 49106
diff changeset
   639
  $(BUILD_LIBFONTMANAGER): $(BUILD_LIBFREETYPE)
3375a8039fde 8193017: Import freetype sources into OpenJDK source tree
prr
parents: 49106
diff changeset
   640
endif
3375a8039fde 8193017: Import freetype sources into OpenJDK source tree
prr
parents: 49106
diff changeset
   641
48040
26f1193f1348 8192876: MacOS build fails intermittently after JDK-8139653
erikj
parents: 48032
diff changeset
   642
TARGETS += $(BUILD_LIBFONTMANAGER)
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   643
26191
a0ff4b39d34b 8055188: General cleanup of minor issues from source restructure
erikj
parents: 25993
diff changeset
   644
################################################################################
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   645
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   646
ifeq ($(OPENJDK_TARGET_OS), windows)
56433
c3cf838aa2da Initial fix for setting SRC automatically + HEADER_FLAGS.
ihse
parents: 56421
diff changeset
   647
c3cf838aa2da Initial fix for setting SRC automatically + HEADER_FLAGS.
ihse
parents: 56421
diff changeset
   648
  LIBJAWT_CFLAGS := -EHsc -DUNICODE -D_UNICODE
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   649
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   650
  ifeq ($(OPENJDK_TARGET_CPU), x86)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   651
    KERNEL32_LIB := kernel32.lib
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   652
  endif
56433
c3cf838aa2da Initial fix for setting SRC automatically + HEADER_FLAGS.
ihse
parents: 56421
diff changeset
   653
49244
995a5556edfa 8199639: Introduce SetupJdkLibrary and SetupJdkExecutable
ihse
parents: 49241
diff changeset
   654
  $(eval $(call SetupJdkLibrary, BUILD_LIBJAWT, \
49070
d7859531621b 8198751: Refactor SetupNativeCompilation to take NAME and TYPE
ihse
parents: 48766
diff changeset
   655
      NAME := jawt, \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   656
      OPTIMIZATION := LOW, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   657
      CFLAGS := $(CXXFLAGS_JDKLIB) \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   658
          $(LIBJAWT_CFLAGS), \
56462
9bb6697e3fbb Fix java.desktop compilation on Windows.
ihse
parents: 56457
diff changeset
   659
      CXXFLAGS := $(CXXFLAGS_JDKLIB) \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   660
          $(LIBJAWT_CFLAGS), \
56511
2b67c11c0db6 Introduce EXTRA_SRC and supply headers as dirs.
ihse
parents: 56488
diff changeset
   661
      EXTRA_HEADER_DIRS := \
2b67c11c0db6 Introduce EXTRA_SRC and supply headers as dirs.
ihse
parents: 56488
diff changeset
   662
          $(call FindSrcDirsForComponent, java.base, include) \
2b67c11c0db6 Introduce EXTRA_SRC and supply headers as dirs.
ihse
parents: 56488
diff changeset
   663
          $(call FindSrcDirsForComponent, java.desktop, include) \
2b67c11c0db6 Introduce EXTRA_SRC and supply headers as dirs.
ihse
parents: 56488
diff changeset
   664
          $(call FindSrcDirsForComponent, java.desktop, common/awt/debug) \
2b67c11c0db6 Introduce EXTRA_SRC and supply headers as dirs.
ihse
parents: 56488
diff changeset
   665
          $(call FindSrcDirsForComponent, java.desktop, libawt/awt/image/cvutils) \
2b67c11c0db6 Introduce EXTRA_SRC and supply headers as dirs.
ihse
parents: 56488
diff changeset
   666
          $(call FindSrcDirsForComponent, java.desktop, libawt/java2d) \
2b67c11c0db6 Introduce EXTRA_SRC and supply headers as dirs.
ihse
parents: 56488
diff changeset
   667
          $(call FindSrcDirsForComponent, java.desktop, libawt/java2d/windows) \
2b67c11c0db6 Introduce EXTRA_SRC and supply headers as dirs.
ihse
parents: 56488
diff changeset
   668
          $(call FindSrcDirsForComponent, java.desktop, libawt/windows) \
2b67c11c0db6 Introduce EXTRA_SRC and supply headers as dirs.
ihse
parents: 56488
diff changeset
   669
          $(call FindSrcDirsForLib, java.base, java),\
33406
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 33305
diff changeset
   670
      LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK), \
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 33305
diff changeset
   671
      LIBS := $(JDKLIB_LIBS) $(KERNEL32_LIB) advapi32.lib $(WIN_AWT_LIB), \
35276
50b3cdcef339 8145596: Enable debug symbols for all libraries
ihse
parents: 35241
diff changeset
   672
  ))
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   673
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   674
  $(BUILD_LIBJAWT): $(BUILD_LIBAWT)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   675
45781
0491f891667c 8183166: lib\jawt.lib is missing from JDK 9 distribution for Windows
erikj
parents: 43806
diff changeset
   676
  $(eval $(call SetupCopyFiles, COPY_JAWT_LIB, \
49263
78af880eec61 8199749: Debug symbols are not copied to exploded image on Mac
erikj
parents: 49261
diff changeset
   677
      FILES := $(BUILD_LIBJAWT_IMPORT_LIBRARY), \
45781
0491f891667c 8183166: lib\jawt.lib is missing from JDK 9 distribution for Windows
erikj
parents: 43806
diff changeset
   678
      DEST := $(SUPPORT_OUTPUTDIR)/modules_libs/$(MODULE), \
0491f891667c 8183166: lib\jawt.lib is missing from JDK 9 distribution for Windows
erikj
parents: 43806
diff changeset
   679
  ))
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   680
45781
0491f891667c 8183166: lib\jawt.lib is missing from JDK 9 distribution for Windows
erikj
parents: 43806
diff changeset
   681
  $(COPY_JAWT_LIB): $(BUILD_LIBJAWT)
0491f891667c 8183166: lib\jawt.lib is missing from JDK 9 distribution for Windows
erikj
parents: 43806
diff changeset
   682
0491f891667c 8183166: lib\jawt.lib is missing from JDK 9 distribution for Windows
erikj
parents: 43806
diff changeset
   683
  TARGETS += $(COPY_JAWT_LIB)
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   684
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   685
else # OPENJDK_TARGET_OS not windows
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   686
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   687
  ifeq ($(OPENJDK_TARGET_OS), macosx)
47217
72e3ae9a25eb 8187444: Forest Consolidation: Make build work
erikj
parents: 47216
diff changeset
   688
    LIBJAWT_SRC := $(TOPDIR)/src/java.desktop/macosx/native/libjawt
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   689
  else
47217
72e3ae9a25eb 8187444: Forest Consolidation: Make build work
erikj
parents: 47216
diff changeset
   690
    LIBJAWT_SRC := $(TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/libjawt
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   691
  endif
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   692
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   693
  ifeq ($(OPENJDK_TARGET_OS), macosx)
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   694
    JAWT_LIBS := -lawt_lwawt
21130
0f0b9c8f701a 8025673: [macosx] Disable X11 AWT toolkit
dholmes
parents: 20901
diff changeset
   695
  else
0f0b9c8f701a 8025673: [macosx] Disable X11 AWT toolkit
dholmes
parents: 20901
diff changeset
   696
    JAWT_LIBS :=
0f0b9c8f701a 8025673: [macosx] Disable X11 AWT toolkit
dholmes
parents: 20901
diff changeset
   697
    ifneq ($(OPENJDK_TARGET_OS), solaris)
0f0b9c8f701a 8025673: [macosx] Disable X11 AWT toolkit
dholmes
parents: 20901
diff changeset
   698
      JAWT_LIBS += -lawt
0f0b9c8f701a 8025673: [macosx] Disable X11 AWT toolkit
dholmes
parents: 20901
diff changeset
   699
    endif
41132
2a3c61e80af0 8163102: Fix headless only configuration option
erikj
parents: 40205
diff changeset
   700
    ifeq ($(ENABLE_HEADLESS_ONLY), false)
21130
0f0b9c8f701a 8025673: [macosx] Disable X11 AWT toolkit
dholmes
parents: 20901
diff changeset
   701
      JAWT_LIBS += -lawt_xawt
0f0b9c8f701a 8025673: [macosx] Disable X11 AWT toolkit
dholmes
parents: 20901
diff changeset
   702
    else
0f0b9c8f701a 8025673: [macosx] Disable X11 AWT toolkit
dholmes
parents: 20901
diff changeset
   703
      JAWT_LIBS += -lawt_headless
56433
c3cf838aa2da Initial fix for setting SRC automatically + HEADER_FLAGS.
ihse
parents: 56421
diff changeset
   704
      ifeq ($(OPENJDK_TARGET_OS), linux)
c3cf838aa2da Initial fix for setting SRC automatically + HEADER_FLAGS.
ihse
parents: 56421
diff changeset
   705
        JAWT_CFLAGS += -DHEADLESS
c3cf838aa2da Initial fix for setting SRC automatically + HEADER_FLAGS.
ihse
parents: 56421
diff changeset
   706
      endif
21130
0f0b9c8f701a 8025673: [macosx] Disable X11 AWT toolkit
dholmes
parents: 20901
diff changeset
   707
    endif
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   708
  endif
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   709
49244
995a5556edfa 8199639: Introduce SetupJdkLibrary and SetupJdkExecutable
ihse
parents: 49241
diff changeset
   710
  $(eval $(call SetupJdkLibrary, BUILD_LIBJAWT, \
49070
d7859531621b 8198751: Refactor SetupNativeCompilation to take NAME and TYPE
ihse
parents: 48766
diff changeset
   711
      NAME := jawt, \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   712
      SRC := $(LIBJAWT_SRC), \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   713
      INCLUDE_FILES := $(JAWT_FILES), \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   714
      OPTIMIZATION := LOW, \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   715
      CFLAGS := $(CFLAGS_JDKLIB) \
56433
c3cf838aa2da Initial fix for setting SRC automatically + HEADER_FLAGS.
ihse
parents: 56421
diff changeset
   716
          $(JAWT_CFLAGS), \
56511
2b67c11c0db6 Introduce EXTRA_SRC and supply headers as dirs.
ihse
parents: 56488
diff changeset
   717
      EXTRA_HEADER_DIRS := \
2b67c11c0db6 Introduce EXTRA_SRC and supply headers as dirs.
ihse
parents: 56488
diff changeset
   718
          $(call FindSrcDirsForComponent, java.desktop, include) \
2b67c11c0db6 Introduce EXTRA_SRC and supply headers as dirs.
ihse
parents: 56488
diff changeset
   719
          $(call FindSrcDirsForComponent, java.desktop, common/awt), \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   720
      LDFLAGS := $(LDFLAGS_JDKLIB) \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   721
          $(call SET_SHARED_LIBRARY_ORIGIN), \
27944
c6d5edd39016 8066752: Remove space after -L on linker lines
erikj
parents: 27799
diff changeset
   722
      LDFLAGS_unix := -L$(INSTALL_LIBRARIES_HERE), \
34695
7a6cc9982d22 8142907: Integration of minor fixes from the build-infra project
ihse
parents: 34432
diff changeset
   723
      LDFLAGS_macosx := -Wl$(COMMA)-rpath$(COMMA)@loader_path, \
33406
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 33305
diff changeset
   724
      LIBS_unix := $(JAWT_LIBS) $(JDKLIB_LIBS), \
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 33305
diff changeset
   725
      LIBS_solaris := $(X_LIBS) -lXrender, \
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 33305
diff changeset
   726
      LIBS_macosx := -framework Cocoa, \
35276
50b3cdcef339 8145596: Enable debug symbols for all libraries
ihse
parents: 35241
diff changeset
   727
  ))
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   728
41132
2a3c61e80af0 8163102: Fix headless only configuration option
erikj
parents: 40205
diff changeset
   729
  ifeq ($(ENABLE_HEADLESS_ONLY), false)
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   730
    $(BUILD_LIBJAWT): $(BUILD_LIBAWT_XAWT)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   731
  else
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   732
    $(BUILD_LIBJAWT): $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)awt_headless$(SHARED_LIBRARY_SUFFIX)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   733
  endif
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   734
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   735
  ifeq ($(OPENJDK_TARGET_OS), macosx)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   736
    $(BUILD_LIBJAWT): $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)awt_lwawt$(SHARED_LIBRARY_SUFFIX)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   737
  endif
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   738
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   739
endif # OPENJDK_TARGET_OS
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   740
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 26751
diff changeset
   741
TARGETS += $(BUILD_LIBJAWT)
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   742
26191
a0ff4b39d34b 8055188: General cleanup of minor issues from source restructure
erikj
parents: 25993
diff changeset
   743
################################################################################
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   744
41132
2a3c61e80af0 8163102: Fix headless only configuration option
erikj
parents: 40205
diff changeset
   745
ifeq ($(ENABLE_HEADLESS_ONLY), false)
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   746
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   747
  LIBSPLASHSCREEN_DIRS := \
47217
72e3ae9a25eb 8187444: Forest Consolidation: Make build work
erikj
parents: 47216
diff changeset
   748
      $(TOPDIR)/src/java.desktop/share/native/libjavajpeg \
72e3ae9a25eb 8187444: Forest Consolidation: Make build work
erikj
parents: 47216
diff changeset
   749
      $(TOPDIR)/src/java.desktop/share/native/libsplashscreen \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   750
      #
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   751
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   752
  ifeq ($(USE_EXTERNAL_LIBGIF), true)
33406
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 33305
diff changeset
   753
    GIFLIB_LIBS := -lgif
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   754
    LIBSPLASHSCREEN_EXCLUDES := giflib
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   755
  else
56511
2b67c11c0db6 Introduce EXTRA_SRC and supply headers as dirs.
ihse
parents: 56488
diff changeset
   756
    LIBSPLASHSCREEN_HEADER_DIRS += $(TOPDIR)/src/java.desktop/share/native/libsplashscreen/giflib
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   757
  endif
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   758
25103
4dcb7cd7652e 8043805: Allow using a system-installed libjpeg
omajid
parents: 24566
diff changeset
   759
  ifeq ($(USE_EXTERNAL_LIBJPEG), true)
33406
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 33305
diff changeset
   760
    LIBJPEG_LIBS := -ljpeg
25103
4dcb7cd7652e 8043805: Allow using a system-installed libjpeg
omajid
parents: 24566
diff changeset
   761
  else
47217
72e3ae9a25eb 8187444: Forest Consolidation: Make build work
erikj
parents: 47216
diff changeset
   762
    LIBSPLASHSCREEN_DIRS += $(TOPDIR)/src/java.desktop/share/native/libjavajpeg
56511
2b67c11c0db6 Introduce EXTRA_SRC and supply headers as dirs.
ihse
parents: 56488
diff changeset
   763
    LIBSPLASHSCREEN_HEADER_DIRS += $(TOPDIR)/src/java.desktop/share/native/libjavajpeg
25103
4dcb7cd7652e 8043805: Allow using a system-installed libjpeg
omajid
parents: 24566
diff changeset
   764
  endif
4dcb7cd7652e 8043805: Allow using a system-installed libjpeg
omajid
parents: 24566
diff changeset
   765
23305
e7d0093bfc6c 8035341: Allow using a system installed libpng
omajid
parents: 23292
diff changeset
   766
  ifeq ($(USE_EXTERNAL_LIBPNG), false)
47217
72e3ae9a25eb 8187444: Forest Consolidation: Make build work
erikj
parents: 47216
diff changeset
   767
    LIBSPLASHSCREEN_DIRS += $(TOPDIR)/src/java.desktop/share/native/libsplashscreen/libpng
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   768
  else
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   769
    LIBSPLASHSCREEN_EXCLUDES += libpng
23305
e7d0093bfc6c 8035341: Allow using a system installed libpng
omajid
parents: 23292
diff changeset
   770
  endif
e7d0093bfc6c 8035341: Allow using a system installed libpng
omajid
parents: 23292
diff changeset
   771
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   772
  ifneq ($(OPENJDK_TARGET_OS), macosx)
47217
72e3ae9a25eb 8187444: Forest Consolidation: Make build work
erikj
parents: 47216
diff changeset
   773
    LIBSPLASHSCREEN_DIRS += $(TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/libsplashscreen
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   774
  else
47217
72e3ae9a25eb 8187444: Forest Consolidation: Make build work
erikj
parents: 47216
diff changeset
   775
    LIBSPLASHSCREEN_DIRS += $(TOPDIR)/src/java.desktop/macosx/native/libsplashscreen
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   776
  endif
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   777
36953
d707077d2f74 8153727: AIX jdk build broken after 8145174
stuefe
parents: 36907
diff changeset
   778
  ifneq ($(filter $(OPENJDK_TARGET_OS),linux solaris aix), )
47217
72e3ae9a25eb 8187444: Forest Consolidation: Make build work
erikj
parents: 47216
diff changeset
   779
    LIBSPLASHSCREEN_DIRS += $(TOPDIR)/src/java.desktop/unix/native/common/awt/systemscale
36869
f8ef78f4157d 8145174: HiDPI splash screen support on Linux
rchamyal
parents: 36110
diff changeset
   780
  endif
36880
3a05117c7611 8151770: 9-client windows builds fail on windows since make file change for 8145174
erikj
parents: 36869
diff changeset
   781
36907
c3d8383e3efb 8145173: HiDPI splash screen support on Windows
rchamyal
parents: 36880
diff changeset
   782
  ifeq ($(OPENJDK_TARGET_OS), windows)
47217
72e3ae9a25eb 8187444: Forest Consolidation: Make build work
erikj
parents: 47216
diff changeset
   783
    LIBSPLASHSCREEN_DIRS += $(TOPDIR)/src/java.desktop/windows/native/common/awt/systemscale
42340
bf1c934665a9 8056215: AWT source dirs should only point to java2d, not below
ihse
parents: 42194
diff changeset
   784
  endif
56433
c3cf838aa2da Initial fix for setting SRC automatically + HEADER_FLAGS.
ihse
parents: 56421
diff changeset
   785
  LIBSPLASHSCREEN_CFLAGS += -DSPLASHSCREEN -DPNG_NO_MMX_CODE -DPNG_ARM_NEON_OPT=0
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   786
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   787
  ifeq ($(OPENJDK_TARGET_OS), macosx)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   788
    LIBSPLASHSCREEN_CFLAGS += -DWITH_MACOSX
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   789
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   790
    BUILD_LIBSPLASHSCREEN_java_awt_SplashScreen.c_CFLAGS := -x objective-c -O0
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   791
    BUILD_LIBSPLASHSCREEN_splashscreen_gfx_impl.c_CFLAGS := -x objective-c -O0
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   792
    BUILD_LIBSPLASHSCREEN_splashscreen_gif.c_CFLAGS := -x objective-c -O0
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   793
    BUILD_LIBSPLASHSCREEN_splashscreen_impl.c_CFLAGS := -x objective-c -O0
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   794
    BUILD_LIBSPLASHSCREEN_splashscreen_jpeg.c_CFLAGS := -x objective-c -O0
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   795
    BUILD_LIBSPLASHSCREEN_splashscreen_png.c_CFLAGS := -x objective-c -O0
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   796
    BUILD_LIBSPLASHSCREEN_splashscreen_sys.m_CFLAGS := -O0
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   797
20901
70f69e624fc9 8026888: Licensee build failure due to wrong libs being called
erikj
parents: 20899
diff changeset
   798
  else ifeq ($(OPENJDK_TARGET_OS), windows)
70f69e624fc9 8026888: Licensee build failure due to wrong libs being called
erikj
parents: 20899
diff changeset
   799
    LIBSPLASHSCREEN_CFLAGS += -DWITH_WIN32
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   800
  else
20901
70f69e624fc9 8026888: Licensee build failure due to wrong libs being called
erikj
parents: 20899
diff changeset
   801
    LIBSPLASHSCREEN_CFLAGS += -DWITH_X11 $(X_CFLAGS)
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   802
  endif
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   803
33406
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 33305
diff changeset
   804
  LIBSPLASHSCREEN_LIBS :=
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   805
48751
54f355e65415 8196803: Fix build warnings in jdk libraries with Xcode 9
erikj
parents: 48731
diff changeset
   806
  ifeq ($(USE_EXTERNAL_LIBZ), false)
47217
72e3ae9a25eb 8187444: Forest Consolidation: Make build work
erikj
parents: 47216
diff changeset
   807
    LIBSPLASHSCREEN_DIRS += $(TOPDIR)/src/java.base/share/native/libzip/zlib
48751
54f355e65415 8196803: Fix build warnings in jdk libraries with Xcode 9
erikj
parents: 48731
diff changeset
   808
  else
54f355e65415 8196803: Fix build warnings in jdk libraries with Xcode 9
erikj
parents: 48731
diff changeset
   809
    ifeq ($(OPENJDK_TARGET_OS), macosx)
54f355e65415 8196803: Fix build warnings in jdk libraries with Xcode 9
erikj
parents: 48731
diff changeset
   810
      ifeq ($(USE_EXTERNAL_LIBPNG), false)
54f355e65415 8196803: Fix build warnings in jdk libraries with Xcode 9
erikj
parents: 48731
diff changeset
   811
        # When building our own libpng and using an external libz, we need to
54f355e65415 8196803: Fix build warnings in jdk libraries with Xcode 9
erikj
parents: 48731
diff changeset
   812
        # inject our own libz.h to tweak the exported ZLIB_VERNUM macro. See
54f355e65415 8196803: Fix build warnings in jdk libraries with Xcode 9
erikj
parents: 48731
diff changeset
   813
        # $(TOPDIR)/src/java.desktop/macosx/native/libsplashscreen/libpng/zlib.h
54f355e65415 8196803: Fix build warnings in jdk libraries with Xcode 9
erikj
parents: 48731
diff changeset
   814
        # for details.
54f355e65415 8196803: Fix build warnings in jdk libraries with Xcode 9
erikj
parents: 48731
diff changeset
   815
        LIBSPLASHSCREEN_CFLAGS += -iquote $(TOPDIR)/src/java.desktop/macosx/native/libsplashscreen/libpng
54f355e65415 8196803: Fix build warnings in jdk libraries with Xcode 9
erikj
parents: 48731
diff changeset
   816
      endif
54f355e65415 8196803: Fix build warnings in jdk libraries with Xcode 9
erikj
parents: 48731
diff changeset
   817
    endif
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   818
  endif
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   819
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   820
  ifeq ($(OPENJDK_TARGET_OS), macosx)
33406
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 33305
diff changeset
   821
    LIBSPLASHSCREEN_LIBS += \
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 26751
diff changeset
   822
        $(LIBM) -lpthread -liconv -losxapp \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   823
        -framework ApplicationServices \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   824
        -framework Foundation \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   825
        -framework Cocoa \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   826
        -framework JavaNativeFoundation
20901
70f69e624fc9 8026888: Licensee build failure due to wrong libs being called
erikj
parents: 20899
diff changeset
   827
  else ifeq ($(OPENJDK_TARGET_OS), windows)
36907
c3d8383e3efb 8145173: HiDPI splash screen support on Windows
rchamyal
parents: 36880
diff changeset
   828
    LIBSPLASHSCREEN_LIBS += kernel32.lib user32.lib gdi32.lib delayimp.lib $(WIN_JAVA_LIB) jvm.lib
23592
35b16ae6b4f4 8038340: Cleanup and fix sysroot and devkit handling on Linux and Solaris
erikj
parents: 23310
diff changeset
   829
  else
39844
a3cc7e551a48 8149115: [hidpi] Linux: display-wise scaling factor should probably be taken into account
ssadetsky
parents: 39550
diff changeset
   830
    LIBSPLASHSCREEN_LIBS += $(X_LIBS) -lX11 -lXext $(LIBM) -lpthread -ldl
20901
70f69e624fc9 8026888: Licensee build failure due to wrong libs being called
erikj
parents: 20899
diff changeset
   831
  endif
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   832
49244
995a5556edfa 8199639: Introduce SetupJdkLibrary and SetupJdkExecutable
ihse
parents: 49241
diff changeset
   833
  $(eval $(call SetupJdkLibrary, BUILD_LIBSPLASHSCREEN, \
49070
d7859531621b 8198751: Refactor SetupNativeCompilation to take NAME and TYPE
ihse
parents: 48766
diff changeset
   834
      NAME := splashscreen, \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   835
      SRC := $(LIBSPLASHSCREEN_DIRS), \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   836
      EXCLUDE_FILES := imageioJPEG.c jpegdecoder.c pngtest.c, \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   837
      EXCLUDES := $(LIBSPLASHSCREEN_EXCLUDES), \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   838
      OPTIMIZATION := LOW, \
23305
e7d0093bfc6c 8035341: Allow using a system installed libpng
omajid
parents: 23292
diff changeset
   839
      CFLAGS := $(LIBSPLASHSCREEN_CFLAGS) $(CFLAGS_JDKLIB) \
48751
54f355e65415 8196803: Fix build warnings in jdk libraries with Xcode 9
erikj
parents: 48731
diff changeset
   840
          $(GIFLIB_CFLAGS) $(LIBJPEG_CFLAGS) $(PNG_CFLAGS) $(LIBZ_CFLAGS), \
56462
9bb6697e3fbb Fix java.desktop compilation on Windows.
ihse
parents: 56457
diff changeset
   841
      CXXFLAGS := $(LIBSPLASHSCREEN_CFLAGS) $(CFLAGS_JDKLIB) \
9bb6697e3fbb Fix java.desktop compilation on Windows.
ihse
parents: 56457
diff changeset
   842
          $(GIFLIB_CFLAGS) $(LIBJPEG_CFLAGS) $(PNG_CFLAGS) $(LIBZ_CFLAGS), \
56511
2b67c11c0db6 Introduce EXTRA_SRC and supply headers as dirs.
ihse
parents: 56488
diff changeset
   843
      EXTRA_HEADER_DIRS := \
2b67c11c0db6 Introduce EXTRA_SRC and supply headers as dirs.
ihse
parents: 56488
diff changeset
   844
          $(call FindSrcDirsForLib, java.base, java) \
2b67c11c0db6 Introduce EXTRA_SRC and supply headers as dirs.
ihse
parents: 56488
diff changeset
   845
          $(call FindSrcDirsForLib, java.desktop, osxapp) \
2b67c11c0db6 Introduce EXTRA_SRC and supply headers as dirs.
ihse
parents: 56488
diff changeset
   846
          $(call FindSrcDirsForComponent, java.base, include) \
2b67c11c0db6 Introduce EXTRA_SRC and supply headers as dirs.
ihse
parents: 56488
diff changeset
   847
          $(LIBSPLASHSCREEN_HEADER_DIRS), \
48766
2c4d1993b5f9 8196985: Disable new warnings from GCC 7.3 in jdk libraries
erikj
parents: 48751
diff changeset
   848
      DISABLED_WARNINGS_gcc := sign-compare type-limits unused-result \
2c4d1993b5f9 8196985: Disable new warnings from GCC 7.3 in jdk libraries
erikj
parents: 48751
diff changeset
   849
          maybe-uninitialized shift-negative-value implicit-fallthrough, \
29374
f031a666744a 8074096: Disable (most) native warnings in JDK on a per-library basis
ihse
parents: 29006
diff changeset
   850
      DISABLED_WARNINGS_clang := incompatible-pointer-types, \
32408
97230ec16697 8134408: Disable warnings for jdk libraries triggered by SS12u4
erikj
parents: 31159
diff changeset
   851
      DISABLED_WARNINGS_solstudio := E_NEWLINE_NOT_LAST E_DECLARATION_IN_CODE \
97230ec16697 8134408: Disable warnings for jdk libraries triggered by SS12u4
erikj
parents: 31159
diff changeset
   852
          E_STATEMENT_NOT_REACHED, \
30502
50552a5900a2 8080317: Disable warning treated as error for signed/unsigned comparison in building splashscreen
prr
parents: 30439
diff changeset
   853
      DISABLED_WARNINGS_microsoft := 4018 4244 4267, \
49239
c35ec365e329 8199483: Clean up some non-standard LDFLAGS usage
ihse
parents: 49234
diff changeset
   854
      LDFLAGS := $(LDFLAGS_JDKLIB) \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   855
          $(call SET_SHARED_LIBRARY_ORIGIN), \
49239
c35ec365e329 8199483: Clean up some non-standard LDFLAGS usage
ihse
parents: 49234
diff changeset
   856
      LDFLAGS_macosx := -L$(INSTALL_LIBRARIES_HERE), \
c35ec365e329 8199483: Clean up some non-standard LDFLAGS usage
ihse
parents: 49234
diff changeset
   857
      LDFLAGS_windows := -delayload:user32.dll, \
48751
54f355e65415 8196803: Fix build warnings in jdk libraries with Xcode 9
erikj
parents: 48731
diff changeset
   858
      LIBS := $(JDKLIB_LIBS) $(LIBSPLASHSCREEN_LIBS) $(LIBZ_LIBS) \
54f355e65415 8196803: Fix build warnings in jdk libraries with Xcode 9
erikj
parents: 48731
diff changeset
   859
          $(GIFLIB_LIBS) $(LIBJPEG_LIBS) $(PNG_LIBS), \
33518
3f1644328d06 8141290: AIX: fix build after '8140661: Rename LDFLAGS_SUFFIX to LIBS'
simonis
parents: 33406
diff changeset
   860
      LIBS_aix := -liconv, \
35276
50b3cdcef339 8145596: Enable debug symbols for all libraries
ihse
parents: 35241
diff changeset
   861
  ))
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   862
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 26751
diff changeset
   863
  TARGETS += $(BUILD_LIBSPLASHSCREEN)
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   864
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   865
  ifeq ($(OPENJDK_TARGET_OS), macosx)
49261
d5c43e9f08fb 8199745: JDK-8199668 introduced a build race on macosx
erikj
parents: 49244
diff changeset
   866
    $(BUILD_LIBSPLASHSCREEN): $(call FindLib, java.desktop, osxapp)
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   867
  endif
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   868
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   869
endif
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   870
26191
a0ff4b39d34b 8055188: General cleanup of minor issues from source restructure
erikj
parents: 25993
diff changeset
   871
################################################################################
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   872
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   873
ifeq ($(OPENJDK_TARGET_OS), macosx)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   874
56511
2b67c11c0db6 Introduce EXTRA_SRC and supply headers as dirs.
ihse
parents: 56488
diff changeset
   875
  LIBAWT_LWAWT_EXTRA_SRC := \
47217
72e3ae9a25eb 8187444: Forest Consolidation: Make build work
erikj
parents: 47216
diff changeset
   876
      $(TOPDIR)/src/java.desktop/unix/native/common/awt \
72e3ae9a25eb 8187444: Forest Consolidation: Make build work
erikj
parents: 47216
diff changeset
   877
      $(TOPDIR)/src/java.desktop/share/native/common/font \
72e3ae9a25eb 8187444: Forest Consolidation: Make build work
erikj
parents: 47216
diff changeset
   878
      $(TOPDIR)/src/java.desktop/share/native/common/java2d \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   879
      #
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   880
56433
c3cf838aa2da Initial fix for setting SRC automatically + HEADER_FLAGS.
ihse
parents: 56421
diff changeset
   881
  LIBAWT_LWAWT_CFLAGS := $(X_CFLAGS) $(X_LIBS)
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   882
26741
bc80bcd0765a 8056213: Clean up unix/native/common/sun/awt
prr
parents: 26611
diff changeset
   883
  LIBAWT_LWAWT_EXFILES := fontpath.c awt_Font.c X11Color.c
47217
72e3ae9a25eb 8187444: Forest Consolidation: Make build work
erikj
parents: 47216
diff changeset
   884
  LIBAWT_LWAWT_EXCLUDES := $(TOPDIR)/src/java.desktop/unix/native/common/awt/medialib
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   885
49244
995a5556edfa 8199639: Introduce SetupJdkLibrary and SetupJdkExecutable
ihse
parents: 49241
diff changeset
   886
  $(eval $(call SetupJdkLibrary, BUILD_LIBAWT_LWAWT, \
49070
d7859531621b 8198751: Refactor SetupNativeCompilation to take NAME and TYPE
ihse
parents: 48766
diff changeset
   887
      NAME := awt_lwawt, \
56511
2b67c11c0db6 Introduce EXTRA_SRC and supply headers as dirs.
ihse
parents: 56488
diff changeset
   888
      EXTRA_SRC := $(LIBAWT_LWAWT_EXTRA_SRC), \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   889
      INCLUDE_FILES := $(LIBAWT_LWAWT_FILES), \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   890
      EXCLUDE_FILES := $(LIBAWT_LWAWT_EXFILES), \
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   891
      EXCLUDES := $(LIBAWT_LWAWT_EXCLUDES), \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   892
      OPTIMIZATION := LOW, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   893
      CFLAGS := $(CFLAGS_JDKLIB) \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   894
          $(LIBAWT_LWAWT_CFLAGS), \
56511
2b67c11c0db6 Introduce EXTRA_SRC and supply headers as dirs.
ihse
parents: 56488
diff changeset
   895
      EXTRA_HEADER_DIRS := \
2b67c11c0db6 Introduce EXTRA_SRC and supply headers as dirs.
ihse
parents: 56488
diff changeset
   896
          $(call FindSrcDirsForComponent, java.desktop, libawt_lwawt/java2d/opengl) \
2b67c11c0db6 Introduce EXTRA_SRC and supply headers as dirs.
ihse
parents: 56488
diff changeset
   897
          $(call FindSrcDirsForComponent, java.desktop, libawt_lwawt/awt) \
2b67c11c0db6 Introduce EXTRA_SRC and supply headers as dirs.
ihse
parents: 56488
diff changeset
   898
          $(call FindSrcDirsForComponent, java.desktop, libawt_lwawt/font) \
2b67c11c0db6 Introduce EXTRA_SRC and supply headers as dirs.
ihse
parents: 56488
diff changeset
   899
          $(call FindSrcDirsForComponent, java.desktop, include) \
2b67c11c0db6 Introduce EXTRA_SRC and supply headers as dirs.
ihse
parents: 56488
diff changeset
   900
          $(call FindSrcDirsForComponent, java.desktop, common/awt/debug) \
2b67c11c0db6 Introduce EXTRA_SRC and supply headers as dirs.
ihse
parents: 56488
diff changeset
   901
          $(call FindSrcDirsForComponent, java.desktop, common/java2d/opengl) \
2b67c11c0db6 Introduce EXTRA_SRC and supply headers as dirs.
ihse
parents: 56488
diff changeset
   902
          $(call FindSrcDirsForComponent, java.desktop, libawt/awt/image) \
2b67c11c0db6 Introduce EXTRA_SRC and supply headers as dirs.
ihse
parents: 56488
diff changeset
   903
          $(call FindSrcDirsForComponent, java.desktop, libawt/awt/image/cvutils) \
2b67c11c0db6 Introduce EXTRA_SRC and supply headers as dirs.
ihse
parents: 56488
diff changeset
   904
          $(call FindSrcDirsForComponent, java.desktop, libawt/java2d) \
2b67c11c0db6 Introduce EXTRA_SRC and supply headers as dirs.
ihse
parents: 56488
diff changeset
   905
          $(call FindSrcDirsForComponent, java.desktop, libawt/java2d/loops) \
2b67c11c0db6 Introduce EXTRA_SRC and supply headers as dirs.
ihse
parents: 56488
diff changeset
   906
          $(call FindSrcDirsForComponent, java.desktop, libawt/java2d/pipe) \
2b67c11c0db6 Introduce EXTRA_SRC and supply headers as dirs.
ihse
parents: 56488
diff changeset
   907
          $(call FindSrcDirsForLib, java.desktop, osxapp), \
32872
abca6234313d 8079965: Stop ignoring warnings for libawt_lwawt
serb
parents: 32408
diff changeset
   908
      DISABLED_WARNINGS_clang := incomplete-implementation enum-conversion \
29374
f031a666744a 8074096: Disable (most) native warnings in JDK on a per-library basis
ihse
parents: 29006
diff changeset
   909
          deprecated-declarations objc-method-access bitwise-op-parentheses \
f031a666744a 8074096: Disable (most) native warnings in JDK on a per-library basis
ihse
parents: 29006
diff changeset
   910
          incompatible-pointer-types parentheses-equality extra-tokens, \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   911
      LDFLAGS := $(LDFLAGS_JDKLIB) \
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 26751
diff changeset
   912
          $(call SET_SHARED_LIBRARY_ORIGIN) \
27944
c6d5edd39016 8066752: Remove space after -L on linker lines
erikj
parents: 27799
diff changeset
   913
          -L$(INSTALL_LIBRARIES_HERE), \
33406
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 33305
diff changeset
   914
      LIBS := -lawt -lmlib_image -losxapp -ljvm $(LIBM) \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   915
          -framework Accelerate \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   916
          -framework ApplicationServices \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   917
          -framework AudioToolbox \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   918
          -framework Carbon \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   919
          -framework Cocoa \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   920
          -framework Security \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   921
          -framework ExceptionHandling \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   922
          -framework JavaNativeFoundation \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   923
          -framework JavaRuntimeSupport \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   924
          -framework OpenGL \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   925
          -framework QuartzCore -ljava, \
35276
50b3cdcef339 8145596: Enable debug symbols for all libraries
ihse
parents: 35241
diff changeset
   926
  ))
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   927
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 26751
diff changeset
   928
  TARGETS += $(BUILD_LIBAWT_LWAWT)
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   929
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   930
  $(BUILD_LIBAWT_LWAWT): $(BUILD_LIBAWT)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   931
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   932
  $(BUILD_LIBAWT_LWAWT): $(BUILD_LIBMLIB_IMAGE)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   933
49261
d5c43e9f08fb 8199745: JDK-8199668 introduced a build race on macosx
erikj
parents: 49244
diff changeset
   934
  $(BUILD_LIBAWT_LWAWT): $(call FindLib, java.desktop, osxapp)
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   935
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 26751
diff changeset
   936
  $(BUILD_LIBAWT_LWAWT): $(call FindLib, java.base, java)
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   937
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   938
endif
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   939
26191
a0ff4b39d34b 8055188: General cleanup of minor issues from source restructure
erikj
parents: 25993
diff changeset
   940
################################################################################
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   941
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   942
ifeq ($(OPENJDK_TARGET_OS), macosx)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   943
49244
995a5556edfa 8199639: Introduce SetupJdkLibrary and SetupJdkExecutable
ihse
parents: 49241
diff changeset
   944
  $(eval $(call SetupJdkLibrary, BUILD_LIBOSXUI, \
49070
d7859531621b 8198751: Refactor SetupNativeCompilation to take NAME and TYPE
ihse
parents: 48766
diff changeset
   945
      NAME := osxui, \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   946
      OPTIMIZATION := LOW, \
56433
c3cf838aa2da Initial fix for setting SRC automatically + HEADER_FLAGS.
ihse
parents: 56421
diff changeset
   947
      CFLAGS := $(CFLAGS_JDKLIB), \
56511
2b67c11c0db6 Introduce EXTRA_SRC and supply headers as dirs.
ihse
parents: 56488
diff changeset
   948
      EXTRA_HEADER_DIRS := \
2b67c11c0db6 Introduce EXTRA_SRC and supply headers as dirs.
ihse
parents: 56488
diff changeset
   949
          $(call FindSrcDirsForComponent, java.desktop, libawt_lwawt/awt) \
2b67c11c0db6 Introduce EXTRA_SRC and supply headers as dirs.
ihse
parents: 56488
diff changeset
   950
          $(call FindSrcDirsForLib, java.desktop, osxapp), \
49523
69c6eb97297f 8196724: Change macosx deployment target to 10.9
erikj
parents: 49513
diff changeset
   951
      DISABLED_WARNINGS_clang := deprecated-declarations, \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   952
      LDFLAGS := $(LDFLAGS_JDKLIB) \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   953
          $(call SET_SHARED_LIBRARY_ORIGIN) \
34695
7a6cc9982d22 8142907: Integration of minor fixes from the build-infra project
ihse
parents: 34432
diff changeset
   954
          -Wl$(COMMA)-rpath$(COMMA)@loader_path \
27944
c6d5edd39016 8066752: Remove space after -L on linker lines
erikj
parents: 27799
diff changeset
   955
          -L$(INSTALL_LIBRARIES_HERE), \
33406
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 33305
diff changeset
   956
      LIBS := -lawt -losxapp -lawt_lwawt \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   957
          -framework Cocoa \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   958
          -framework Carbon \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   959
          -framework ApplicationServices \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   960
          -framework JavaNativeFoundation \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   961
          -framework JavaRuntimeSupport \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   962
          -ljava -ljvm, \
35276
50b3cdcef339 8145596: Enable debug symbols for all libraries
ihse
parents: 35241
diff changeset
   963
  ))
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   964
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 26751
diff changeset
   965
  TARGETS += $(BUILD_LIBOSXUI)
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   966
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   967
  $(BUILD_LIBOSXUI): $(BUILD_LIBAWT)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   968
49261
d5c43e9f08fb 8199745: JDK-8199668 introduced a build race on macosx
erikj
parents: 49244
diff changeset
   969
  $(BUILD_LIBOSXUI): $(call FindLib, java.desktop, osxapp)
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   970
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   971
  $(BUILD_LIBOSXUI): $(BUILD_LIBAWT_LWAWT)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   972
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   973
endif
26191
a0ff4b39d34b 8055188: General cleanup of minor issues from source restructure
erikj
parents: 25993
diff changeset
   974
a0ff4b39d34b 8055188: General cleanup of minor issues from source restructure
erikj
parents: 25993
diff changeset
   975
################################################################################
a0ff4b39d34b 8055188: General cleanup of minor issues from source restructure
erikj
parents: 25993
diff changeset
   976
a0ff4b39d34b 8055188: General cleanup of minor issues from source restructure
erikj
parents: 25993
diff changeset
   977
# Hook to include the corresponding custom file, if present.
47314
743814386712 8188814: Simplify IncludeCustomExtension
ihse
parents: 47217
diff changeset
   978
$(eval $(call IncludeCustomExtension, lib/Awt2dLibraries.gmk))