jdk/make/lib/Awt2dLibraries.gmk
author rfield
Fri, 25 Mar 2016 18:36:19 -0700
changeset 36718 bf40906bf49d
parent 36110 91a3a6df36ec
child 37529 868c7195632c
child 36869 f8ef78f4157d
permissions -rw-r--r--
8151755: jshell tool: properly cover resolution issues in output configuration 8152246: jshell tool: history overflow Reviewed-by: jlahoda
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
     1
#
36110
91a3a6df36ec 8150203: Incremental update from build-infra project
ihse
parents: 35711
diff changeset
     2
# Copyright (c) 2011, 2016, 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
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 26751
diff changeset
    26
WIN_AWT_LIB := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libawt/awt.lib
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    27
26191
a0ff4b39d34b 8055188: General cleanup of minor issues from source restructure
erikj
parents: 25993
diff changeset
    28
################################################################################
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    29
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
    30
BUILD_LIBMLIB_SRC := $(JDK_TOPDIR)/src/java.desktop/share/native/libmlib_image \
26751
70bac69b37c9 8056216: Remove "sun" directory layer from libawt and common
prr
parents: 26741
diff changeset
    31
    $(JDK_TOPDIR)/src/java.desktop/share/native/common/awt/medialib
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    32
BUILD_LIBMLIB_CFLAGS := -D__USE_J2D_NAMES -D__MEDIALIB_OLD_NAMES \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
    33
    $(addprefix -I, $(BUILD_LIBMLIB_SRC)) \
27736
8c9bd4be4a86 8058631: Rename posix to unix in build system to match file name changes
ihse
parents: 26751
diff changeset
    34
    -I$(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/libmlib_image
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    35
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    36
BUILD_LIBMLIB_LDLIBS :=
21805
c7d7946239de 8027566: Remove the old build system
ihse
parents: 21130
diff changeset
    37
BUILD_LIBMLIB_IMAGE_MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libmlib_image/mapfile-vers
13164
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents: 12892
diff changeset
    38
13702
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
    39
BUILD_LIBMLIB_CFLAGS += -DMLIB_NO_LIBSUNMATH
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
    40
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
    41
ifeq ($(OPENJDK_TARGET_CPU_BITS), 64)
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    42
  BUILD_LIBMLIB_CFLAGS += -DMLIB_OS64BIT
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
    43
endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
    44
13164
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents: 12892
diff changeset
    45
ifneq ($(OPENJDK_TARGET_OS), windows)
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    46
  BUILD_LIBMLIB_LDLIBS += $(LIBM) $(LIBDL)
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
    47
endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
    48
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    49
$(eval $(call SetupNativeCompilation,BUILD_LIBMLIB_IMAGE, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    50
    LIBRARY := mlib_image, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    51
    OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    52
    SRC := $(BUILD_LIBMLIB_SRC), \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
    53
    EXCLUDE_FILES := mlib_c_ImageBlendTable.c, \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    54
    OPTIMIZATION := HIGHEST, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    55
    CFLAGS := $(CFLAGS_JDKLIB) \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    56
        $(BUILD_LIBMLIB_CFLAGS), \
31157
25a62bb54efa 8081295: Build failed with GCC 5.1.1
ysuenaga
parents: 30502
diff changeset
    57
    DISABLED_WARNINGS_gcc := parentheses array-bounds, \
29374
f031a666744a 8074096: Disable (most) native warnings in JDK on a per-library basis
ihse
parents: 29006
diff changeset
    58
    DISABLED_WARNINGS_clang := parentheses, \
f031a666744a 8074096: Disable (most) native warnings in JDK on a per-library basis
ihse
parents: 29006
diff changeset
    59
    DISABLED_WARNINGS_solstudio := E_STATEMENT_NOT_REACHED, \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    60
    MAPFILE := $(BUILD_LIBMLIB_IMAGE_MAPFILE), \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    61
    LDFLAGS := $(LDFLAGS_JDKLIB) \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    62
        $(call SET_SHARED_LIBRARY_ORIGIN), \
33406
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 33305
diff changeset
    63
    LIBS := $(BUILD_LIBMLIB_LDLIBS) \
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 33305
diff changeset
    64
        $(JDKLIB_LIBS), \
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 33305
diff changeset
    65
    LIBS_solaris := -lc, \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
    66
    VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    67
    RC_FLAGS := $(RC_FLAGS) \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    68
        -D "JDK_FNAME=mlib_image.dll" \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    69
        -D "JDK_INTERNAL_NAME=mlib_image" \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    70
        -D "JDK_FTYPE=0x2L", \
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 26751
diff changeset
    71
    OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libmlib_image, \
35276
50b3cdcef339 8145596: Enable debug symbols for all libraries
ihse
parents: 35241
diff changeset
    72
))
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    73
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 26751
diff changeset
    74
$(BUILD_LIBMLIB_IMAGE): $(call FindLib, java.base, java)
13164
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents: 12892
diff changeset
    75
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 26751
diff changeset
    76
TARGETS += $(BUILD_LIBMLIB_IMAGE)
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
    77
26191
a0ff4b39d34b 8055188: General cleanup of minor issues from source restructure
erikj
parents: 25993
diff changeset
    78
################################################################################
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
    79
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    80
ifeq ($(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU_ARCH), solaris-sparc)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    81
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
    82
  LIBMLIB_IMAGE_V_SRC := $(JDK_TOPDIR)/src/java.desktop/share/native/libmlib_image \
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
    83
      $(JDK_TOPDIR)/src/java.desktop/unix/native/libmlib_image \
26751
70bac69b37c9 8056216: Remove "sun" directory layer from libawt and common
prr
parents: 26741
diff changeset
    84
      $(JDK_TOPDIR)/src/java.desktop/share/native/common/awt/medialib \
70bac69b37c9 8056216: Remove "sun" directory layer from libawt and common
prr
parents: 26741
diff changeset
    85
      $(JDK_TOPDIR)/src/java.desktop/unix/native/common/awt/medialib \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
    86
      #
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
    87
  LIBMLIB_IMAGE_V_CFLAGS := $(JDK_TOPDIR)/src/java.desktop/unix/native/libmlib_image/vis_$(OPENJDK_TARGET_CPU_BITS).il \
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
    88
      $(addprefix -I, $(LIBMLIB_IMAGE_V_SRC)) \
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
    89
      #
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    90
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
    91
  BUILD_LIBMLIB_IMAGE_V_EXFILES := \
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
    92
      awt_ImagingLib.c \
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
    93
      mlib_c_ImageAffine_BC.c \
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
    94
      mlib_c_ImageAffine_BC_S16.c \
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
    95
      mlib_c_ImageAffine_BC_U16.c \
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
    96
      mlib_c_ImageAffine_BL.c \
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
    97
      mlib_c_ImageAffine_BL_S16.c \
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
    98
      mlib_c_ImageAffine_BL_U16.c \
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
    99
      mlib_c_ImageAffineIndex_BC.c \
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   100
      mlib_c_ImageAffineIndex_BL.c \
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   101
      mlib_c_ImageAffine_NN.c \
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   102
      mlib_c_ImageBlendTable.c \
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   103
      mlib_c_ImageConvClearEdge.c \
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   104
      mlib_c_ImageConvCopyEdge.c \
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   105
      mlib_c_ImageConv_f.c \
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   106
      mlib_c_ImageConvVersion.c \
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   107
      mlib_c_ImageCopy.c \
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   108
      mlib_c_ImageLookUp.c \
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   109
      mlib_c_ImageLookUp_f.c \
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   110
      mlib_v_ImageChannelExtract.c \
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   111
      mlib_v_ImageChannelExtract_f.c \
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   112
      mlib_v_ImageChannelInsert_34.c \
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   113
      mlib_v_ImageChannelInsert.c \
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   114
      mlib_v_ImageConvIndex3_8_16nw.c \
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   115
      mlib_v_ImageConvIndex3_8_8nw.c \
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   116
      mlib_v_ImageCopy.c \
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   117
      mlib_v_ImageCopy_blk.s \
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   118
      #
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   119
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   120
  LIBMLIB_IMAGE_V_CFLAGS += $(filter-out -DMLIB_NO_LIBSUNMATH, $(BUILD_LIBMLIB_CFLAGS))
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   121
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   122
  $(eval $(call SetupNativeCompilation,BUILD_LIBMLIB_IMAGE_V, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   123
      LIBRARY := mlib_image_v, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   124
      OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   125
      SRC := $(LIBMLIB_IMAGE_V_SRC), \
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   126
      EXCLUDE_FILES := $(BUILD_LIBMLIB_IMAGE_V_EXFILES), \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   127
      OPTIMIZATION := HIGHEST, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   128
      CFLAGS := -xarch=sparcvis \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   129
          $(LIBMLIB_IMAGE_V_CFLAGS) \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   130
          $(CFLAGS_JDKLIB), \
29374
f031a666744a 8074096: Disable (most) native warnings in JDK on a per-library basis
ihse
parents: 29006
diff changeset
   131
      DISABLED_WARNINGS_solstudio := E_STATEMENT_NOT_REACHED, \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   132
      MAPFILE := $(BUILD_LIBMLIB_IMAGE_MAPFILE), \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   133
      LDFLAGS := $(LDFLAGS_JDKLIB) \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   134
          $(call SET_SHARED_LIBRARY_ORIGIN), \
33406
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 33305
diff changeset
   135
      LIBS := -ljava -ljvm -lc $(BUILD_LIBMLIB_LDLIBS), \
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 26751
diff changeset
   136
      OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libmlib_image_v, \
35276
50b3cdcef339 8145596: Enable debug symbols for all libraries
ihse
parents: 35241
diff changeset
   137
  ))
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   138
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 26751
diff changeset
   139
  $(BUILD_LIBMLIB_IMAGE_V): $(call FindLib, java.base, java)
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   140
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 26751
diff changeset
   141
  TARGETS += $(BUILD_LIBMLIB_IMAGE_V)
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   142
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   143
endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   144
26191
a0ff4b39d34b 8055188: General cleanup of minor issues from source restructure
erikj
parents: 25993
diff changeset
   145
################################################################################
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   146
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   147
LIBAWT_DIRS := $(JDK_TOPDIR)/src/java.desktop/share/native/libawt \
27736
8c9bd4be4a86 8058631: Rename posix to unix in build system to match file name changes
ihse
parents: 26751
diff changeset
   148
    $(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/libawt \
26751
70bac69b37c9 8056216: Remove "sun" directory layer from libawt and common
prr
parents: 26741
diff changeset
   149
    $(JDK_TOPDIR)/src/java.desktop/share/native/common/awt/debug \
27736
8c9bd4be4a86 8058631: Rename posix to unix in build system to match file name changes
ihse
parents: 26751
diff changeset
   150
    $(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/common/awt \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   151
    #
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   152
26225
3c7e92c78bab 8056246: Fix AIX build after the Modular Source Code change 8054834
simonis
parents: 26191
diff changeset
   153
ifeq ($(OPENJDK_TARGET_OS), aix)
3c7e92c78bab 8056246: Fix AIX build after the Modular Source Code change 8054834
simonis
parents: 26191
diff changeset
   154
  LIBAWT_DIRS += $(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS)/native/libawt
3c7e92c78bab 8056246: Fix AIX build after the Modular Source Code change 8054834
simonis
parents: 26191
diff changeset
   155
endif
3c7e92c78bab 8056246: Fix AIX build after the Modular Source Code change 8054834
simonis
parents: 26191
diff changeset
   156
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   157
ifeq ($(OPENJDK_TARGET_OS), windows)
26751
70bac69b37c9 8056216: Remove "sun" directory layer from libawt and common
prr
parents: 26741
diff changeset
   158
  LIBAWT_DIRS += $(JDK_TOPDIR)/src/java.desktop/share/native/common/awt/utility
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   159
else
26751
70bac69b37c9 8056216: Remove "sun" directory layer from libawt and common
prr
parents: 26741
diff changeset
   160
  LIBAWT_EXFILES := java2d/ShaderList.c
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   161
endif
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   162
26225
3c7e92c78bab 8056246: Fix AIX build after the Modular Source Code change 8054834
simonis
parents: 26191
diff changeset
   163
ifneq ($(filter $(OPENJDK_TARGET_OS), solaris linux macosx aix), )
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   164
  LIBAWT_EXFILES += awt_Font.c CUPSfuncs.c fontpath.c X11Color.c
14231
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents: 13702
diff changeset
   165
endif
13164
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents: 12892
diff changeset
   166
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   167
ifeq ($(OPENJDK_TARGET_OS), macosx)
26751
70bac69b37c9 8056216: Remove "sun" directory layer from libawt and common
prr
parents: 26741
diff changeset
   168
  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
   169
endif
7515a991bb37 8024854: PPC64: Basic changes and files to build the class library on AIX
simonis
parents: 22595
diff changeset
   170
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 26751
diff changeset
   171
LIBAWT_CFLAGS += -I$(SUPPORT_OUTPUTDIR)/headers/java.desktop \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   172
    $(addprefix -I, $(shell find $(LIBAWT_DIRS) -type d)) \
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   173
    $(LIBJAVA_HEADER_FLAGS) \
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   174
    $(addprefix -I, $(BUILD_LIBMLIB_IMAGE_SRC)) \
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   175
    #
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   176
26225
3c7e92c78bab 8056246: Fix AIX build after the Modular Source Code change 8054834
simonis
parents: 26191
diff changeset
   177
LIBAWT_CFLAGS += -D__MEDIALIB_OLD_NAMES -D__USE_J2D_NAMES $(X_CFLAGS)
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   178
13164
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents: 12892
diff changeset
   179
ifeq ($(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU_ARCH), solaris-sparc)
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   180
  LIBAWT_CFLAGS += -DMLIB_ADD_SUFF
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   181
  LIBAWT_CFLAGS += -xarch=sparcvis
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   182
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   183
  LIBAWT_CFLAGS += $(JDK_TOPDIR)/src/java.desktop/unix/native/libmlib_image/vis_$(OPENJDK_TARGET_CPU_BITS).il
26751
70bac69b37c9 8056216: Remove "sun" directory layer from libawt and common
prr
parents: 26741
diff changeset
   184
  LIBAWT_DIRS += $(JDK_TOPDIR)/src/java.desktop/share/native/common/awt/medialib
70bac69b37c9 8056216: Remove "sun" directory layer from libawt and common
prr
parents: 26741
diff changeset
   185
  LIBAWT_EXFILES += java2d/loops/MapAccelFunc.c
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   186
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   187
  ifeq ($(OPENJDK_TARGET_CPU), sparcv9)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   188
    LIBAWT_ASFLAGS = -P -xarch=v9a
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   189
  else
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   190
    LIBAWT_ASFLAGS = -P -xarch=v8plusa
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   191
  endif
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   192
else
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   193
  LIBAWT_EXCLUDES += \
26751
70bac69b37c9 8056216: Remove "sun" directory layer from libawt and common
prr
parents: 26741
diff changeset
   194
      $(JDK_TOPDIR)/src/java.desktop/unix/native/libawt/awt/medialib \
70bac69b37c9 8056216: Remove "sun" directory layer from libawt and common
prr
parents: 26741
diff changeset
   195
      $(JDK_TOPDIR)/src/java.desktop/unix/native/libawt/java2d/loops \
70bac69b37c9 8056216: Remove "sun" directory layer from libawt and common
prr
parents: 26741
diff changeset
   196
      $(JDK_TOPDIR)/src/java.desktop/unix/native/common/awt/medialib \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   197
      #
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   198
endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   199
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   200
ifneq ($(OPENJDK_TARGET_OS), solaris)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   201
  LIBAWT_CFLAGS += -DMLIB_NO_LIBSUNMATH
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   202
endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   203
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   204
ifeq ($(OPENJDK_TARGET_OS), windows)
26751
70bac69b37c9 8056216: Remove "sun" directory layer from libawt and common
prr
parents: 26741
diff changeset
   205
  LIBAWT_DIRS += $(JDK_TOPDIR)/src/java.desktop/share/native/common/font \
70bac69b37c9 8056216: Remove "sun" directory layer from libawt and common
prr
parents: 26741
diff changeset
   206
      $(JDK_TOPDIR)/src/java.desktop/share/native/common/java2d/opengl \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   207
  # Why does libawt need java.base headers?
26751
70bac69b37c9 8056216: Remove "sun" directory layer from libawt and common
prr
parents: 26741
diff changeset
   208
  LIBAWT_CFLAGS += -I$(JDK_TOPDIR)/src/java.desktop/share/native/common/font \
70bac69b37c9 8056216: Remove "sun" directory layer from libawt and common
prr
parents: 26741
diff changeset
   209
      -I$(JDK_TOPDIR)/src/java.desktop/share/native/common/java2d/opengl \
27736
8c9bd4be4a86 8058631: Rename posix to unix in build system to match file name changes
ihse
parents: 26751
diff changeset
   210
      -I$(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/common/java2d/opengl \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   211
      -I$(JDK_TOPDIR)/src/java.desktop/windows/native/include \
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   212
      -I$(JDK_TOPDIR)/src/java.desktop/share/native/include \
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 26751
diff changeset
   213
      -I$(SUPPORT_OUTPUTDIR)/headers/java.base \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   214
      #
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   215
  LIBAWT_EXFILES += \
26751
70bac69b37c9 8056216: Remove "sun" directory layer from libawt and common
prr
parents: 26741
diff changeset
   216
      java2d/d3d/D3DShaderGen.c \
70bac69b37c9 8056216: Remove "sun" directory layer from libawt and common
prr
parents: 26741
diff changeset
   217
      awt/image/cvutils/img_colors.c \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   218
      #
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   219
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   220
  LIBAWT_CFLAGS += -EHsc -DUNICODE -D_UNICODE
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   221
  ifeq ($(OPENJDK_TARGET_CPU_BITS), 64)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   222
    LIBAWT_CFLAGS += -DMLIB_OS64BIT
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   223
  endif
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   224
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   225
  ifdef OPENJDK
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   226
    LIBAWT_RC_FLAGS := -i "$(JDK_TOPDIR)/src/java.base/windows/native/launcher/icons"
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   227
  else
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   228
    LIBAWT_RC_FLAGS := -i "$(JDK_TOPDIR)/src/closed/java.base/windows/native/launcher/icons"
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   229
  endif
26751
70bac69b37c9 8056216: Remove "sun" directory layer from libawt and common
prr
parents: 26741
diff changeset
   230
  LIBAWT_VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/java.desktop/windows/native/libawt/windows/awt.rc
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   231
endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   232
21805
c7d7946239de 8027566: Remove the old build system
ihse
parents: 21130
diff changeset
   233
LIBAWT_MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libawt/mapfile-vers
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   234
ifeq ($(OPENJDK_TARGET_OS), linux)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   235
  LIBAWT_MAPFILE :=
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   236
endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   237
35711
d08f24178498 8148629: Disable remaining warnings in awt/fontmanager
erikj
parents: 35276
diff changeset
   238
# 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
   239
# about initializing a declared 'extern' cannot be turned off individually. Only
d08f24178498 8148629: Disable remaining warnings in awt/fontmanager
erikj
parents: 35276
diff changeset
   240
# applies to debug builds.
d08f24178498 8148629: Disable remaining warnings in awt/fontmanager
erikj
parents: 35276
diff changeset
   241
ifeq ($(TOOLCHAIN_TYPE), gcc)
d08f24178498 8148629: Disable remaining warnings in awt/fontmanager
erikj
parents: 35276
diff changeset
   242
  BUILD_LIBAWT_debug_mem.c_CFLAGS := -w
d08f24178498 8148629: Disable remaining warnings in awt/fontmanager
erikj
parents: 35276
diff changeset
   243
endif
d08f24178498 8148629: Disable remaining warnings in awt/fontmanager
erikj
parents: 35276
diff changeset
   244
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   245
$(eval $(call SetupNativeCompilation,BUILD_LIBAWT, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   246
    LIBRARY := awt, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   247
    OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   248
    SRC := $(LIBAWT_DIRS), \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   249
    EXCLUDES := $(LIBAWT_EXCLUDES), \
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   250
    EXCLUDE_FILES := $(LIBAWT_EXFILES), \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   251
    OPTIMIZATION := LOW, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   252
    CFLAGS := $(CFLAGS_JDKLIB) $(LIBAWT_CFLAGS), \
29374
f031a666744a 8074096: Disable (most) native warnings in JDK on a per-library basis
ihse
parents: 29006
diff changeset
   253
    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
   254
        format-nonliteral parentheses, \
30434
6b881118c93b 8074859: Turn on warnings as error
ihse
parents: 30325
diff changeset
   255
    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
   256
    DISABLED_WARNINGS_solstudio := E_DECLARATION_IN_CODE, \
30434
6b881118c93b 8074859: Turn on warnings as error
ihse
parents: 30325
diff changeset
   257
    DISABLED_WARNINGS_microsoft := 4297 4244 4267 4996, \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   258
    ASFLAGS := $(LIBAWT_ASFLAGS), \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   259
    MAPFILE := $(LIBAWT_MAPFILE), \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   260
    LDFLAGS := $(LDFLAGS_JDKLIB) $(call SET_SHARED_LIBRARY_ORIGIN), \
33406
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 33305
diff changeset
   261
    LDFLAGS_macosx := -L$(INSTALL_LIBRARIES_HERE), \
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 33305
diff changeset
   262
    LDFLAGS_windows := -delayload:user32.dll -delayload:gdi32.dll \
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 33305
diff changeset
   263
        -delayload:shell32.dll -delayload:winmm.dll \
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 33305
diff changeset
   264
        -delayload:winspool.drv -delayload:imm32.dll \
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 33305
diff changeset
   265
        -delayload:ole32.dll -delayload:comdlg32.dll \
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 33305
diff changeset
   266
        -delayload:comctl32.dll -delayload:shlwapi.dll, \
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 33305
diff changeset
   267
    LIBS_unix := -ljvm -ljava $(LIBM), \
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 33305
diff changeset
   268
    LIBS_linux :=  $(LIBDL), \
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 33305
diff changeset
   269
    LIBS_solaris := $(LIBDL) -lc, \
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 33305
diff changeset
   270
    LIBS_aix := $(LIBDL),\
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 33305
diff changeset
   271
    LIBS_macosx := -lmlib_image \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   272
        -framework Cocoa \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   273
        -framework OpenGL \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   274
        -framework JavaNativeFoundation \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   275
        -framework JavaRuntimeSupport \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   276
        -framework ApplicationServices \
33406
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 33305
diff changeset
   277
        -framework AudioToolbox, \
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 33305
diff changeset
   278
    LIBS_windows := kernel32.lib user32.lib gdi32.lib winspool.lib \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   279
        imm32.lib ole32.lib uuid.lib shell32.lib \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   280
        comdlg32.lib winmm.lib comctl32.lib shlwapi.lib \
33406
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 33305
diff changeset
   281
        delayimp.lib jvm.lib $(WIN_JAVA_LIB) advapi32.lib, \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   282
    VERSIONINFO_RESOURCE := $(LIBAWT_VERSIONINFO_RESOURCE), \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   283
    RC_FLAGS := $(RC_FLAGS) $(LIBAWT_RC_FLAGS) \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   284
        -D "JDK_FNAME=awt.dll" \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   285
        -D "JDK_INTERNAL_NAME=awt" \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   286
        -D "JDK_FTYPE=0x2L", \
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 26751
diff changeset
   287
    OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libawt, \
35276
50b3cdcef339 8145596: Enable debug symbols for all libraries
ihse
parents: 35241
diff changeset
   288
))
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   289
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 26751
diff changeset
   290
$(BUILD_LIBAWT): $(call FindLib, java.base, java)
13164
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents: 12892
diff changeset
   291
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents: 12892
diff changeset
   292
ifeq ($(OPENJDK_TARGET_OS), macosx)
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   293
  $(BUILD_LIBAWT): $(BUILD_LIBMLIB_IMAGE)
13164
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents: 12892
diff changeset
   294
endif
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents: 12892
diff changeset
   295
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 26751
diff changeset
   296
TARGETS += $(BUILD_LIBAWT)
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   297
26191
a0ff4b39d34b 8055188: General cleanup of minor issues from source restructure
erikj
parents: 25993
diff changeset
   298
################################################################################
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   299
21130
0f0b9c8f701a 8025673: [macosx] Disable X11 AWT toolkit
dholmes
parents: 20901
diff changeset
   300
ifeq ($(findstring $(OPENJDK_TARGET_OS),windows macosx),)
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   301
  ifndef BUILD_HEADLESS_ONLY
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   302
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   303
    LIBAWT_XAWT_DIRS := \
27736
8c9bd4be4a86 8058631: Rename posix to unix in build system to match file name changes
ihse
parents: 26751
diff changeset
   304
        $(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/libawt_xawt \
26751
70bac69b37c9 8056216: Remove "sun" directory layer from libawt and common
prr
parents: 26741
diff changeset
   305
        $(JDK_TOPDIR)/src/java.desktop/share/native/common/awt/debug \
70bac69b37c9 8056216: Remove "sun" directory layer from libawt and common
prr
parents: 26741
diff changeset
   306
        $(JDK_TOPDIR)/src/java.desktop/share/native/common/awt/utility \
70bac69b37c9 8056216: Remove "sun" directory layer from libawt and common
prr
parents: 26741
diff changeset
   307
        $(JDK_TOPDIR)/src/java.desktop/share/native/common/font \
70bac69b37c9 8056216: Remove "sun" directory layer from libawt and common
prr
parents: 26741
diff changeset
   308
        $(JDK_TOPDIR)/src/java.desktop/share/native/common/java2d/opengl \
27736
8c9bd4be4a86 8058631: Rename posix to unix in build system to match file name changes
ihse
parents: 26751
diff changeset
   309
        $(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/common/java2d/opengl \
8c9bd4be4a86 8058631: Rename posix to unix in build system to match file name changes
ihse
parents: 26751
diff changeset
   310
        $(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/common/java2d/x11 \
8c9bd4be4a86 8058631: Rename posix to unix in build system to match file name changes
ihse
parents: 26751
diff changeset
   311
        $(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/common/awt \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   312
        #
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   313
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   314
    LIBAWT_XAWT_EXCLUDES := medialib
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   315
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   316
    LIBAWT_XAWT_CFLAGS := $(addprefix -I, $(shell $(FIND) $(LIBAWT_XAWT_DIRS) -type d)) \
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 26751
diff changeset
   317
        -I$(SUPPORT_OUTPUTDIR)/headers/java.desktop \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   318
        -I$(JDK_TOPDIR)/src/java.desktop/share/native/include \
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   319
        -I$(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS)/native/include \
27736
8c9bd4be4a86 8058631: Rename posix to unix in build system to match file name changes
ihse
parents: 26751
diff changeset
   320
        -I$(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/include \
26751
70bac69b37c9 8056216: Remove "sun" directory layer from libawt and common
prr
parents: 26741
diff changeset
   321
        -I$(JDK_TOPDIR)/src/java.desktop/share/native/libawt/java2d \
27736
8c9bd4be4a86 8058631: Rename posix to unix in build system to match file name changes
ihse
parents: 26751
diff changeset
   322
        -I$(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/libawt/java2d \
26751
70bac69b37c9 8056216: Remove "sun" directory layer from libawt and common
prr
parents: 26741
diff changeset
   323
        -I$(JDK_TOPDIR)/src/java.desktop/share/native/libawt/java2d/loops \
70bac69b37c9 8056216: Remove "sun" directory layer from libawt and common
prr
parents: 26741
diff changeset
   324
        -I$(JDK_TOPDIR)/src/java.desktop/share/native/libawt/java2d/pipe \
70bac69b37c9 8056216: Remove "sun" directory layer from libawt and common
prr
parents: 26741
diff changeset
   325
        -I$(JDK_TOPDIR)/src/java.desktop/share/native/libawt/awt/image/cvutils \
70bac69b37c9 8056216: Remove "sun" directory layer from libawt and common
prr
parents: 26741
diff changeset
   326
        -I$(JDK_TOPDIR)/src/java.desktop/share/native/libawt/awt/image \
27736
8c9bd4be4a86 8058631: Rename posix to unix in build system to match file name changes
ihse
parents: 26751
diff changeset
   327
        -I$(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/libsunwjdga \
8c9bd4be4a86 8058631: Rename posix to unix in build system to match file name changes
ihse
parents: 26751
diff changeset
   328
        -I$(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/common/font \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   329
        $(LIBJAVA_HEADER_FLAGS)
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   330
        #
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   331
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   332
    LIBAWT_XAWT_CFLAGS += -DXAWT -DXAWT_HACK \
21130
0f0b9c8f701a 8025673: [macosx] Disable X11 AWT toolkit
dholmes
parents: 20901
diff changeset
   333
        -DPACKAGE_PATH=\"$(PACKAGE_PATH)\" \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   334
        $(CUPS_CFLAGS)
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   335
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   336
    ifeq ($(OPENJDK_TARGET_OS), solaris)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   337
      LIBAWT_XAWT_CFLAGS += -DFUNCPROTO=15
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   338
    endif
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   339
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   340
    ifeq ($(OPENJDK_TARGET_OS), linux)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   341
      ifeq ($(DISABLE_XRENDER), true)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   342
        LIBAWT_XAWT_CFLAGS += -DDISABLE_XRENDER_BY_DEFAULT=true
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   343
      endif
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   344
    endif
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   345
33406
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 33305
diff changeset
   346
    LIBAWT_XAWT_LIBS := $(LIBM) -lawt -lXext -lX11 -lXrender $(LIBDL) -lXtst -lXi -ljava -ljvm -lc
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   347
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   348
    ifeq ($(OPENJDK_TARGET_OS), linux)
33406
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 33305
diff changeset
   349
      LIBAWT_XAWT_LIBS += -lpthread
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   350
    endif
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   351
35711
d08f24178498 8148629: Disable remaining warnings in awt/fontmanager
erikj
parents: 35276
diff changeset
   352
    ifeq ($(TOOLCHAIN_TYPE), gcc)
d08f24178498 8148629: Disable remaining warnings in awt/fontmanager
erikj
parents: 35276
diff changeset
   353
      # 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
   354
      # that cannot be turned of individually.
d08f24178498 8148629: Disable remaining warnings in awt/fontmanager
erikj
parents: 35276
diff changeset
   355
      # redefining a macro
d08f24178498 8148629: Disable remaining warnings in awt/fontmanager
erikj
parents: 35276
diff changeset
   356
      BUILD_LIBAWT_XAWT_gtk2_interface.c_CFLAGS := -w
d08f24178498 8148629: Disable remaining warnings in awt/fontmanager
erikj
parents: 35276
diff changeset
   357
      # comparison between pointer and integer
d08f24178498 8148629: Disable remaining warnings in awt/fontmanager
erikj
parents: 35276
diff changeset
   358
      BUILD_LIBAWT_XAWT_awt_Font.c_CFLAGS := -w
d08f24178498 8148629: Disable remaining warnings in awt/fontmanager
erikj
parents: 35276
diff changeset
   359
      # initializing a declared 'extern'
d08f24178498 8148629: Disable remaining warnings in awt/fontmanager
erikj
parents: 35276
diff changeset
   360
      BUILD_LIBAWT_XAWT_debug_mem.c_CFLAGS := -w
d08f24178498 8148629: Disable remaining warnings in awt/fontmanager
erikj
parents: 35276
diff changeset
   361
      # decimal constant is unsigned only in ISO C90 (JAVASE_EMBEDDED)
d08f24178498 8148629: Disable remaining warnings in awt/fontmanager
erikj
parents: 35276
diff changeset
   362
      BUILD_LIBAWT_XAWT_XToolkit.c_CFLAGS := -w
d08f24178498 8148629: Disable remaining warnings in awt/fontmanager
erikj
parents: 35276
diff changeset
   363
   endif
d08f24178498 8148629: Disable remaining warnings in awt/fontmanager
erikj
parents: 35276
diff changeset
   364
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   365
    $(eval $(call SetupNativeCompilation,BUILD_LIBAWT_XAWT, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   366
        LIBRARY := awt_xawt, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   367
        OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   368
        SRC := $(LIBAWT_XAWT_DIRS), \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   369
        EXCLUDES := $(LIBAWT_XAWT_EXCLUDES), \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   370
        OPTIMIZATION := LOW, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   371
        CFLAGS := $(CFLAGS_JDKLIB) $(LIBAWT_XAWT_CFLAGS) \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   372
            $(X_CFLAGS), \
29374
f031a666744a 8074096: Disable (most) native warnings in JDK on a per-library basis
ihse
parents: 29006
diff changeset
   373
        DISABLED_WARNINGS_gcc := type-limits pointer-to-int-cast \
f031a666744a 8074096: Disable (most) native warnings in JDK on a per-library basis
ihse
parents: 29006
diff changeset
   374
            deprecated-declarations unused-result maybe-uninitialized format \
f031a666744a 8074096: Disable (most) native warnings in JDK on a per-library basis
ihse
parents: 29006
diff changeset
   375
            format-security int-to-pointer-cast parentheses, \
f031a666744a 8074096: Disable (most) native warnings in JDK on a per-library basis
ihse
parents: 29006
diff changeset
   376
        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
   377
            E_ASSIGNMENT_TYPE_MISMATCH E_NON_CONST_INIT, \
21805
c7d7946239de 8027566: Remove the old build system
ihse
parents: 21130
diff changeset
   378
        MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libawt_xawt/mapfile-vers, \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   379
        LDFLAGS := $(LDFLAGS_JDKLIB) \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   380
            $(call SET_SHARED_LIBRARY_ORIGIN) \
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 26751
diff changeset
   381
            $(call SET_SHARED_LIBRARY_ORIGIN,/..) \
27944
c6d5edd39016 8066752: Remove space after -L on linker lines
erikj
parents: 27799
diff changeset
   382
            -L$(INSTALL_LIBRARIES_HERE), \
33406
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 33305
diff changeset
   383
        LIBS :=  $(X_LIBS) $(LIBAWT_XAWT_LIBS), \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   384
        VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   385
        RC_FLAGS := $(RC_FLAGS) \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   386
            -D "JDK_FNAME=xawt.dll" \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   387
            -D "JDK_INTERNAL_NAME=xawt" \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   388
            -D "JDK_FTYPE=0x2L", \
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 26751
diff changeset
   389
        OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libawt_xawt, \
35276
50b3cdcef339 8145596: Enable debug symbols for all libraries
ihse
parents: 35241
diff changeset
   390
    ))
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   391
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 26751
diff changeset
   392
    $(BUILD_LIBAWT_XAWT): $(call FindLib, java.base, java)
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   393
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   394
    $(BUILD_LIBAWT_XAWT): $(BUILD_LIBAWT)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   395
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 26751
diff changeset
   396
    TARGETS += $(BUILD_LIBAWT_XAWT)
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   397
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   398
  endif
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   399
endif
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   400
26191
a0ff4b39d34b 8055188: General cleanup of minor issues from source restructure
erikj
parents: 25993
diff changeset
   401
################################################################################
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   402
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   403
LIBLCMS_SRC := $(JDK_TOPDIR)/src/java.desktop/share/native/liblcms
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 26751
diff changeset
   404
LIBLCMS_CPPFLAGS += -I$(SUPPORT_OUTPUTDIR)/headers/java.desktop \
26751
70bac69b37c9 8056216: Remove "sun" directory layer from libawt and common
prr
parents: 26741
diff changeset
   405
    -I$(JDK_TOPDIR)/src/java.desktop/share/native/libawt/java2d \
70bac69b37c9 8056216: Remove "sun" directory layer from libawt and common
prr
parents: 26741
diff changeset
   406
    -I$(JDK_TOPDIR)/src/java.desktop/share/native/common/awt/debug \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   407
    $(LIBJAVA_HEADER_FLAGS) \
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   408
    #
33285
5b20fc9010b7 8086092: More palette improvements
prr
parents: 32872
diff changeset
   409
# The fast floor code loses precision.
5b20fc9010b7 8086092: More palette improvements
prr
parents: 32872
diff changeset
   410
LCMS_CFLAGS=-DCMS_DONT_USE_FAST_FLOOR
24540
41aa84a568f3 8042159: Allow using a system-installed lcms2
omajid
parents: 23592
diff changeset
   411
41aa84a568f3 8042159: Allow using a system-installed lcms2
omajid
parents: 23592
diff changeset
   412
ifeq ($(USE_EXTERNAL_LCMS), true)
41aa84a568f3 8042159: Allow using a system-installed lcms2
omajid
parents: 23592
diff changeset
   413
  # If we're using an external library, we'll just need the wrapper part.
41aa84a568f3 8042159: Allow using a system-installed lcms2
omajid
parents: 23592
diff changeset
   414
  # By including it explicitely, all other files will be excluded.
41aa84a568f3 8042159: Allow using a system-installed lcms2
omajid
parents: 23592
diff changeset
   415
  BUILD_LIBLCMS_INCLUDE_FILES := LCMS.c
41aa84a568f3 8042159: Allow using a system-installed lcms2
omajid
parents: 23592
diff changeset
   416
else
41aa84a568f3 8042159: Allow using a system-installed lcms2
omajid
parents: 23592
diff changeset
   417
  BUILD_LIBLCMS_INCLUDE_FILES :=
41aa84a568f3 8042159: Allow using a system-installed lcms2
omajid
parents: 23592
diff changeset
   418
  # If we're using the bundled library, we'll need to include it in the
41aa84a568f3 8042159: Allow using a system-installed lcms2
omajid
parents: 23592
diff changeset
   419
  # include path explicitly. Otherwise the system headers will be used.
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   420
  LIBLCMS_CPPFLAGS += $(addprefix -I, $(LIBLCMS_SRC))
24540
41aa84a568f3 8042159: Allow using a system-installed lcms2
omajid
parents: 23592
diff changeset
   421
endif
41aa84a568f3 8042159: Allow using a system-installed lcms2
omajid
parents: 23592
diff changeset
   422
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   423
$(eval $(call SetupNativeCompilation,BUILD_LIBLCMS, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   424
    LIBRARY := lcms, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   425
    OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   426
    SRC := $(LIBLCMS_SRC), \
24540
41aa84a568f3 8042159: Allow using a system-installed lcms2
omajid
parents: 23592
diff changeset
   427
    INCLUDE_FILES := $(BUILD_LIBLCMS_INCLUDE_FILES), \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   428
    OPTIMIZATION := HIGHEST, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   429
    CFLAGS := $(filter-out -xc99=%none, $(CFLAGS_JDKLIB)) \
30434
6b881118c93b 8074859: Turn on warnings as error
ihse
parents: 30325
diff changeset
   430
        $(LIBLCMS_CPPFLAGS) \
24540
41aa84a568f3 8042159: Allow using a system-installed lcms2
omajid
parents: 23592
diff changeset
   431
        $(LCMS_CFLAGS), \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   432
    CFLAGS_solaris := -xc99=no_lib, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   433
    CFLAGS_windows := -DCMS_IS_WINDOWS_, \
30434
6b881118c93b 8074859: Turn on warnings as error
ihse
parents: 30325
diff changeset
   434
    DISABLED_WARNINGS_gcc := format-nonliteral type-limits, \
29374
f031a666744a 8074096: Disable (most) native warnings in JDK on a per-library basis
ihse
parents: 29006
diff changeset
   435
    DISABLED_WARNINGS_clang := tautological-compare, \
f031a666744a 8074096: Disable (most) native warnings in JDK on a per-library basis
ihse
parents: 29006
diff changeset
   436
    DISABLED_WARNINGS_solstudio := E_STATEMENT_NOT_REACHED, \
21805
c7d7946239de 8027566: Remove the old build system
ihse
parents: 21130
diff changeset
   437
    MAPFILE := $(JDK_TOPDIR)/make/mapfiles/liblcms/mapfile-vers, \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   438
    LDFLAGS := $(LDFLAGS_JDKLIB) \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   439
        $(call SET_SHARED_LIBRARY_ORIGIN), \
27944
c6d5edd39016 8066752: Remove space after -L on linker lines
erikj
parents: 27799
diff changeset
   440
    LDFLAGS_unix := -L$(INSTALL_LIBRARIES_HERE), \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   441
    LDFLAGS_solaris := /usr/lib$(OPENJDK_TARGET_CPU_ISADIR)/libm.so.2, \
33406
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 33305
diff changeset
   442
    LIBS_unix := -lawt -ljvm -ljava $(LCMS_LIBS), \
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 33305
diff changeset
   443
    LIBS_linux := $(LIBM), \
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 33305
diff changeset
   444
    LIBS_macosx := $(LIBM), \
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 33305
diff changeset
   445
    LIBS_solaris := -lc, \
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 33305
diff changeset
   446
    LIBS_aix := $(LIBM),\
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 33305
diff changeset
   447
    LIBS_windows := $(WIN_AWT_LIB) $(WIN_JAVA_LIB), \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   448
    VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   449
    RC_FLAGS := $(RC_FLAGS) \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   450
        -D "JDK_FNAME=lcms.dll" \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   451
        -D "JDK_INTERNAL_NAME=lcms" \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   452
        -D "JDK_FTYPE=0x2L", \
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 26751
diff changeset
   453
    OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/liblcms, \
35276
50b3cdcef339 8145596: Enable debug symbols for all libraries
ihse
parents: 35241
diff changeset
   454
))
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   455
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 26751
diff changeset
   456
TARGETS += $(BUILD_LIBLCMS)
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   457
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   458
$(BUILD_LIBLCMS): $(BUILD_LIBAWT)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   459
26191
a0ff4b39d34b 8055188: General cleanup of minor issues from source restructure
erikj
parents: 25993
diff changeset
   460
################################################################################
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   461
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   462
ifdef OPENJDK
25103
4dcb7cd7652e 8043805: Allow using a system-installed libjpeg
omajid
parents: 24566
diff changeset
   463
  BUILD_LIBJAVAJPEG_MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libjpeg/mapfile-vers
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   464
else
25103
4dcb7cd7652e 8043805: Allow using a system-installed libjpeg
omajid
parents: 24566
diff changeset
   465
  BUILD_LIBJAVAJPEG_MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libjpeg/mapfile-vers-closed
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   466
  LIBJAVAJPEG_SRC += $(JDK_TOPDIR)/src/closed/java.desktop/share/native/libjavajpeg
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   467
endif
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   468
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   469
LIBJAVAJPEG_SRC += $(JDK_TOPDIR)/src/java.desktop/share/native/libjavajpeg
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   470
25103
4dcb7cd7652e 8043805: Allow using a system-installed libjpeg
omajid
parents: 24566
diff changeset
   471
BUILD_LIBJAVAJPEG_REORDER :=
13164
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents: 12892
diff changeset
   472
ifeq ($(OPENJDK_TARGET_OS), solaris)
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   473
  ifneq ($(OPENJDK_TARGET_CPU), x86_64)
25103
4dcb7cd7652e 8043805: Allow using a system-installed libjpeg
omajid
parents: 24566
diff changeset
   474
    BUILD_LIBJAVAJPEG_REORDER := $(JDK_TOPDIR)/make/mapfiles/libjpeg/reorder-$(OPENJDK_TARGET_CPU)
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   475
  endif
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   476
endif
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   477
25103
4dcb7cd7652e 8043805: Allow using a system-installed libjpeg
omajid
parents: 24566
diff changeset
   478
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   479
# Suppress gcc warnings like "variable might be clobbered by 'longjmp'
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   480
# or 'vfork'": this warning indicates that some variable is placed to
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   481
# 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
   482
# 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
   483
# volatile to prevent the optimization. However, this approach does not
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   484
# 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
   485
#ifndef CROSS_COMPILE_ARCH
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   486
#  CC_43_OR_NEWER := \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   487
#      $(shell $(EXPR) $(CC_MAJORVER) \> 4 \| \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   488
#          \( $(CC_MAJORVER) = 4 \& $(CC_MINORVER) \>= 3 \) )
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   489
#  ifeq ($(CC_43_OR_NEWER), 1)
25103
4dcb7cd7652e 8043805: Allow using a system-installed libjpeg
omajid
parents: 24566
diff changeset
   490
#    BUILD_LIBJAVAJPEG_CFLAGS_linux += -Wno-clobbered
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   491
#  endif
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   492
#endif
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   493
25103
4dcb7cd7652e 8043805: Allow using a system-installed libjpeg
omajid
parents: 24566
diff changeset
   494
ifeq ($(USE_EXTERNAL_LIBJPEG), true)
4dcb7cd7652e 8043805: Allow using a system-installed libjpeg
omajid
parents: 24566
diff changeset
   495
  LIBJPEG_LIBS := -ljpeg
4dcb7cd7652e 8043805: Allow using a system-installed libjpeg
omajid
parents: 24566
diff changeset
   496
  BUILD_LIBJAVAJPEG_INCLUDE_FILES := \
33647
2665054d3864 8139932: Typo in makefile changes for 8043805 [Allow using a system-installed libjpeg]
omajid
parents: 33518
diff changeset
   497
      imageioJPEG.c \
25103
4dcb7cd7652e 8043805: Allow using a system-installed libjpeg
omajid
parents: 24566
diff changeset
   498
      jpegdecoder.c
4dcb7cd7652e 8043805: Allow using a system-installed libjpeg
omajid
parents: 24566
diff changeset
   499
  BUILD_LIBJAVAJPEG_HEADERS :=
4dcb7cd7652e 8043805: Allow using a system-installed libjpeg
omajid
parents: 24566
diff changeset
   500
else
4dcb7cd7652e 8043805: Allow using a system-installed libjpeg
omajid
parents: 24566
diff changeset
   501
  LIBJPEG_LIBS :=
4dcb7cd7652e 8043805: Allow using a system-installed libjpeg
omajid
parents: 24566
diff changeset
   502
  BUILD_LIBJAVAJPEG_INCLUDE_FILES :=
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   503
  BUILD_LIBJAVAJPEG_HEADERS := $(addprefix -I, $(LIBJAVAJPEG_SRC))
25103
4dcb7cd7652e 8043805: Allow using a system-installed libjpeg
omajid
parents: 24566
diff changeset
   504
endif
4dcb7cd7652e 8043805: Allow using a system-installed libjpeg
omajid
parents: 24566
diff changeset
   505
4dcb7cd7652e 8043805: Allow using a system-installed libjpeg
omajid
parents: 24566
diff changeset
   506
$(eval $(call SetupNativeCompilation,BUILD_LIBJAVAJPEG, \
4dcb7cd7652e 8043805: Allow using a system-installed libjpeg
omajid
parents: 24566
diff changeset
   507
    LIBRARY := javajpeg, \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   508
    OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   509
    SRC := $(LIBJAVAJPEG_SRC), \
25103
4dcb7cd7652e 8043805: Allow using a system-installed libjpeg
omajid
parents: 24566
diff changeset
   510
    INCLUDE_FILES := $(BUILD_LIBJAVAJPEG_INCLUDE_FILES), \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   511
    OPTIMIZATION := HIGHEST, \
31159
6f5c7d192b2d 8081447: System JPEG builds include in-tree jpeglib.h, resulting in build failure
andrew
parents: 31157
diff changeset
   512
    CFLAGS := $(CFLAGS_JDKLIB) $(BUILD_LIBJAVAJPEG_HEADERS) \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   513
        $(LIBJAVA_HEADER_FLAGS) \
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 26751
diff changeset
   514
        -I$(SUPPORT_OUTPUTDIR)/headers/java.desktop, \
31157
25a62bb54efa 8081295: Build failed with GCC 5.1.1
ysuenaga
parents: 30502
diff changeset
   515
    DISABLED_WARNINGS_gcc := clobbered parentheses array-bounds, \
29374
f031a666744a 8074096: Disable (most) native warnings in JDK on a per-library basis
ihse
parents: 29006
diff changeset
   516
    DISABLED_WARNINGS_clang := logical-op-parentheses, \
f031a666744a 8074096: Disable (most) native warnings in JDK on a per-library basis
ihse
parents: 29006
diff changeset
   517
    DISABLED_WARNINGS_microsoft := 4267, \
25103
4dcb7cd7652e 8043805: Allow using a system-installed libjpeg
omajid
parents: 24566
diff changeset
   518
    MAPFILE := $(BUILD_LIBJAVAJPEG_MAPFILE), \
33305
ed708a0e3482 8140223: fix the build with a toolchain with a linker defaulting to ld --as-needed
erikj
parents: 33285
diff changeset
   519
    LDFLAGS := $(LDFLAGS_JDKLIB) \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   520
        $(call SET_SHARED_LIBRARY_ORIGIN), \
33406
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 33305
diff changeset
   521
    LIBS := $(LIBJPEG_LIBS) $(JDKLIB_LIBS), \
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 33305
diff changeset
   522
    LIBS_windows := $(WIN_JAVA_LIB) jvm.lib, \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   523
    VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   524
    RC_FLAGS := $(RC_FLAGS) \
25103
4dcb7cd7652e 8043805: Allow using a system-installed libjpeg
omajid
parents: 24566
diff changeset
   525
        -D "JDK_FNAME=javajpeg.dll" \
4dcb7cd7652e 8043805: Allow using a system-installed libjpeg
omajid
parents: 24566
diff changeset
   526
        -D "JDK_INTERNAL_NAME=javajpeg" \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   527
        -D "JDK_FTYPE=0x2L", \
25103
4dcb7cd7652e 8043805: Allow using a system-installed libjpeg
omajid
parents: 24566
diff changeset
   528
    REORDER := $(BUILD_LIBJAVAJPEG_REORDER), \
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 26751
diff changeset
   529
    OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjavajpeg, \
35276
50b3cdcef339 8145596: Enable debug symbols for all libraries
ihse
parents: 35241
diff changeset
   530
))
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   531
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 26751
diff changeset
   532
$(BUILD_LIBJAVAJPEG): $(call FindLib, java.base, java)
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   533
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 26751
diff changeset
   534
TARGETS += $(BUILD_LIBJAVAJPEG)
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   535
26191
a0ff4b39d34b 8055188: General cleanup of minor issues from source restructure
erikj
parents: 25993
diff changeset
   536
################################################################################
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   537
29006
0d72c5ab72d8 8072116: [Solaris] : Fix for 8071710 needs to be updated for build dependency checking
prr
parents: 29002
diff changeset
   538
ifeq ($(BUILD_HEADLESS), true)
0d72c5ab72d8 8072116: [Solaris] : Fix for 8071710 needs to be updated for build dependency checking
prr
parents: 29002
diff changeset
   539
  # Mac and Windows only use the native AWT lib, do not build libawt_headless
0d72c5ab72d8 8072116: [Solaris] : Fix for 8071710 needs to be updated for build dependency checking
prr
parents: 29002
diff changeset
   540
  ifeq ($(findstring $(OPENJDK_TARGET_OS), windows macosx),)
0d72c5ab72d8 8072116: [Solaris] : Fix for 8071710 needs to be updated for build dependency checking
prr
parents: 29002
diff changeset
   541
0d72c5ab72d8 8072116: [Solaris] : Fix for 8071710 needs to be updated for build dependency checking
prr
parents: 29002
diff changeset
   542
    LIBAWT_HEADLESS_DIRS := $(JDK_TOPDIR)/src/java.desktop/unix/native/libawt_headless/awt \
0d72c5ab72d8 8072116: [Solaris] : Fix for 8071710 needs to be updated for build dependency checking
prr
parents: 29002
diff changeset
   543
        $(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/common/awt \
0d72c5ab72d8 8072116: [Solaris] : Fix for 8071710 needs to be updated for build dependency checking
prr
parents: 29002
diff changeset
   544
        $(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/common/java2d/opengl \
0d72c5ab72d8 8072116: [Solaris] : Fix for 8071710 needs to be updated for build dependency checking
prr
parents: 29002
diff changeset
   545
        $(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/common/java2d/x11 \
0d72c5ab72d8 8072116: [Solaris] : Fix for 8071710 needs to be updated for build dependency checking
prr
parents: 29002
diff changeset
   546
        $(JDK_TOPDIR)/src/java.desktop/share/native/common/java2d/opengl \
0d72c5ab72d8 8072116: [Solaris] : Fix for 8071710 needs to be updated for build dependency checking
prr
parents: 29002
diff changeset
   547
        $(JDK_TOPDIR)/src/java.desktop/share/native/common/font \
0d72c5ab72d8 8072116: [Solaris] : Fix for 8071710 needs to be updated for build dependency checking
prr
parents: 29002
diff changeset
   548
        #
0d72c5ab72d8 8072116: [Solaris] : Fix for 8071710 needs to be updated for build dependency checking
prr
parents: 29002
diff changeset
   549
0d72c5ab72d8 8072116: [Solaris] : Fix for 8071710 needs to be updated for build dependency checking
prr
parents: 29002
diff changeset
   550
    LIBAWT_HEADLESS_EXCLUDES := medialib
0d72c5ab72d8 8072116: [Solaris] : Fix for 8071710 needs to be updated for build dependency checking
prr
parents: 29002
diff changeset
   551
    LIBAWT_HEADLESS_CFLAGS := -I$(SUPPORT_OUTPUTDIR)/headers/java.desktop \
0d72c5ab72d8 8072116: [Solaris] : Fix for 8071710 needs to be updated for build dependency checking
prr
parents: 29002
diff changeset
   552
        $(addprefix -I, $(LIBAWT_HEADLESS_DIRS)) \
0d72c5ab72d8 8072116: [Solaris] : Fix for 8071710 needs to be updated for build dependency checking
prr
parents: 29002
diff changeset
   553
        -I$(JDK_TOPDIR)/src/java.desktop/share/native/libawt/java2d \
0d72c5ab72d8 8072116: [Solaris] : Fix for 8071710 needs to be updated for build dependency checking
prr
parents: 29002
diff changeset
   554
        -I$(JDK_TOPDIR)/src/java.desktop/share/native/libawt/java2d/loops \
0d72c5ab72d8 8072116: [Solaris] : Fix for 8071710 needs to be updated for build dependency checking
prr
parents: 29002
diff changeset
   555
        -I$(JDK_TOPDIR)/src/java.desktop/share/native/libawt/awt/image/cvutils \
0d72c5ab72d8 8072116: [Solaris] : Fix for 8071710 needs to be updated for build dependency checking
prr
parents: 29002
diff changeset
   556
        -I$(JDK_TOPDIR)/src/java.desktop/share/native/libawt/java2d/pipe \
0d72c5ab72d8 8072116: [Solaris] : Fix for 8071710 needs to be updated for build dependency checking
prr
parents: 29002
diff changeset
   557
        -I$(JDK_TOPDIR)/src/java.desktop/share/native/libawt/awt/image \
0d72c5ab72d8 8072116: [Solaris] : Fix for 8071710 needs to be updated for build dependency checking
prr
parents: 29002
diff changeset
   558
        -I$(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/libawt/java2d \
0d72c5ab72d8 8072116: [Solaris] : Fix for 8071710 needs to be updated for build dependency checking
prr
parents: 29002
diff changeset
   559
        -I$(JDK_TOPDIR)/src/java.desktop/share/native/common/font \
0d72c5ab72d8 8072116: [Solaris] : Fix for 8071710 needs to be updated for build dependency checking
prr
parents: 29002
diff changeset
   560
        -I$(JDK_TOPDIR)/src/java.desktop/share/native/common/awt/debug \
0d72c5ab72d8 8072116: [Solaris] : Fix for 8071710 needs to be updated for build dependency checking
prr
parents: 29002
diff changeset
   561
        -I$(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/common/font \
0d72c5ab72d8 8072116: [Solaris] : Fix for 8071710 needs to be updated for build dependency checking
prr
parents: 29002
diff changeset
   562
        -I$(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/libsunwjdga/ \
0d72c5ab72d8 8072116: [Solaris] : Fix for 8071710 needs to be updated for build dependency checking
prr
parents: 29002
diff changeset
   563
        $(LIBJAVA_HEADER_FLAGS) \
0d72c5ab72d8 8072116: [Solaris] : Fix for 8071710 needs to be updated for build dependency checking
prr
parents: 29002
diff changeset
   564
        #
0d72c5ab72d8 8072116: [Solaris] : Fix for 8071710 needs to be updated for build dependency checking
prr
parents: 29002
diff changeset
   565
0d72c5ab72d8 8072116: [Solaris] : Fix for 8071710 needs to be updated for build dependency checking
prr
parents: 29002
diff changeset
   566
    LIBAWT_HEADLESS_REORDER :=
0d72c5ab72d8 8072116: [Solaris] : Fix for 8071710 needs to be updated for build dependency checking
prr
parents: 29002
diff changeset
   567
    ifeq ($(OPENJDK_TARGET_OS), solaris)
0d72c5ab72d8 8072116: [Solaris] : Fix for 8071710 needs to be updated for build dependency checking
prr
parents: 29002
diff changeset
   568
      ifneq ($(OPENJDK_TARGET_CPU), x86_64)
0d72c5ab72d8 8072116: [Solaris] : Fix for 8071710 needs to be updated for build dependency checking
prr
parents: 29002
diff changeset
   569
        LIBAWT_HEADLESS_REORDER := $(JDK_TOPDIR)/make/mapfiles/libawt_headless/reorder-$(OPENJDK_TARGET_CPU)
0d72c5ab72d8 8072116: [Solaris] : Fix for 8071710 needs to be updated for build dependency checking
prr
parents: 29002
diff changeset
   570
      endif
0d72c5ab72d8 8072116: [Solaris] : Fix for 8071710 needs to be updated for build dependency checking
prr
parents: 29002
diff changeset
   571
    endif
0d72c5ab72d8 8072116: [Solaris] : Fix for 8071710 needs to be updated for build dependency checking
prr
parents: 29002
diff changeset
   572
0d72c5ab72d8 8072116: [Solaris] : Fix for 8071710 needs to be updated for build dependency checking
prr
parents: 29002
diff changeset
   573
    $(eval $(call SetupNativeCompilation,BUILD_LIBAWT_HEADLESS, \
0d72c5ab72d8 8072116: [Solaris] : Fix for 8071710 needs to be updated for build dependency checking
prr
parents: 29002
diff changeset
   574
        LIBRARY := awt_headless, \
0d72c5ab72d8 8072116: [Solaris] : Fix for 8071710 needs to be updated for build dependency checking
prr
parents: 29002
diff changeset
   575
        OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
0d72c5ab72d8 8072116: [Solaris] : Fix for 8071710 needs to be updated for build dependency checking
prr
parents: 29002
diff changeset
   576
        SRC := $(LIBAWT_HEADLESS_DIRS), \
0d72c5ab72d8 8072116: [Solaris] : Fix for 8071710 needs to be updated for build dependency checking
prr
parents: 29002
diff changeset
   577
        EXCLUDES := $(LIBAWT_HEADLESS_EXCLUDES), \
0d72c5ab72d8 8072116: [Solaris] : Fix for 8071710 needs to be updated for build dependency checking
prr
parents: 29002
diff changeset
   578
        OPTIMIZATION := LOW, \
0d72c5ab72d8 8072116: [Solaris] : Fix for 8071710 needs to be updated for build dependency checking
prr
parents: 29002
diff changeset
   579
        CFLAGS := $(CFLAGS_JDKLIB) \
0d72c5ab72d8 8072116: [Solaris] : Fix for 8071710 needs to be updated for build dependency checking
prr
parents: 29002
diff changeset
   580
            -DHEADLESS=true \
0d72c5ab72d8 8072116: [Solaris] : Fix for 8071710 needs to be updated for build dependency checking
prr
parents: 29002
diff changeset
   581
            -DPACKAGE_PATH=\"$(PACKAGE_PATH)\" \
0d72c5ab72d8 8072116: [Solaris] : Fix for 8071710 needs to be updated for build dependency checking
prr
parents: 29002
diff changeset
   582
            $(CUPS_CFLAGS) \
0d72c5ab72d8 8072116: [Solaris] : Fix for 8071710 needs to be updated for build dependency checking
prr
parents: 29002
diff changeset
   583
            $(X_CFLAGS) \
0d72c5ab72d8 8072116: [Solaris] : Fix for 8071710 needs to be updated for build dependency checking
prr
parents: 29002
diff changeset
   584
            $(LIBAWT_HEADLESS_CFLAGS), \
29374
f031a666744a 8074096: Disable (most) native warnings in JDK on a per-library basis
ihse
parents: 29006
diff changeset
   585
        DISABLED_WARNINGS_gcc := maybe-uninitialized int-to-pointer-cast, \
f031a666744a 8074096: Disable (most) native warnings in JDK on a per-library basis
ihse
parents: 29006
diff changeset
   586
        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
   587
            E_EMPTY_TRANSLATION_UNIT, \
29006
0d72c5ab72d8 8072116: [Solaris] : Fix for 8071710 needs to be updated for build dependency checking
prr
parents: 29002
diff changeset
   588
        MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libawt_headless/mapfile-vers, \
0d72c5ab72d8 8072116: [Solaris] : Fix for 8071710 needs to be updated for build dependency checking
prr
parents: 29002
diff changeset
   589
        LDFLAGS := $(LDFLAGS_JDKLIB) \
0d72c5ab72d8 8072116: [Solaris] : Fix for 8071710 needs to be updated for build dependency checking
prr
parents: 29002
diff changeset
   590
            $(call SET_SHARED_LIBRARY_ORIGIN), \
0d72c5ab72d8 8072116: [Solaris] : Fix for 8071710 needs to be updated for build dependency checking
prr
parents: 29002
diff changeset
   591
        LDFLAGS_unix := -L$(INSTALL_LIBRARIES_HERE), \
0d72c5ab72d8 8072116: [Solaris] : Fix for 8071710 needs to be updated for build dependency checking
prr
parents: 29002
diff changeset
   592
        LDFLAGS_linux := $(call SET_SHARED_LIBRARY_ORIGIN,/..), \
0d72c5ab72d8 8072116: [Solaris] : Fix for 8071710 needs to be updated for build dependency checking
prr
parents: 29002
diff changeset
   593
        LDFLAGS_solaris := $(call SET_SHARED_LIBRARY_ORIGIN,/..), \
0d72c5ab72d8 8072116: [Solaris] : Fix for 8071710 needs to be updated for build dependency checking
prr
parents: 29002
diff changeset
   594
        REORDER := $(LIBAWT_HEADLESS_REORDER), \
33406
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 33305
diff changeset
   595
        LIBS_unix := -lawt -ljvm -ljava, \
36110
91a3a6df36ec 8150203: Incremental update from build-infra project
ihse
parents: 35711
diff changeset
   596
        LIBS_linux := $(LIBM) $(LIBDL), \
91a3a6df36ec 8150203: Incremental update from build-infra project
ihse
parents: 35711
diff changeset
   597
        LIBS_solaris := $(LIBM) $(LIBDL) $(LIBCXX) -lc, \
29006
0d72c5ab72d8 8072116: [Solaris] : Fix for 8071710 needs to be updated for build dependency checking
prr
parents: 29002
diff changeset
   598
        OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libawt_headless, \
35276
50b3cdcef339 8145596: Enable debug symbols for all libraries
ihse
parents: 35241
diff changeset
   599
    ))
29006
0d72c5ab72d8 8072116: [Solaris] : Fix for 8071710 needs to be updated for build dependency checking
prr
parents: 29002
diff changeset
   600
0d72c5ab72d8 8072116: [Solaris] : Fix for 8071710 needs to be updated for build dependency checking
prr
parents: 29002
diff changeset
   601
    $(BUILD_LIBAWT_HEADLESS): $(BUILD_LIBAWT)
0d72c5ab72d8 8072116: [Solaris] : Fix for 8071710 needs to be updated for build dependency checking
prr
parents: 29002
diff changeset
   602
0d72c5ab72d8 8072116: [Solaris] : Fix for 8071710 needs to be updated for build dependency checking
prr
parents: 29002
diff changeset
   603
    TARGETS += $(BUILD_LIBAWT_HEADLESS)
0d72c5ab72d8 8072116: [Solaris] : Fix for 8071710 needs to be updated for build dependency checking
prr
parents: 29002
diff changeset
   604
0d72c5ab72d8 8072116: [Solaris] : Fix for 8071710 needs to be updated for build dependency checking
prr
parents: 29002
diff changeset
   605
  endif
0d72c5ab72d8 8072116: [Solaris] : Fix for 8071710 needs to be updated for build dependency checking
prr
parents: 29002
diff changeset
   606
endif
0d72c5ab72d8 8072116: [Solaris] : Fix for 8071710 needs to be updated for build dependency checking
prr
parents: 29002
diff changeset
   607
0d72c5ab72d8 8072116: [Solaris] : Fix for 8071710 needs to be updated for build dependency checking
prr
parents: 29002
diff changeset
   608
################################################################################
0d72c5ab72d8 8072116: [Solaris] : Fix for 8071710 needs to be updated for build dependency checking
prr
parents: 29002
diff changeset
   609
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   610
LIBFONTMANAGER_SRC := $(JDK_TOPDIR)/src/java.desktop/share/native/libfontmanager \
27736
8c9bd4be4a86 8058631: Rename posix to unix in build system to match file name changes
ihse
parents: 26751
diff changeset
   611
    $(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/libfontmanager
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   612
LIBFONTMANAGER_CFLAGS := \
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   613
    $(addprefix -I, $(shell $(FIND) \
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   614
      $(LIBFONTMANAGER_SRC) \
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   615
      $(JDK_TOPDIR)/src/java.desktop/share/native/libawt \
27736
8c9bd4be4a86 8058631: Rename posix to unix in build system to match file name changes
ihse
parents: 26751
diff changeset
   616
      $(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/libawt \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   617
      $(JDK_TOPDIR)/src/java.desktop/share/native/common \
27736
8c9bd4be4a86 8058631: Rename posix to unix in build system to match file name changes
ihse
parents: 26751
diff changeset
   618
      $(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/common -type d)) \
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 26751
diff changeset
   619
    -I$(SUPPORT_OUTPUTDIR)/headers/java.desktop \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   620
    $(LIBJAVA_HEADER_FLAGS) \
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   621
    #
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   622
34414
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents: 33647
diff changeset
   623
#### Begin harfbuzz configuration
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents: 33647
diff changeset
   624
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents: 33647
diff changeset
   625
HARFBUZZ_CFLAGS := -DHAVE_OT -DHAVE_FALLBACK -DHAVE_UCDN
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents: 33647
diff changeset
   626
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents: 33647
diff changeset
   627
ifneq ($(OPENJDK_TARGET_OS), windows)
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents: 33647
diff changeset
   628
  HARFBUZZ_CFLAGS += -DGETPAGESIZE -DHAVE_MPROTECT -DHAVE_PTHREAD \
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents: 33647
diff changeset
   629
                      -DHAVE_SYSCONF -DHAVE_SYS_MMAN_H -DHAVE_UNISTD_H
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents: 33647
diff changeset
   630
endif
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents: 33647
diff changeset
   631
ifneq (, $(findstring $(OPENJDK_TARGET_OS), linux macosx))
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents: 33647
diff changeset
   632
  HARFBUZZ_CFLAGS += -DHAVE_INTEL_ATOMIC_PRIMITIVES
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents: 33647
diff changeset
   633
endif
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents: 33647
diff changeset
   634
ifeq ($(OPENJDK_TARGET_OS), solaris)
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents: 33647
diff changeset
   635
  HARFBUZZ_CFLAGS += -DHAVE_SOLARIS_ATOMIC_OPS
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents: 33647
diff changeset
   636
endif
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents: 33647
diff changeset
   637
ifeq ($(OPENJDK_TARGET_OS), macosx)
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents: 33647
diff changeset
   638
  HARFBUZZ_CFLAGS += -DHAVE_CORETEXT
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents: 33647
diff changeset
   639
endif
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents: 33647
diff changeset
   640
ifneq ($(OPENJDK_TARGET_OS), macosx)
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents: 33647
diff changeset
   641
  LIBFONTMANAGER_EXCLUDE_FILES += harfbuzz/hb-coretext.cc
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents: 33647
diff changeset
   642
endif
34432
958d65712d3e 8144616: Problem building OpenJDK/harfbuzz on jprt
prr
parents: 34414
diff changeset
   643
# 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
   644
LIBFONTMANAGER_EXCLUDE_FILES += harfbuzz/hb-ft.cc
34414
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents: 33647
diff changeset
   645
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents: 33647
diff changeset
   646
LIBFONTMANAGER_CFLAGS += $(HARFBUZZ_CFLAGS)
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents: 33647
diff changeset
   647
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents: 33647
diff changeset
   648
#### End harfbuzz configuration
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents: 33647
diff changeset
   649
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   650
ifndef OPENJDK
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   651
  LIBFONTMANAGER_CFLAGS += -I$(JDK_TOPDIR)/src/closed/java.desktop/share/native/libt2k
21805
c7d7946239de 8027566: Remove the old build system
ihse
parents: 21130
diff changeset
   652
  BUILD_LIBFONTMANAGER_MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libfontmanager/mapfile-vers
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   653
  LIBFONTMANAGER_EXCLUDE_FILES += freetypeScaler.c
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   654
else
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   655
  LIBFONTMANAGER_CFLAGS += $(FREETYPE_CFLAGS)
21805
c7d7946239de 8027566: Remove the old build system
ihse
parents: 21130
diff changeset
   656
  BUILD_LIBFONTMANAGER_MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libfontmanager/mapfile-vers.openjdk
20899
3ff530a51a1b 8001922: Improve freetype handling.
ihse
parents: 20896
diff changeset
   657
  BUILD_LIBFONTMANAGER_FONTLIB := $(FREETYPE_LIBS)
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   658
endif
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   659
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   660
LIBFONTMANAGER_OPTIMIZATION := HIGH
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   661
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   662
ifeq ($(OPENJDK_TARGET_OS), windows)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   663
  LIBFONTMANAGER_EXCLUDE_FILES += X11FontScaler.c \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   664
      X11TextRenderer.c
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   665
  LIBFONTMANAGER_OPTIMIZATION := HIGHEST
27736
8c9bd4be4a86 8058631: Rename posix to unix in build system to match file name changes
ihse
parents: 26751
diff changeset
   666
  LIBFONTMANAGER_CFLAGS += -I$(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/libawt/windows
21130
0f0b9c8f701a 8025673: [macosx] Disable X11 AWT toolkit
dholmes
parents: 20901
diff changeset
   667
else ifeq ($(OPENJDK_TARGET_OS), macosx)
0f0b9c8f701a 8025673: [macosx] Disable X11 AWT toolkit
dholmes
parents: 20901
diff changeset
   668
  LIBFONTMANAGER_EXCLUDE_FILES += X11FontScaler.c \
0f0b9c8f701a 8025673: [macosx] Disable X11 AWT toolkit
dholmes
parents: 20901
diff changeset
   669
      X11TextRenderer.c \
0f0b9c8f701a 8025673: [macosx] Disable X11 AWT toolkit
dholmes
parents: 20901
diff changeset
   670
      fontpath.c \
0f0b9c8f701a 8025673: [macosx] Disable X11 AWT toolkit
dholmes
parents: 20901
diff changeset
   671
      lcdglyph.c
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   672
else
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   673
  LIBFONTMANAGER_EXCLUDE_FILES += fontpath.c \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   674
      lcdglyph.c
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   675
endif
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   676
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   677
LIBFONTMANAGER_CFLAGS += $(FONT_HEADERS) $(X_CFLAGS) -DLE_STANDALONE -DHEADLESS
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   678
35711
d08f24178498 8148629: Disable remaining warnings in awt/fontmanager
erikj
parents: 35276
diff changeset
   679
ifeq ($(TOOLCHAIN_TYPE), gcc)
d08f24178498 8148629: Disable remaining warnings in awt/fontmanager
erikj
parents: 35276
diff changeset
   680
  # 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
   681
  # about discarding 'const' qualifier cannot be turned off individually.
d08f24178498 8148629: Disable remaining warnings in awt/fontmanager
erikj
parents: 35276
diff changeset
   682
  BUILD_LIBFONTMANAGER_sunFont.c_CFLAGS := -w
d08f24178498 8148629: Disable remaining warnings in awt/fontmanager
erikj
parents: 35276
diff changeset
   683
  # Turn off aliasing with GCC for ExtensionSubtables.cpp
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   684
  BUILD_LIBFONTMANAGER_ExtensionSubtables.cpp_CXXFLAGS := -fno-strict-aliasing
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   685
endif
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
$(eval $(call SetupNativeCompilation,BUILD_LIBFONTMANAGER, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   688
    LIBRARY := fontmanager, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   689
    OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   690
    SRC := $(LIBFONTMANAGER_SRC), \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   691
    EXCLUDE_FILES := $(LIBFONTMANAGER_EXCLUDE_FILES) \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   692
        AccelGlyphCache.c, \
29931
64e274ed6567 8077824: Introduce DefineNativeToolchain to handle toolchain configurations
erikj
parents: 29734
diff changeset
   693
    TOOLCHAIN := TOOLCHAIN_LINK_CXX, \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   694
    CFLAGS := $(CFLAGS_JDKLIB) $(LIBFONTMANAGER_CFLAGS), \
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   695
    CXXFLAGS := $(CXXFLAGS_JDKLIB) $(LIBFONTMANAGER_CFLAGS), \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   696
    OPTIMIZATION := $(LIBFONTMANAGER_OPTIMIZATION), \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   697
    CFLAGS_windows = -DCC_NOEX, \
35711
d08f24178498 8148629: Disable remaining warnings in awt/fontmanager
erikj
parents: 35276
diff changeset
   698
    DISABLED_WARNINGS_gcc := sign-compare int-to-pointer-cast \
d08f24178498 8148629: Disable remaining warnings in awt/fontmanager
erikj
parents: 35276
diff changeset
   699
        type-limits missing-field-initializers, \
d08f24178498 8148629: Disable remaining warnings in awt/fontmanager
erikj
parents: 35276
diff changeset
   700
    DISABLED_WARNINGS_CXX_gcc := reorder delete-non-virtual-dtor strict-overflow \
d08f24178498 8148629: Disable remaining warnings in awt/fontmanager
erikj
parents: 35276
diff changeset
   701
        maybe-uninitialized, \
30434
6b881118c93b 8074859: Turn on warnings as error
ihse
parents: 30325
diff changeset
   702
    DISABLED_WARNINGS_clang := unused-value incompatible-pointer-types \
6b881118c93b 8074859: Turn on warnings as error
ihse
parents: 30325
diff changeset
   703
        tautological-constant-out-of-range-compare int-to-pointer-cast, \
35711
d08f24178498 8148629: Disable remaining warnings in awt/fontmanager
erikj
parents: 35276
diff changeset
   704
    DISABLED_WARNINGS_C_solstudio = \
d08f24178498 8148629: Disable remaining warnings in awt/fontmanager
erikj
parents: 35276
diff changeset
   705
        E_INTEGER_OVERFLOW_DETECTED \
d08f24178498 8148629: Disable remaining warnings in awt/fontmanager
erikj
parents: 35276
diff changeset
   706
        E_ARG_INCOMPATIBLE_WITH_ARG_L \
d08f24178498 8148629: Disable remaining warnings in awt/fontmanager
erikj
parents: 35276
diff changeset
   707
        E_ENUM_VAL_OVERFLOWS_INT_MAX, \
d08f24178498 8148629: Disable remaining warnings in awt/fontmanager
erikj
parents: 35276
diff changeset
   708
    DISABLED_WARNINGS_CXX_solstudio := \
d08f24178498 8148629: Disable remaining warnings in awt/fontmanager
erikj
parents: 35276
diff changeset
   709
        truncwarn wvarhidenmem wvarhidemem wbadlkginit identexpected \
d08f24178498 8148629: Disable remaining warnings in awt/fontmanager
erikj
parents: 35276
diff changeset
   710
        hidevf w_novirtualdescr arrowrtn2, \
34414
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents: 33647
diff changeset
   711
    DISABLED_WARNINGS_microsoft := 4267 4244 4018 4090 4996 4146 4334, \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   712
    MAPFILE := $(BUILD_LIBFONTMANAGER_MAPFILE), \
34695
7a6cc9982d22 8142907: Integration of minor fixes from the build-infra project
ihse
parents: 34432
diff changeset
   713
    LDFLAGS := $(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
   714
        $(call SET_SHARED_LIBRARY_ORIGIN), \
27944
c6d5edd39016 8066752: Remove space after -L on linker lines
erikj
parents: 27799
diff changeset
   715
    LDFLAGS_unix := -L$(INSTALL_LIBRARIES_HERE), \
33406
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 33305
diff changeset
   716
    LDFLAGS_macosx := -undefined dynamic_lookup, \
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 33305
diff changeset
   717
    LIBS := $(BUILD_LIBFONTMANAGER_FONTLIB), \
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 33305
diff changeset
   718
    LIBS_unix := -lawt -ljava -ljvm $(LIBM) $(LIBCXX), \
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 33305
diff changeset
   719
    LIBS_linux := -lc, \
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 33305
diff changeset
   720
    LIBS_solaris := -lawt_headless -lc, \
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 33305
diff changeset
   721
    LIBS_aix := -lawt_headless,\
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 33305
diff changeset
   722
    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
   723
        $(WIN_AWT_LIB), \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   724
    VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   725
    RC_FLAGS := $(RC_FLAGS) \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   726
        -D "JDK_FNAME=fontmanager.dll" \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   727
        -D "JDK_INTERNAL_NAME=fontmanager" \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   728
        -D "JDK_FTYPE=0x2L", \
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 26751
diff changeset
   729
    OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libfontmanager, \
35276
50b3cdcef339 8145596: Enable debug symbols for all libraries
ihse
parents: 35241
diff changeset
   730
))
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   731
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   732
$(BUILD_LIBFONTMANAGER): $(BUILD_LIBAWT)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   733
22595
aaa6b141196c 8028066: PPC64: 8025715 changes broke AIX build after sync
simonis
parents: 22594
diff changeset
   734
ifneq (, $(findstring $(OPENJDK_TARGET_OS), solaris aix))
29002
613ae4804312 8071710: [solaris] libfontmanager should be linked against headless awt library
prr
parents: 28537
diff changeset
   735
  $(BUILD_LIBFONTMANAGER): $(BUILD_LIBAWT_HEADLESS)
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   736
endif
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   737
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 26751
diff changeset
   738
TARGETS += $(BUILD_LIBFONTMANAGER)
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   739
26191
a0ff4b39d34b 8055188: General cleanup of minor issues from source restructure
erikj
parents: 25993
diff changeset
   740
################################################################################
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   741
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   742
ifeq ($(OPENJDK_TARGET_OS), windows)
27736
8c9bd4be4a86 8058631: Rename posix to unix in build system to match file name changes
ihse
parents: 26751
diff changeset
   743
  LIBJAWT_SRC := $(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/libjawt
8c9bd4be4a86 8058631: Rename posix to unix in build system to match file name changes
ihse
parents: 26751
diff changeset
   744
  LIBJAWT_CFLAGS := -I$(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/libawt/windows \
26751
70bac69b37c9 8056216: Remove "sun" directory layer from libawt and common
prr
parents: 26741
diff changeset
   745
      -I$(JDK_TOPDIR)/src/java.desktop/share/native/common/awt/debug \
70bac69b37c9 8056216: Remove "sun" directory layer from libawt and common
prr
parents: 26741
diff changeset
   746
      -I$(JDK_TOPDIR)/src/java.desktop/share/native/libawt/java2d \
70bac69b37c9 8056216: Remove "sun" directory layer from libawt and common
prr
parents: 26741
diff changeset
   747
      -I$(JDK_TOPDIR)/src/java.desktop/share/native/libawt/awt/image/cvutils \
27736
8c9bd4be4a86 8058631: Rename posix to unix in build system to match file name changes
ihse
parents: 26751
diff changeset
   748
      -I$(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/libawt/java2d/windows \
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 26751
diff changeset
   749
      -I$(SUPPORT_OUTPUTDIR)/headers/java.desktop \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   750
      -I$(JDK_TOPDIR)/src/java.desktop/windows/native/include \
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   751
      -I$(JDK_TOPDIR)/src/java.desktop/share/native/include \
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   752
      $(LIBJAVA_HEADER_FLAGS) \
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   753
      #
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   754
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   755
  ifeq ($(OPENJDK_TARGET_CPU), x86)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   756
    KERNEL32_LIB := kernel32.lib
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
  $(eval $(call SetupNativeCompilation,BUILD_LIBJAWT, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   759
      LIBRARY := jawt, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   760
      OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   761
      SRC := $(LIBJAWT_SRC), \
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   762
      INCLUDE_FILES := $(LIBJAWT_INCLUDE_FILES), \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   763
      OPTIMIZATION := LOW, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   764
      CFLAGS := $(CXXFLAGS_JDKLIB) \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   765
          -EHsc -DUNICODE -D_UNICODE \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   766
          $(LIBJAWT_CFLAGS), \
33406
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 33305
diff changeset
   767
      LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK), \
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 33305
diff changeset
   768
      LIBS := $(JDKLIB_LIBS) $(KERNEL32_LIB) advapi32.lib $(WIN_AWT_LIB), \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   769
      VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   770
      RC_FLAGS := $(RC_FLAGS) \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   771
          -D "JDK_FNAME=jawt.dll" \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   772
          -D "JDK_INTERNAL_NAME=jawt" \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   773
          -D "JDK_FTYPE=0x2L", \
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 26751
diff changeset
   774
      OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjawt, \
35276
50b3cdcef339 8145596: Enable debug symbols for all libraries
ihse
parents: 35241
diff changeset
   775
  ))
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   776
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   777
  $(BUILD_LIBJAWT): $(BUILD_LIBAWT)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   778
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   779
  $(JDK_OUTPUTDIR)/lib/$(LIBRARY_PREFIX)jawt$(STATIC_LIBRARY_SUFFIX): $(BUILD_LIBJAWT)
35241
075bbb8f2423 8146403: Windows build can be faster
erikj
parents: 34695
diff changeset
   780
	$(call LogInfo, Copying $(patsubst $(OUTPUT_ROOT)/%, %, $@))
075bbb8f2423 8146403: Windows build can be faster
erikj
parents: 34695
diff changeset
   781
	$(call MakeDir, $(@D))
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 26751
diff changeset
   782
	$(CP) $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjawt/$(LIBRARY_PREFIX)jawt$(STATIC_LIBRARY_SUFFIX) $@
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   783
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 26751
diff changeset
   784
  TARGETS += $(JDK_OUTPUTDIR)/lib/$(LIBRARY_PREFIX)jawt$(STATIC_LIBRARY_SUFFIX)
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   785
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   786
else # OPENJDK_TARGET_OS not windows
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   787
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   788
  ifeq ($(OPENJDK_TARGET_OS), macosx)
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   789
    LIBJAWT_SRC := $(JDK_TOPDIR)/src/java.desktop/macosx/native/libjawt
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   790
  else
27736
8c9bd4be4a86 8058631: Rename posix to unix in build system to match file name changes
ihse
parents: 26751
diff changeset
   791
    LIBJAWT_SRC := $(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/libjawt
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   792
  endif
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   793
  LIBJAWT_CFLAGS := \
27736
8c9bd4be4a86 8058631: Rename posix to unix in build system to match file name changes
ihse
parents: 26751
diff changeset
   794
      -I$(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/common/awt \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   795
      -I$(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS)/native/include \
27736
8c9bd4be4a86 8058631: Rename posix to unix in build system to match file name changes
ihse
parents: 26751
diff changeset
   796
      -I$(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/include \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   797
      -I$(JDK_TOPDIR)/src/java.desktop/share/native/include \
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   798
      $(LIBJAVA_HEADER_FLAGS) \
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   799
      #
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   800
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   801
  ifeq ($(OPENJDK_TARGET_OS), macosx)
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   802
    JAWT_LIBS := -lawt_lwawt
21130
0f0b9c8f701a 8025673: [macosx] Disable X11 AWT toolkit
dholmes
parents: 20901
diff changeset
   803
  else
0f0b9c8f701a 8025673: [macosx] Disable X11 AWT toolkit
dholmes
parents: 20901
diff changeset
   804
    JAWT_LIBS :=
0f0b9c8f701a 8025673: [macosx] Disable X11 AWT toolkit
dholmes
parents: 20901
diff changeset
   805
    ifneq ($(OPENJDK_TARGET_OS), solaris)
0f0b9c8f701a 8025673: [macosx] Disable X11 AWT toolkit
dholmes
parents: 20901
diff changeset
   806
      JAWT_LIBS += -lawt
0f0b9c8f701a 8025673: [macosx] Disable X11 AWT toolkit
dholmes
parents: 20901
diff changeset
   807
    endif
0f0b9c8f701a 8025673: [macosx] Disable X11 AWT toolkit
dholmes
parents: 20901
diff changeset
   808
    ifndef BUILD_HEADLESS_ONLY
0f0b9c8f701a 8025673: [macosx] Disable X11 AWT toolkit
dholmes
parents: 20901
diff changeset
   809
      JAWT_LIBS += -lawt_xawt
0f0b9c8f701a 8025673: [macosx] Disable X11 AWT toolkit
dholmes
parents: 20901
diff changeset
   810
    else
0f0b9c8f701a 8025673: [macosx] Disable X11 AWT toolkit
dholmes
parents: 20901
diff changeset
   811
      JAWT_LIBS += -lawt_headless
0f0b9c8f701a 8025673: [macosx] Disable X11 AWT toolkit
dholmes
parents: 20901
diff changeset
   812
      HEADLESS_CFLAG += -DHEADLESS
0f0b9c8f701a 8025673: [macosx] Disable X11 AWT toolkit
dholmes
parents: 20901
diff changeset
   813
    endif
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   814
  endif
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   815
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   816
  $(eval $(call SetupNativeCompilation,BUILD_LIBJAWT, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   817
      LIBRARY := jawt, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   818
      OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   819
      SRC := $(LIBJAWT_SRC), \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   820
      INCLUDE_FILES := $(JAWT_FILES), \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   821
      OPTIMIZATION := LOW, \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   822
      CFLAGS := $(CFLAGS_JDKLIB) \
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   823
          $(LIBJAWT_CFLAGS), \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   824
      CFLAGS_linux := $(HEADLESS_CFLAG), \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   825
      CFLAGS_macosx := $(LIBJAWT_CFLAGS_macosx), \
21805
c7d7946239de 8027566: Remove the old build system
ihse
parents: 21130
diff changeset
   826
      MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libjawt/mapfile-vers, \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   827
      LDFLAGS := $(LDFLAGS_JDKLIB) \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   828
          $(call SET_SHARED_LIBRARY_ORIGIN), \
27944
c6d5edd39016 8066752: Remove space after -L on linker lines
erikj
parents: 27799
diff changeset
   829
      LDFLAGS_unix := -L$(INSTALL_LIBRARIES_HERE), \
34695
7a6cc9982d22 8142907: Integration of minor fixes from the build-infra project
ihse
parents: 34432
diff changeset
   830
      LDFLAGS_macosx := -Wl$(COMMA)-rpath$(COMMA)@loader_path, \
33406
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 33305
diff changeset
   831
      LIBS_unix := $(JAWT_LIBS) $(JDKLIB_LIBS), \
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 33305
diff changeset
   832
      LIBS_solaris := $(X_LIBS) -lXrender, \
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 33305
diff changeset
   833
      LIBS_macosx := -framework Cocoa, \
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 26751
diff changeset
   834
      OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjawt, \
35276
50b3cdcef339 8145596: Enable debug symbols for all libraries
ihse
parents: 35241
diff changeset
   835
  ))
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   836
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   837
  ifndef BUILD_HEADLESS_ONLY
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   838
    $(BUILD_LIBJAWT): $(BUILD_LIBAWT_XAWT)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   839
  else
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   840
    $(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
   841
  endif
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   842
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   843
  ifeq ($(OPENJDK_TARGET_OS), macosx)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   844
    $(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
   845
  endif
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   846
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   847
endif # OPENJDK_TARGET_OS
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   848
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 26751
diff changeset
   849
TARGETS += $(BUILD_LIBJAWT)
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   850
26191
a0ff4b39d34b 8055188: General cleanup of minor issues from source restructure
erikj
parents: 25993
diff changeset
   851
################################################################################
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   852
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   853
ifndef BUILD_HEADLESS_ONLY
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   854
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   855
  LIBSPLASHSCREEN_DIRS := \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   856
      $(JDK_TOPDIR)/src/java.desktop/share/native/libjavajpeg \
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   857
      $(JDK_TOPDIR)/src/java.desktop/share/native/libsplashscreen \
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   858
      #
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   859
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   860
  ifeq ($(USE_EXTERNAL_LIBGIF), true)
33406
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 33305
diff changeset
   861
    GIFLIB_LIBS := -lgif
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   862
    LIBSPLASHSCREEN_EXCLUDES := giflib
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   863
  else
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   864
    LIBSPLASHSCREEN_CFLAGS += -I$(JDK_TOPDIR)/src/java.desktop/share/native/libsplashscreen/giflib
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   865
  endif
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   866
25103
4dcb7cd7652e 8043805: Allow using a system-installed libjpeg
omajid
parents: 24566
diff changeset
   867
  ifeq ($(USE_EXTERNAL_LIBJPEG), true)
33406
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 33305
diff changeset
   868
    LIBJPEG_LIBS := -ljpeg
25103
4dcb7cd7652e 8043805: Allow using a system-installed libjpeg
omajid
parents: 24566
diff changeset
   869
  else
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   870
    LIBSPLASHSCREEN_DIRS += $(JDK_TOPDIR)/src/java.desktop/share/native/libjavajpeg
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   871
    LIBJPEG_CFLAGS := -I$(JDK_TOPDIR)/src/java.desktop/share/native/libjavajpeg
25103
4dcb7cd7652e 8043805: Allow using a system-installed libjpeg
omajid
parents: 24566
diff changeset
   872
  endif
4dcb7cd7652e 8043805: Allow using a system-installed libjpeg
omajid
parents: 24566
diff changeset
   873
23305
e7d0093bfc6c 8035341: Allow using a system installed libpng
omajid
parents: 23292
diff changeset
   874
  ifeq ($(USE_EXTERNAL_LIBPNG), false)
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   875
    LIBSPLASHSCREEN_DIRS += $(JDK_TOPDIR)/src/java.desktop/share/native/libsplashscreen/libpng
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   876
  else
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   877
    LIBSPLASHSCREEN_EXCLUDES += libpng
23305
e7d0093bfc6c 8035341: Allow using a system installed libpng
omajid
parents: 23292
diff changeset
   878
  endif
e7d0093bfc6c 8035341: Allow using a system installed libpng
omajid
parents: 23292
diff changeset
   879
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   880
  ifneq ($(OPENJDK_TARGET_OS), macosx)
27736
8c9bd4be4a86 8058631: Rename posix to unix in build system to match file name changes
ihse
parents: 26751
diff changeset
   881
    LIBSPLASHSCREEN_DIRS += $(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/libsplashscreen
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   882
  else
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   883
    LIBSPLASHSCREEN_DIRS += $(JDK_TOPDIR)/src/java.desktop/macosx/native/libsplashscreen
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   884
  endif
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   885
30325
1472b22475f2 8078245: AARCH64: JDK fails to build due to undefined symbol in libpng
enevill
parents: 29931
diff changeset
   886
  LIBSPLASHSCREEN_CFLAGS += -DSPLASHSCREEN -DPNG_NO_MMX_CODE -DPNG_ARM_NEON_OPT=0 \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   887
      $(addprefix -I, $(LIBSPLASHSCREEN_DIRS)) \
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   888
      $(LIBJAVA_HEADER_FLAGS) \
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   889
      #
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   890
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   891
  ifeq ($(OPENJDK_TARGET_OS), macosx)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   892
    LIBSPLASHSCREEN_CFLAGS += -DWITH_MACOSX
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   893
    LIBSPLASHSCREEN_CFLAGS += -I$(JDK_TOPDIR)/src/java.desktop/macosx/native/libosxapp
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   894
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   895
    BUILD_LIBSPLASHSCREEN_java_awt_SplashScreen.c_CFLAGS := -x objective-c -O0
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   896
    BUILD_LIBSPLASHSCREEN_splashscreen_gfx_impl.c_CFLAGS := -x objective-c -O0
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   897
    BUILD_LIBSPLASHSCREEN_splashscreen_gif.c_CFLAGS := -x objective-c -O0
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   898
    BUILD_LIBSPLASHSCREEN_splashscreen_impl.c_CFLAGS := -x objective-c -O0
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   899
    BUILD_LIBSPLASHSCREEN_splashscreen_jpeg.c_CFLAGS := -x objective-c -O0
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   900
    BUILD_LIBSPLASHSCREEN_splashscreen_png.c_CFLAGS := -x objective-c -O0
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   901
    BUILD_LIBSPLASHSCREEN_splashscreen_sys.m_CFLAGS := -O0
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   902
20901
70f69e624fc9 8026888: Licensee build failure due to wrong libs being called
erikj
parents: 20899
diff changeset
   903
  else ifeq ($(OPENJDK_TARGET_OS), windows)
70f69e624fc9 8026888: Licensee build failure due to wrong libs being called
erikj
parents: 20899
diff changeset
   904
    LIBSPLASHSCREEN_CFLAGS += -DWITH_WIN32
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   905
  else
20901
70f69e624fc9 8026888: Licensee build failure due to wrong libs being called
erikj
parents: 20899
diff changeset
   906
    LIBSPLASHSCREEN_CFLAGS += -DWITH_X11 $(X_CFLAGS)
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   907
  endif
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   908
33406
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 33305
diff changeset
   909
  LIBSPLASHSCREEN_LIBS :=
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   910
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   911
  ifneq ($(USE_EXTERNAL_LIBZ), true)
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   912
    LIBSPLASHSCREEN_DIRS += $(JDK_TOPDIR)/src/java.base/share/native/libzip/zlib-1.2.8
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   913
    LIBSPLASHSCREEN_CFLAGS += $(ZLIB_CPPFLAGS)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   914
  endif
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   915
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   916
  ifeq ($(OPENJDK_TARGET_OS), macosx)
33406
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 33305
diff changeset
   917
    LIBSPLASHSCREEN_LDFLAGS := -L$(INSTALL_LIBRARIES_HERE)
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 33305
diff changeset
   918
    LIBSPLASHSCREEN_LIBS += \
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 26751
diff changeset
   919
        $(LIBM) -lpthread -liconv -losxapp \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   920
        -framework ApplicationServices \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   921
        -framework Foundation \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   922
        -framework Cocoa \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   923
        -framework JavaNativeFoundation
20901
70f69e624fc9 8026888: Licensee build failure due to wrong libs being called
erikj
parents: 20899
diff changeset
   924
  else ifeq ($(OPENJDK_TARGET_OS), windows)
33406
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 33305
diff changeset
   925
    LIBSPLASHSCREEN_LDFLAGS := -delayload:user32.dll
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 33305
diff changeset
   926
    LIBSPLASHSCREEN_LIBS += kernel32.lib user32.lib gdi32.lib delayimp.lib
23592
35b16ae6b4f4 8038340: Cleanup and fix sysroot and devkit handling on Linux and Solaris
erikj
parents: 23310
diff changeset
   927
  else
33406
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 33305
diff changeset
   928
    LIBSPLASHSCREEN_LIBS += $(X_LIBS) -lX11 -lXext $(LIBM) -lpthread
20901
70f69e624fc9 8026888: Licensee build failure due to wrong libs being called
erikj
parents: 20899
diff changeset
   929
  endif
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   930
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   931
  $(eval $(call SetupNativeCompilation,BUILD_LIBSPLASHSCREEN, \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   932
      LIBRARY := splashscreen, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   933
      OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   934
      SRC := $(LIBSPLASHSCREEN_DIRS), \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   935
      EXCLUDE_FILES := imageioJPEG.c jpegdecoder.c pngtest.c, \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   936
      EXCLUDES := $(LIBSPLASHSCREEN_EXCLUDES), \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   937
      OPTIMIZATION := LOW, \
23305
e7d0093bfc6c 8035341: Allow using a system installed libpng
omajid
parents: 23292
diff changeset
   938
      CFLAGS := $(LIBSPLASHSCREEN_CFLAGS) $(CFLAGS_JDKLIB) \
25103
4dcb7cd7652e 8043805: Allow using a system-installed libjpeg
omajid
parents: 24566
diff changeset
   939
                $(GIFLIB_CFLAGS) $(LIBJPEG_CFLAGS) $(PNG_CFLAGS), \
30502
50552a5900a2 8080317: Disable warning treated as error for signed/unsigned comparison in building splashscreen
prr
parents: 30439
diff changeset
   940
      DISABLED_WARNINGS_gcc := sign-compare type-limits unused-result maybe-uninitialized, \
29374
f031a666744a 8074096: Disable (most) native warnings in JDK on a per-library basis
ihse
parents: 29006
diff changeset
   941
      DISABLED_WARNINGS_clang := incompatible-pointer-types, \
32408
97230ec16697 8134408: Disable warnings for jdk libraries triggered by SS12u4
erikj
parents: 31159
diff changeset
   942
      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
   943
          E_STATEMENT_NOT_REACHED, \
30502
50552a5900a2 8080317: Disable warning treated as error for signed/unsigned comparison in building splashscreen
prr
parents: 30439
diff changeset
   944
      DISABLED_WARNINGS_microsoft := 4018 4244 4267, \
21805
c7d7946239de 8027566: Remove the old build system
ihse
parents: 21130
diff changeset
   945
      MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libsplashscreen/mapfile-vers, \
33406
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 33305
diff changeset
   946
      LDFLAGS := $(LIBSPLASHSCREEN_LDFLAGS) $(LDFLAGS_JDKLIB) \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   947
          $(call SET_SHARED_LIBRARY_ORIGIN), \
33518
3f1644328d06 8141290: AIX: fix build after '8140661: Rename LDFLAGS_SUFFIX to LIBS'
simonis
parents: 33406
diff changeset
   948
      LIBS := $(JDKLIB_LIBS) $(LIBSPLASHSCREEN_LIBS) $(LIBZ) \
33406
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 33305
diff changeset
   949
                        $(GIFLIB_LIBS) $(LIBJPEG_LIBS) $(PNG_LIBS), \
33518
3f1644328d06 8141290: AIX: fix build after '8140661: Rename LDFLAGS_SUFFIX to LIBS'
simonis
parents: 33406
diff changeset
   950
      LIBS_aix := -liconv, \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   951
      VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   952
      RC_FLAGS := $(RC_FLAGS) \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   953
          -D "JDK_FNAME=splashscreen.dll" \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   954
          -D "JDK_INTERNAL_NAME=splashscreen" \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   955
          -D "JDK_FTYPE=0x2L", \
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 26751
diff changeset
   956
      OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libsplashscreen, \
35276
50b3cdcef339 8145596: Enable debug symbols for all libraries
ihse
parents: 35241
diff changeset
   957
  ))
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   958
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 26751
diff changeset
   959
  TARGETS += $(BUILD_LIBSPLASHSCREEN)
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   960
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   961
  ifeq ($(OPENJDK_TARGET_OS), macosx)
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   962
    $(BUILD_LIBSPLASHSCREEN): $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)osxapp$(SHARED_LIBRARY_SUFFIX)
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   963
  endif
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   964
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   965
endif
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   966
26191
a0ff4b39d34b 8055188: General cleanup of minor issues from source restructure
erikj
parents: 25993
diff changeset
   967
################################################################################
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   968
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   969
ifeq ($(OPENJDK_TARGET_OS), macosx)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   970
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   971
  LIBAWT_LWAWT_DIRS := \
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   972
      $(JDK_TOPDIR)/src/java.desktop/macosx/native/libawt_lwawt \
26751
70bac69b37c9 8056216: Remove "sun" directory layer from libawt and common
prr
parents: 26741
diff changeset
   973
      $(JDK_TOPDIR)/src/java.desktop/unix/native/common/awt \
70bac69b37c9 8056216: Remove "sun" directory layer from libawt and common
prr
parents: 26741
diff changeset
   974
      $(JDK_TOPDIR)/src/java.desktop/share/native/common/font \
70bac69b37c9 8056216: Remove "sun" directory layer from libawt and common
prr
parents: 26741
diff changeset
   975
      $(JDK_TOPDIR)/src/java.desktop/share/native/common/java2d/opengl \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   976
      #
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   977
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   978
  LIBAWT_LWAWT_CFLAGS := \
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   979
      $(addprefix -I, $(LIBAWT_LWAWT_DIRS)) \
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 26751
diff changeset
   980
      -I$(SUPPORT_OUTPUTDIR)/headers/java.desktop \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   981
      -I$(JDK_TOPDIR)/src/java.desktop/macosx/native/include \
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   982
      -I$(JDK_TOPDIR)/src/java.desktop/share/native/include \
26751
70bac69b37c9 8056216: Remove "sun" directory layer from libawt and common
prr
parents: 26741
diff changeset
   983
      -I$(JDK_TOPDIR)/src/java.desktop/macosx/native/libawt_lwawt/java2d/opengl \
70bac69b37c9 8056216: Remove "sun" directory layer from libawt and common
prr
parents: 26741
diff changeset
   984
      -I$(JDK_TOPDIR)/src/java.desktop/macosx/native/libawt_lwawt/awt \
70bac69b37c9 8056216: Remove "sun" directory layer from libawt and common
prr
parents: 26741
diff changeset
   985
      -I$(JDK_TOPDIR)/src/java.desktop/unix/native/libawt_xawt/awt \
70bac69b37c9 8056216: Remove "sun" directory layer from libawt and common
prr
parents: 26741
diff changeset
   986
      -I$(JDK_TOPDIR)/src/java.desktop/macosx/native/libawt_lwawt/font \
70bac69b37c9 8056216: Remove "sun" directory layer from libawt and common
prr
parents: 26741
diff changeset
   987
      -I$(JDK_TOPDIR)/src/java.desktop/share/native/libawt/awt/image \
70bac69b37c9 8056216: Remove "sun" directory layer from libawt and common
prr
parents: 26741
diff changeset
   988
      -I$(JDK_TOPDIR)/src/java.desktop/share/native/libawt/java2d \
70bac69b37c9 8056216: Remove "sun" directory layer from libawt and common
prr
parents: 26741
diff changeset
   989
      -I$(JDK_TOPDIR)/src/java.desktop/unix/native/libawt/java2d \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   990
      -I$(JDK_TOPDIR)/src/java.desktop/share/native/libmlib_image/ \
26751
70bac69b37c9 8056216: Remove "sun" directory layer from libawt and common
prr
parents: 26741
diff changeset
   991
      -I$(JDK_TOPDIR)/src/java.desktop/share/native/libawt/awt/image/cvutils \
70bac69b37c9 8056216: Remove "sun" directory layer from libawt and common
prr
parents: 26741
diff changeset
   992
      -I$(JDK_TOPDIR)/src/java.desktop/share/native/libawt/java2d/loops \
70bac69b37c9 8056216: Remove "sun" directory layer from libawt and common
prr
parents: 26741
diff changeset
   993
      -I$(JDK_TOPDIR)/src/java.desktop/share/native/libawt/java2d/pipe \
70bac69b37c9 8056216: Remove "sun" directory layer from libawt and common
prr
parents: 26741
diff changeset
   994
      -I$(JDK_TOPDIR)/src/java.desktop/share/native/common/awt/debug \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   995
      -I$(JDK_TOPDIR)/src/java.desktop/macosx/native/libosxapp \
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   996
      $(LIBJAVA_HEADER_FLAGS) \
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
   997
      #
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   998
26741
bc80bcd0765a 8056213: Clean up unix/native/common/sun/awt
prr
parents: 26611
diff changeset
   999
  LIBAWT_LWAWT_EXFILES := fontpath.c awt_Font.c X11Color.c
26751
70bac69b37c9 8056216: Remove "sun" directory layer from libawt and common
prr
parents: 26741
diff changeset
  1000
  LIBAWT_LWAWT_EXCLUDES := $(JDK_TOPDIR)/src/java.desktop/unix/native/common/awt/medialib
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
  1001
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
  1002
  $(eval $(call SetupNativeCompilation,BUILD_LIBAWT_LWAWT, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
  1003
      LIBRARY := awt_lwawt, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
  1004
      OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
  1005
      SRC := $(LIBAWT_LWAWT_DIRS), \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
  1006
      INCLUDE_FILES := $(LIBAWT_LWAWT_FILES), \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
  1007
      EXCLUDE_FILES := $(LIBAWT_LWAWT_EXFILES), \
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
  1008
      EXCLUDES := $(LIBAWT_LWAWT_EXCLUDES), \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
  1009
      OPTIMIZATION := LOW, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
  1010
      CFLAGS := $(CFLAGS_JDKLIB) \
20901
70f69e624fc9 8026888: Licensee build failure due to wrong libs being called
erikj
parents: 20899
diff changeset
  1011
          $(X_CFLAGS) \
70f69e624fc9 8026888: Licensee build failure due to wrong libs being called
erikj
parents: 20899
diff changeset
  1012
          $(X_LIBS) \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
  1013
          $(LIBAWT_LWAWT_CFLAGS), \
32872
abca6234313d 8079965: Stop ignoring warnings for libawt_lwawt
serb
parents: 32408
diff changeset
  1014
      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
  1015
          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
  1016
          incompatible-pointer-types parentheses-equality extra-tokens, \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
  1017
      LDFLAGS := $(LDFLAGS_JDKLIB) \
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 26751
diff changeset
  1018
          $(call SET_SHARED_LIBRARY_ORIGIN) \
27944
c6d5edd39016 8066752: Remove space after -L on linker lines
erikj
parents: 27799
diff changeset
  1019
          -L$(INSTALL_LIBRARIES_HERE), \
33406
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 33305
diff changeset
  1020
      LIBS := -lawt -lmlib_image -losxapp -ljvm $(LIBM) \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
  1021
          -framework Accelerate \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
  1022
          -framework ApplicationServices \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
  1023
          -framework AudioToolbox \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
  1024
          -framework Carbon \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
  1025
          -framework Cocoa \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
  1026
          -framework Security \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
  1027
          -framework ExceptionHandling \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
  1028
          -framework JavaNativeFoundation \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
  1029
          -framework JavaRuntimeSupport \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
  1030
          -framework OpenGL \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
  1031
          -framework QuartzCore -ljava, \
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 26751
diff changeset
  1032
      OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libawt_lwawt, \
35276
50b3cdcef339 8145596: Enable debug symbols for all libraries
ihse
parents: 35241
diff changeset
  1033
  ))
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
  1034
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 26751
diff changeset
  1035
  TARGETS += $(BUILD_LIBAWT_LWAWT)
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
  1036
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
  1037
  $(BUILD_LIBAWT_LWAWT): $(BUILD_LIBAWT)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
  1038
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
  1039
  $(BUILD_LIBAWT_LWAWT): $(BUILD_LIBMLIB_IMAGE)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
  1040
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
  1041
  $(BUILD_LIBAWT_LWAWT): $(BUILD_LIBOSXAPP)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
  1042
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 26751
diff changeset
  1043
  $(BUILD_LIBAWT_LWAWT): $(call FindLib, java.base, java)
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
  1044
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
  1045
endif
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
  1046
26191
a0ff4b39d34b 8055188: General cleanup of minor issues from source restructure
erikj
parents: 25993
diff changeset
  1047
################################################################################
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
  1048
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
  1049
ifeq ($(OPENJDK_TARGET_OS), macosx)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
  1050
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
  1051
  $(eval $(call SetupNativeCompilation,BUILD_LIBOSXUI, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
  1052
      LIBRARY := osxui, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
  1053
      OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
  1054
      SRC := $(JDK_TOPDIR)/src/java.desktop/macosx/native/libosxui, \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
  1055
      OPTIMIZATION := LOW, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
  1056
      CFLAGS := $(CFLAGS_JDKLIB) \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
  1057
          -I$(JDK_TOPDIR)/src/java.desktop/macosx/native/libosxui \
26751
70bac69b37c9 8056216: Remove "sun" directory layer from libawt and common
prr
parents: 26741
diff changeset
  1058
          -I$(JDK_TOPDIR)/src/java.desktop/macosx/native/libawt_lwawt/awt \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
  1059
          -I$(JDK_TOPDIR)/src/java.desktop/macosx/native/libosxapp \
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25563
diff changeset
  1060
          -I$(JDK_TOPDIR)/src/java.base/share/native/libjava \
27736
8c9bd4be4a86 8058631: Rename posix to unix in build system to match file name changes
ihse
parents: 26751
diff changeset
  1061
          -I$(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/native/libjava \
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 26751
diff changeset
  1062
          -I$(SUPPORT_OUTPUTDIR)/headers/java.desktop,  \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
  1063
      LDFLAGS := $(LDFLAGS_JDKLIB) \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
  1064
          $(call SET_SHARED_LIBRARY_ORIGIN) \
34695
7a6cc9982d22 8142907: Integration of minor fixes from the build-infra project
ihse
parents: 34432
diff changeset
  1065
          -Wl$(COMMA)-rpath$(COMMA)@loader_path \
27944
c6d5edd39016 8066752: Remove space after -L on linker lines
erikj
parents: 27799
diff changeset
  1066
          -L$(INSTALL_LIBRARIES_HERE), \
33406
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 33305
diff changeset
  1067
      LIBS := -lawt -losxapp -lawt_lwawt \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
  1068
          -framework Cocoa \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
  1069
          -framework Carbon \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
  1070
          -framework ApplicationServices \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
  1071
          -framework JavaNativeFoundation \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
  1072
          -framework JavaRuntimeSupport \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
  1073
          -ljava -ljvm, \
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 26751
diff changeset
  1074
      OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libosxui, \
35276
50b3cdcef339 8145596: Enable debug symbols for all libraries
ihse
parents: 35241
diff changeset
  1075
  ))
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
  1076
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 26751
diff changeset
  1077
  TARGETS += $(BUILD_LIBOSXUI)
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
  1078
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
  1079
  $(BUILD_LIBOSXUI): $(BUILD_LIBAWT)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
  1080
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
  1081
  $(BUILD_LIBOSXUI): $(BUILD_LIBOSXAPP)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
  1082
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
  1083
  $(BUILD_LIBOSXUI): $(BUILD_LIBAWT_LWAWT)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
  1084
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 26751
diff changeset
  1085
  #$(BUILD_LIBOSXUI): $(call FindLib, java.base, java)
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
  1086
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
  1087
endif
26191
a0ff4b39d34b 8055188: General cleanup of minor issues from source restructure
erikj
parents: 25993
diff changeset
  1088
a0ff4b39d34b 8055188: General cleanup of minor issues from source restructure
erikj
parents: 25993
diff changeset
  1089
################################################################################
a0ff4b39d34b 8055188: General cleanup of minor issues from source restructure
erikj
parents: 25993
diff changeset
  1090
a0ff4b39d34b 8055188: General cleanup of minor issues from source restructure
erikj
parents: 25993
diff changeset
  1091
# Hook to include the corresponding custom file, if present.
a0ff4b39d34b 8055188: General cleanup of minor issues from source restructure
erikj
parents: 25993
diff changeset
  1092
$(eval $(call IncludeCustomExtension, jdk, lib/Awt2dLibraries.gmk))