jdk

Форк
0
181 строка · 7.1 Кб
1
#
2
# Copyright (c) 2018, 2024, Oracle and/or its affiliates. All rights reserved.
3
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4
#
5
# This code is free software; you can redistribute it and/or modify it
6
# under the terms of the GNU General Public License version 2 only, as
7
# published by the Free Software Foundation.  Oracle designates this
8
# particular file as subject to the "Classpath" exception as provided
9
# by Oracle in the LICENSE file that accompanied this code.
10
#
11
# This code is distributed in the hope that it will be useful, but WITHOUT
12
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
14
# version 2 for more details (a copy is included in the LICENSE file that
15
# accompanied this code).
16
#
17
# You should have received a copy of the GNU General Public License version
18
# 2 along with this work; if not, write to the Free Software Foundation,
19
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20
#
21
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22
# or visit www.oracle.com if you need additional information or have any
23
# questions.
24
#
25

26
include LibCommon.gmk
27
include LauncherCommon.gmk
28

29
JPACKAGE_OUTPUT_DIR := \
30
    $(JDK_OUTPUTDIR)/modules/$(MODULE)/jdk/jpackage/internal/resources
31

32
JPACKAGE_CFLAGS_windows := -DUNICODE -D_UNICODE
33
JPACKAGE_CXXFLAGS_windows := -EHsc $(JPACKAGE_CFLAGS_windows)
34

35
################################################################################
36
## Build jpackageapplauncher
37
################################################################################
38

39
ifeq ($(call isTargetOs, linux), true)
40
  JPACKAGEAPPLAUNCHER_LINK_TYPE := C
41
  JPACKAGEAPPLAUNCHER_INCLUDE_FILES := %.c
42
else
43
  JPACKAGEAPPLAUNCHER_LINK_TYPE := C++
44
endif
45

46
# Output app launcher executable in resources dir, and symbols in the object dir
47
$(eval $(call SetupJdkExecutable, BUILD_JPACKAGEAPPLAUNCHER, \
48
    NAME := jpackageapplauncher, \
49
    LINK_TYPE := $(JPACKAGEAPPLAUNCHER_LINK_TYPE), \
50
    OUTPUT_DIR := $(JPACKAGE_OUTPUT_DIR), \
51
    SYMBOLS_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/jpackageapplauncher, \
52
    SRC := applauncher, \
53
    EXTRA_SRC := common, \
54
    INCLUDE_FILES := $(JPACKAGEAPPLAUNCHER_INCLUDE_FILES), \
55
    OPTIMIZATION := LOW, \
56
    DISABLED_WARNINGS_clang_LinuxPackage.c := format-nonliteral, \
57
    DISABLED_WARNINGS_clang_JvmLauncherLib.c := format-nonliteral, \
58
    CFLAGS_FILTER_OUT := -MD, \
59
    CXXFLAGS_FILTER_OUT := -MD, \
60
    CFLAGS_macosx := -Wno-format-nonliteral, \
61
    CFLAGS_windows := -MT $(JPACKAGE_CFLAGS_windows), \
62
    CXXFLAGS_windows := -MT $(JPACKAGE_CXXFLAGS_windows), \
63
    LD_SET_ORIGIN := false, \
64
    LDFLAGS_macosx := -rpath @executable_path/../Frameworks/ \
65
        -rpath @executable_path/../PlugIns/, \
66
    LIBS_macosx := -framework Cocoa, \
67
    LIBS_windows := msi.lib ole32.lib shell32.lib shlwapi.lib user32.lib, \
68
    LIBS_linux := $(LIBDL), \
69
    MANIFEST := $(JAVA_MANIFEST), \
70
    MANIFEST_VERSION := $(VERSION_NUMBER_FOUR_POSITIONS) \
71
))
72

73
TARGETS += $(BUILD_JPACKAGEAPPLAUNCHER)
74

75
ifeq ($(call isTargetOs, linux), true)
76
  ##############################################################################
77
  ## Build libjpackageapplauncheraux
78
  ##############################################################################
79

80
  $(eval $(call SetupJdkLibrary, BUILD_LIBJPACKAGEAPPLAUNCHERAUX, \
81
      NAME := jpackageapplauncheraux, \
82
      OUTPUT_DIR := $(JPACKAGE_OUTPUT_DIR), \
83
      SYMBOLS_DIR := \
84
          $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjpackageapplauncheraux, \
85
      SRC := libapplauncher, \
86
      EXTRA_SRC := \
87
          applauncher \
88
          common, \
89
      EXCLUDE_FILES := LinuxLauncher.c LinuxPackage.c, \
90
      LINK_TYPE := C++, \
91
      OPTIMIZATION := LOW, \
92
      DISABLED_WARNINGS_clang_JvmLauncherLib.c := format-nonliteral, \
93
      DISABLED_WARNINGS_clang_tstrings.cpp := format-nonliteral, \
94
      LD_SET_ORIGIN := false, \
95
      LIBS_linux := $(LIBDL), \
96
  ))
97

98
  TARGETS += $(BUILD_LIBJPACKAGEAPPLAUNCHERAUX)
99
endif
100

101
ifeq ($(call isTargetOs, windows), true)
102
  ##############################################################################
103
  ## Build libjpackage
104
  ##############################################################################
105

106
  $(eval $(call SetupJdkLibrary, BUILD_LIBJPACKAGE, \
107
      NAME := jpackage, \
108
      OPTIMIZATION := LOW, \
109
      EXTRA_SRC := common, \
110
      CXXFLAGS_windows := $(JPACKAGE_CXXFLAGS_windows), \
111
      LDFLAGS := $(LDFLAGS_CXX_JDK), \
112
      LIBS_windows := advapi32.lib msi.lib ole32.lib shell32.lib shlwapi.lib \
113
          user32.lib, \
114
  ))
115

116
  TARGETS += $(BUILD_LIBJPACKAGE)
117

118
  ##############################################################################
119
  ## Build libwixhelper
120
  ##############################################################################
121

122
  # Build Wix custom action helper
123
  # Output library in resources dir, and symbols in the object dir
124
  $(eval $(call SetupJdkLibrary, BUILD_LIBWIXHELPER, \
125
      NAME := wixhelper, \
126
      OUTPUT_DIR := $(JPACKAGE_OUTPUT_DIR), \
127
      SYMBOLS_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libwixhelper, \
128
      OPTIMIZATION := LOW, \
129
      EXTRA_SRC := common, \
130
      CXXFLAGS_FILTER_OUT := -MD, \
131
      CXXFLAGS_windows := -MT $(JPACKAGE_CXXFLAGS_windows), \
132
      LDFLAGS := $(LDFLAGS_CXX_JDK), \
133
      LIBS_windows := msi.lib ole32.lib shell32.lib shlwapi.lib user32.lib, \
134
  ))
135

136
  TARGETS += $(BUILD_LIBWIXHELPER)
137

138
  ##############################################################################
139
  ## Build msiwrapper
140
  ##############################################################################
141

142
  # Build exe installer wrapper for msi installer
143
  $(eval $(call SetupJdkExecutable, BUILD_MSIWRAPPER, \
144
      NAME := msiwrapper, \
145
      OUTPUT_DIR := $(JPACKAGE_OUTPUT_DIR), \
146
      SYMBOLS_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/msiwrapper, \
147
      EXTRA_SRC := common, \
148
      CXXFLAGS_FILTER_OUT := -MD, \
149
      CXXFLAGS_windows := -MT $(JPACKAGE_CXXFLAGS_windows), \
150
      LIBS_windows := msi.lib ole32.lib shell32.lib shlwapi.lib user32.lib, \
151
  ))
152

153
  TARGETS += $(BUILD_MSIWRAPPER)
154

155
  ##############################################################################
156
  ## Build jpackageapplauncherw
157
  ##############################################################################
158

159
  # Build non-console version of launcher
160
  $(eval $(call SetupJdkExecutable, BUILD_JPACKAGEAPPLAUNCHERW, \
161
      NAME := jpackageapplauncherw, \
162
      OUTPUT_DIR := $(JPACKAGE_OUTPUT_DIR), \
163
      SYMBOLS_DIR := \
164
          $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/jpackageapplauncherw, \
165
      SRC := applauncher, \
166
      EXTRA_SRC := common, \
167
      OPTIMIZATION := LOW, \
168
      CFLAGS_FILTER_OUT := -MD, \
169
      CXXFLAGS_FILTER_OUT := -MD, \
170
      CFLAGS := -DJP_LAUNCHERW, \
171
      CXXFLAGS := -DJP_LAUNCHERW, \
172
      CFLAGS_windows := -MT $(JPACKAGE_CFLAGS_windows), \
173
      CXXFLAGS_windows := -MT $(JPACKAGE_CXXFLAGS_windows), \
174
      LD_SET_ORIGIN := false, \
175
      LIBS_windows := msi.lib ole32.lib shell32.lib shlwapi.lib user32.lib, \
176
      MANIFEST := $(JAVA_MANIFEST), \
177
      MANIFEST_VERSION := $(VERSION_NUMBER_FOUR_POSITIONS) \
178
  ))
179

180
  TARGETS += $(BUILD_JPACKAGEAPPLAUNCHERW)
181
endif
182

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.