make/lib/Lib-jdk.accessibility.gmk
author ghaug
Mon, 13 Aug 2018 12:24:25 +0200
changeset 51382 0038e99f93bc
parent 50471 f0aeede1b855
child 51820 74c67f87fe80
permissions -rw-r--r--
8209357: [PPC64] Fix build which was broken by 8208672 (Enable -Wreorder) Reviewed-by: mbaesken, tschatzl
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
e02d168adbc6 8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff changeset
    34
  define SetupJavaDLL
e02d168adbc6 8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff changeset
    35
    # Parameter 1 Suffix
e02d168adbc6 8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff changeset
    36
    # Parameter 2 ACCESSBRIDGE_ARCH_ suffix
e02d168adbc6 8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff changeset
    37
49244
995a5556edfa 8199639: Introduce SetupJdkLibrary and SetupJdkExecutable
ihse
parents: 49239
diff changeset
    38
    $(call SetupJdkLibrary, BUILD_JAVAACCESSBRIDGE$1, \
49070
d7859531621b 8198751: Refactor SetupNativeCompilation to take NAME and TYPE
ihse
parents: 47217
diff changeset
    39
        NAME := javaaccessbridge$1, \
50471
f0aeede1b855 8204572: SetupJdkLibrary should setup SRC and -I flags automatically
ihse
parents: 49566
diff changeset
    40
        SRC := libjavaaccessbridge, \
f0aeede1b855 8204572: SetupJdkLibrary should setup SRC and -I flags automatically
ihse
parents: 49566
diff changeset
    41
        EXTRA_SRC := common, \
29883
e02d168adbc6 8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff changeset
    42
        OPTIMIZATION := LOW, \
49566
7c224ec572d0 8201267: Disable warnings for VS2017 to enable building
erikj
parents: 49244
diff changeset
    43
        DISABLED_WARNINGS_microsoft := 4311 4302 4312, \
50471
f0aeede1b855 8204572: SetupJdkLibrary should setup SRC and -I flags automatically
ihse
parents: 49566
diff changeset
    44
        CFLAGS := $(CFLAGS_JDKLIB) \
29883
e02d168adbc6 8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff changeset
    45
            -DACCESSBRIDGE_ARCH_$2, \
50471
f0aeede1b855 8204572: SetupJdkLibrary should setup SRC and -I flags automatically
ihse
parents: 49566
diff changeset
    46
        EXTRA_HEADER_DIRS := \
f0aeede1b855 8204572: SetupJdkLibrary should setup SRC and -I flags automatically
ihse
parents: 49566
diff changeset
    47
            include/bridge \
f0aeede1b855 8204572: SetupJdkLibrary should setup SRC and -I flags automatically
ihse
parents: 49566
diff changeset
    48
            java.base:include \
f0aeede1b855 8204572: SetupJdkLibrary should setup SRC and -I flags automatically
ihse
parents: 49566
diff changeset
    49
            java.desktop:include, \
49239
c35ec365e329 8199483: Clean up some non-standard LDFLAGS usage
ihse
parents: 49070
diff changeset
    50
        LDFLAGS := $(LDFLAGS_JDKLIB), \
33406
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 29931
diff changeset
    51
        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
    52
            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
    53
            $(SUPPORT_OUTPUTDIR)/native/java.desktop/libjawt/jawt.lib \
33406
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 29931
diff changeset
    54
            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
    55
        VERSIONINFO_RESOURCE := $(ROOT_SRCDIR)/common/AccessBridgeStatusWindow.rc, \
35276
50b3cdcef339 8145596: Enable debug symbols for all libraries
ihse
parents: 33406
diff changeset
    56
    )
29883
e02d168adbc6 8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff changeset
    57
e02d168adbc6 8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff changeset
    58
    $$(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
    59
e02d168adbc6 8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff changeset
    60
    TARGETS += $$(BUILD_JAVAACCESSBRIDGE$1)
e02d168adbc6 8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff changeset
    61
  endef
e02d168adbc6 8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff changeset
    62
e02d168adbc6 8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff changeset
    63
  define SetupWinDLL
e02d168adbc6 8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff changeset
    64
    # Parameter 1 Suffix
e02d168adbc6 8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff changeset
    65
    # Parameter 2 ACCESSBRIDGE_ARCH_ suffix
49244
995a5556edfa 8199639: Introduce SetupJdkLibrary and SetupJdkExecutable
ihse
parents: 49239
diff changeset
    66
    $(call SetupJdkLibrary, BUILD_WINDOWSACCESSBRIDGE$1, \
49070
d7859531621b 8198751: Refactor SetupNativeCompilation to take NAME and TYPE
ihse
parents: 47217
diff changeset
    67
        NAME := windowsaccessbridge$1, \
50471
f0aeede1b855 8204572: SetupJdkLibrary should setup SRC and -I flags automatically
ihse
parents: 49566
diff changeset
    68
        SRC := libwindowsaccessbridge, \
f0aeede1b855 8204572: SetupJdkLibrary should setup SRC and -I flags automatically
ihse
parents: 49566
diff changeset
    69
        EXTRA_SRC := common, \
29883
e02d168adbc6 8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff changeset
    70
        OPTIMIZATION := LOW, \
49566
7c224ec572d0 8201267: Disable warnings for VS2017 to enable building
erikj
parents: 49244
diff changeset
    71
        DISABLED_WARNINGS_microsoft := 4311 4302 4312, \
50471
f0aeede1b855 8204572: SetupJdkLibrary should setup SRC and -I flags automatically
ihse
parents: 49566
diff changeset
    72
        CFLAGS := $(filter-out -MD, $(CFLAGS_JDKLIB)) -MT \
29883
e02d168adbc6 8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff changeset
    73
            -DACCESSBRIDGE_ARCH_$2, \
50471
f0aeede1b855 8204572: SetupJdkLibrary should setup SRC and -I flags automatically
ihse
parents: 49566
diff changeset
    74
        EXTRA_HEADER_DIRS := \
f0aeede1b855 8204572: SetupJdkLibrary should setup SRC and -I flags automatically
ihse
parents: 49566
diff changeset
    75
            include/bridge \
f0aeede1b855 8204572: SetupJdkLibrary should setup SRC and -I flags automatically
ihse
parents: 49566
diff changeset
    76
            java.base:include, \
49239
c35ec365e329 8199483: Clean up some non-standard LDFLAGS usage
ihse
parents: 49070
diff changeset
    77
        LDFLAGS := $(LDFLAGS_JDKLIB) \
33406
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 29931
diff changeset
    78
            -def:$(ROOT_SRCDIR)/libwindowsaccessbridge/WinAccessBridge.DEF, \
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 29931
diff changeset
    79
        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
    80
            winspool.lib comdlg32.lib advapi32.lib shell32.lib \
33406
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 29931
diff changeset
    81
            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
    82
        VERSIONINFO_RESOURCE := $(ROOT_SRCDIR)/common/AccessBridgeStatusWindow.rc, \
35276
50b3cdcef339 8145596: Enable debug symbols for all libraries
ihse
parents: 33406
diff changeset
    83
    )
29883
e02d168adbc6 8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff changeset
    84
e02d168adbc6 8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff changeset
    85
    TARGETS += $$(BUILD_WINDOWSACCESSBRIDGE$1)
e02d168adbc6 8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff changeset
    86
e02d168adbc6 8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff changeset
    87
  endef
e02d168adbc6 8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff changeset
    88
e02d168adbc6 8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff changeset
    89
  define SetupAccessBridgeSysInfo
e02d168adbc6 8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff changeset
    90
49244
995a5556edfa 8199639: Introduce SetupJdkLibrary and SetupJdkExecutable
ihse
parents: 49239
diff changeset
    91
    $(call SetupJdkLibrary, BUILD_ACCESSBRIDGESYSINFO, \
49070
d7859531621b 8198751: Refactor SetupNativeCompilation to take NAME and TYPE
ihse
parents: 47217
diff changeset
    92
        NAME := jabsysinfo, \
29883
e02d168adbc6 8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff changeset
    93
        OPTIMIZATION := LOW, \
50471
f0aeede1b855 8204572: SetupJdkLibrary should setup SRC and -I flags automatically
ihse
parents: 49566
diff changeset
    94
        CFLAGS := $(CFLAGS_JDKLIB), \
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
################################################################################