make/lib/Lib-jdk.accessibility.gmk
author anazarov
Thu, 05 Apr 2018 17:04:16 -0700
changeset 49538 707553fcca04
parent 49244 995a5556edfa
child 49566 7c224ec572d0
child 56311 e05b4241302b
permissions -rw-r--r--
8196750: [Testbug] tools/launcher tests need to tolerate unrelated warnings Reviewed-by: ksrini, dholmes
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
29883
e02d168adbc6 8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff changeset
     1
#
49070
d7859531621b 8198751: Refactor SetupNativeCompilation to take NAME and TYPE
ihse
parents: 47217
diff changeset
     2
# Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved.
29883
e02d168adbc6 8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff changeset
     3
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
e02d168adbc6 8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff changeset
     4
#
e02d168adbc6 8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff changeset
     5
# This code is free software; you can redistribute it and/or modify it
e02d168adbc6 8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff changeset
     6
# under the terms of the GNU General Public License version 2 only, as
e02d168adbc6 8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff changeset
     7
# published by the Free Software Foundation.  Oracle designates this
e02d168adbc6 8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff changeset
     8
# particular file as subject to the "Classpath" exception as provided
e02d168adbc6 8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff changeset
     9
# by Oracle in the LICENSE file that accompanied this code.
e02d168adbc6 8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff changeset
    10
#
e02d168adbc6 8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff changeset
    11
# This code is distributed in the hope that it will be useful, but WITHOUT
e02d168adbc6 8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff changeset
    12
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
e02d168adbc6 8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff changeset
    13
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
e02d168adbc6 8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff changeset
    14
# version 2 for more details (a copy is included in the LICENSE file that
e02d168adbc6 8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff changeset
    15
# accompanied this code).
e02d168adbc6 8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff changeset
    16
#
e02d168adbc6 8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff changeset
    17
# You should have received a copy of the GNU General Public License version
e02d168adbc6 8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff changeset
    18
# 2 along with this work; if not, write to the Free Software Foundation,
e02d168adbc6 8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff changeset
    19
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
e02d168adbc6 8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff changeset
    20
#
e02d168adbc6 8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff changeset
    21
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
e02d168adbc6 8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff changeset
    22
# or visit www.oracle.com if you need additional information or have any
e02d168adbc6 8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff changeset
    23
# questions.
e02d168adbc6 8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff changeset
    24
#
e02d168adbc6 8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff changeset
    25
e02d168adbc6 8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff changeset
    26
include LibCommon.gmk
e02d168adbc6 8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff changeset
    27
e02d168adbc6 8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff changeset
    28
################################################################################
e02d168adbc6 8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff changeset
    29
e02d168adbc6 8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff changeset
    30
ifeq ($(OPENJDK_TARGET_OS), windows)
e02d168adbc6 8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff changeset
    31
47217
72e3ae9a25eb 8187444: Forest Consolidation: Make build work
erikj
parents: 47216
diff changeset
    32
  ROOT_SRCDIR := $(TOPDIR)/src/jdk.accessibility/windows/native
29883
e02d168adbc6 8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff changeset
    33
  JAVA_AB_SRCDIR := $(ROOT_SRCDIR)/libjavaaccessbridge $(ROOT_SRCDIR)/common
e02d168adbc6 8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff changeset
    34
  WIN_AB_SRCDIR := $(ROOT_SRCDIR)/libwindowsaccessbridge $(ROOT_SRCDIR)/common
e02d168adbc6 8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff changeset
    35
  SYSINFO_SRCDIR := $(ROOT_SRCDIR)/libjabsysinfo
e02d168adbc6 8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff changeset
    36
  ACCESSBRIDGE_CFLAGS := -I$(SUPPORT_OUTPUTDIR)/headers/jdk.accessibility \
47217
72e3ae9a25eb 8187444: Forest Consolidation: Make build work
erikj
parents: 47216
diff changeset
    37
      -I$(TOPDIR)/src/java.desktop/windows/native/include \
72e3ae9a25eb 8187444: Forest Consolidation: Make build work
erikj
parents: 47216
diff changeset
    38
      -I$(TOPDIR)/src/java.desktop/share/native/include
29883
e02d168adbc6 8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff changeset
    39
e02d168adbc6 8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff changeset
    40
  define SetupJavaDLL
e02d168adbc6 8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff changeset
    41
    # Parameter 1 Suffix
e02d168adbc6 8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff changeset
    42
    # Parameter 2 ACCESSBRIDGE_ARCH_ suffix
e02d168adbc6 8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff changeset
    43
49244
995a5556edfa 8199639: Introduce SetupJdkLibrary and SetupJdkExecutable
ihse
parents: 49239
diff changeset
    44
    $(call SetupJdkLibrary, BUILD_JAVAACCESSBRIDGE$1, \
49070
d7859531621b 8198751: Refactor SetupNativeCompilation to take NAME and TYPE
ihse
parents: 47217
diff changeset
    45
        NAME := javaaccessbridge$1, \
29883
e02d168adbc6 8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff changeset
    46
        SRC := $(JAVA_AB_SRCDIR), \
e02d168adbc6 8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff changeset
    47
        OPTIMIZATION := LOW, \
e02d168adbc6 8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff changeset
    48
        CFLAGS := $(CFLAGS_JDKLIB) $(ACCESSBRIDGE_CFLAGS) \
e02d168adbc6 8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff changeset
    49
            $(addprefix -I,$(JAVA_AB_SRCDIR)) \
42187
b2f0bdbfd4f2 8167213: Re-examine the alternative to deliver include/bridge/AccessBridgeCalls.c
ptbrunet
parents: 35276
diff changeset
    50
            -I$(ROOT_SRCDIR)/include/bridge \
29883
e02d168adbc6 8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff changeset
    51
            -DACCESSBRIDGE_ARCH_$2, \
49239
c35ec365e329 8199483: Clean up some non-standard LDFLAGS usage
ihse
parents: 49070
diff changeset
    52
        LDFLAGS := $(LDFLAGS_JDKLIB), \
33406
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 29931
diff changeset
    53
        LIBS := kernel32.lib user32.lib gdi32.lib \
29883
e02d168adbc6 8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff changeset
    54
            winspool.lib comdlg32.lib advapi32.lib shell32.lib \
e02d168adbc6 8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff changeset
    55
            $(SUPPORT_OUTPUTDIR)/native/java.desktop/libjawt/jawt.lib \
33406
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 29931
diff changeset
    56
            ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib, \
29883
e02d168adbc6 8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff changeset
    57
        VERSIONINFO_RESOURCE := $(ROOT_SRCDIR)/common/AccessBridgeStatusWindow.rc, \
35276
50b3cdcef339 8145596: Enable debug symbols for all libraries
ihse
parents: 33406
diff changeset
    58
    )
29883
e02d168adbc6 8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff changeset
    59
e02d168adbc6 8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff changeset
    60
    $$(BUILD_JAVAACCESSBRIDGE$1): $(SUPPORT_OUTPUTDIR)/native/java.desktop/libjawt/jawt.lib
e02d168adbc6 8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff changeset
    61
e02d168adbc6 8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff changeset
    62
    TARGETS += $$(BUILD_JAVAACCESSBRIDGE$1)
e02d168adbc6 8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff changeset
    63
  endef
e02d168adbc6 8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff changeset
    64
e02d168adbc6 8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff changeset
    65
  define SetupWinDLL
e02d168adbc6 8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff changeset
    66
    # Parameter 1 Suffix
e02d168adbc6 8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff changeset
    67
    # Parameter 2 ACCESSBRIDGE_ARCH_ suffix
49244
995a5556edfa 8199639: Introduce SetupJdkLibrary and SetupJdkExecutable
ihse
parents: 49239
diff changeset
    68
    $(call SetupJdkLibrary, BUILD_WINDOWSACCESSBRIDGE$1, \
49070
d7859531621b 8198751: Refactor SetupNativeCompilation to take NAME and TYPE
ihse
parents: 47217
diff changeset
    69
        NAME := windowsaccessbridge$1, \
29883
e02d168adbc6 8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff changeset
    70
        SRC := $(WIN_AB_SRCDIR), \
e02d168adbc6 8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff changeset
    71
        OPTIMIZATION := LOW, \
e02d168adbc6 8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff changeset
    72
        CFLAGS := $(filter-out -MD, $(CFLAGS_JDKLIB)) -MT $(ACCESSBRIDGE_CFLAGS) \
e02d168adbc6 8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff changeset
    73
            $(addprefix -I,$(WIN_AB_SRCDIR)) \
42187
b2f0bdbfd4f2 8167213: Re-examine the alternative to deliver include/bridge/AccessBridgeCalls.c
ptbrunet
parents: 35276
diff changeset
    74
            -I$(ROOT_SRCDIR)/include/bridge \
29883
e02d168adbc6 8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff changeset
    75
            -DACCESSBRIDGE_ARCH_$2, \
49239
c35ec365e329 8199483: Clean up some non-standard LDFLAGS usage
ihse
parents: 49070
diff changeset
    76
        LDFLAGS := $(LDFLAGS_JDKLIB) \
33406
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 29931
diff changeset
    77
            -def:$(ROOT_SRCDIR)/libwindowsaccessbridge/WinAccessBridge.DEF, \
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 29931
diff changeset
    78
        LIBS := kernel32.lib user32.lib gdi32.lib \
29883
e02d168adbc6 8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff changeset
    79
            winspool.lib comdlg32.lib advapi32.lib shell32.lib \
33406
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 29931
diff changeset
    80
            ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib, \
29883
e02d168adbc6 8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff changeset
    81
        VERSIONINFO_RESOURCE := $(ROOT_SRCDIR)/common/AccessBridgeStatusWindow.rc, \
35276
50b3cdcef339 8145596: Enable debug symbols for all libraries
ihse
parents: 33406
diff changeset
    82
    )
29883
e02d168adbc6 8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff changeset
    83
e02d168adbc6 8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff changeset
    84
    TARGETS += $$(BUILD_WINDOWSACCESSBRIDGE$1)
e02d168adbc6 8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff changeset
    85
e02d168adbc6 8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff changeset
    86
  endef
e02d168adbc6 8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff changeset
    87
e02d168adbc6 8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff changeset
    88
  define SetupAccessBridgeSysInfo
e02d168adbc6 8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff changeset
    89
49244
995a5556edfa 8199639: Introduce SetupJdkLibrary and SetupJdkExecutable
ihse
parents: 49239
diff changeset
    90
    $(call SetupJdkLibrary, BUILD_ACCESSBRIDGESYSINFO, \
49070
d7859531621b 8198751: Refactor SetupNativeCompilation to take NAME and TYPE
ihse
parents: 47217
diff changeset
    91
        NAME := jabsysinfo, \
29883
e02d168adbc6 8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff changeset
    92
        SRC := $(SYSINFO_SRCDIR), \
e02d168adbc6 8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff changeset
    93
        OPTIMIZATION := LOW, \
e02d168adbc6 8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff changeset
    94
        CFLAGS := $(CFLAGS_JDKLIB) $(ACCESSBRIDGE_CFLAGS), \
49239
c35ec365e329 8199483: Clean up some non-standard LDFLAGS usage
ihse
parents: 49070
diff changeset
    95
        LDFLAGS := $(LDFLAGS_JDKLIB), \
29883
e02d168adbc6 8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff changeset
    96
        VERSIONINFO_RESOURCE := $(ROOT_SRCDIR)/common/AccessBridgeStatusWindow.rc, \
35276
50b3cdcef339 8145596: Enable debug symbols for all libraries
ihse
parents: 33406
diff changeset
    97
    )
29883
e02d168adbc6 8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff changeset
    98
e02d168adbc6 8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff changeset
    99
    TARGETS += $$(BUILD_ACCESSBRIDGESYSINFO)
e02d168adbc6 8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff changeset
   100
e02d168adbc6 8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff changeset
   101
  endef
e02d168adbc6 8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff changeset
   102
e02d168adbc6 8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff changeset
   103
  ifeq ($(OPENJDK_TARGET_CPU_BITS), 32)
e02d168adbc6 8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff changeset
   104
    $(eval $(call SetupAccessBridgeSysInfo))
e02d168adbc6 8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff changeset
   105
    $(eval $(call SetupJavaDLL,-32,32))
e02d168adbc6 8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff changeset
   106
    $(eval $(call SetupJavaDLL,,LEGACY))
e02d168adbc6 8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff changeset
   107
    $(eval $(call SetupWinDLL,-32,32))
e02d168adbc6 8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff changeset
   108
    $(eval $(call SetupWinDLL,,LEGACY))
e02d168adbc6 8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff changeset
   109
  else
e02d168adbc6 8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff changeset
   110
    $(eval $(call SetupJavaDLL,,64))
e02d168adbc6 8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff changeset
   111
    $(eval $(call SetupWinDLL,-64,64))
e02d168adbc6 8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff changeset
   112
  endif
e02d168adbc6 8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff changeset
   113
e02d168adbc6 8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff changeset
   114
endif
e02d168adbc6 8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff changeset
   115
e02d168adbc6 8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff changeset
   116
################################################################################