jdk

Форк
0
130 строк · 4.5 Кб
1
#
2
# Copyright (c) 2011, 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 Execute.gmk
28

29
# Hook to include the corresponding custom file, if present.
30
$(eval $(call IncludeCustomExtension, modules/java.desktop/Lib.gmk))
31

32
# Prepare the find cache.
33
$(call FillFindCache, $(wildcard $(TOPDIR)/src/java.desktop/*/native))
34

35
################################################################################
36
# Create the AWT/2D libraries
37

38
include lib/AwtLibraries.gmk
39
include lib/ClientLibraries.gmk
40

41
ifeq ($(call isTargetOs, aix), false)
42
  ##############################################################################
43
  # Build libjsound
44
  ##############################################################################
45

46
  LIBJSOUND_CFLAGS := \
47
      $(ALSA_CFLAGS) \
48
      -DX_PLATFORM=X_$(OPENJDK_TARGET_OS_UPPERCASE) \
49
      -DUSE_PORTS=TRUE \
50
      -DUSE_DAUDIO=TRUE \
51
      -DUSE_PLATFORM_MIDI_OUT=TRUE \
52
      -DUSE_PLATFORM_MIDI_IN=TRUE \
53
      #
54

55
  LIBJSOUND_LINK_TYPE := C
56
  ifeq ($(call isTargetOs, macosx), true)
57
    LIBJSOUND_LINK_TYPE := C++
58
  endif
59

60
  $(eval $(call SetupJdkLibrary, BUILD_LIBJSOUND, \
61
      NAME := jsound, \
62
      LINK_TYPE := $(LIBJSOUND_LINK_TYPE), \
63
      OPTIMIZATION := LOW, \
64
      EXTRA_HEADER_DIRS := java.base:libjava, \
65
      CFLAGS := $(LIBJSOUND_CFLAGS), \
66
      CXXFLAGS := $(LIBJSOUND_CFLAGS), \
67
      DISABLED_WARNINGS_gcc := undef, \
68
      DISABLED_WARNINGS_clang := undef, \
69
      LIBS_linux := $(ALSA_LIBS), \
70
      LIBS_macosx := \
71
          -framework AudioToolbox \
72
          -framework AudioUnit \
73
          -framework CoreAudio \
74
          -framework CoreFoundation \
75
          -framework CoreMIDI \
76
          -framework CoreServices, \
77
      LIBS_windows := advapi32.lib dsound.lib ole32.lib user32.lib winmm.lib, \
78
  ))
79

80
  TARGETS += $(BUILD_LIBJSOUND)
81
endif
82

83
ifeq ($(call isTargetOs, macosx), true)
84
  ##############################################################################
85
  # Build libosxapp
86
  ##############################################################################
87

88
  $(eval $(call SetupJdkLibrary, BUILD_LIBOSXAPP, \
89
      NAME := osxapp, \
90
      OPTIMIZATION := LOW, \
91
      DISABLED_WARNINGS_clang_NSApplicationAWT.m := deprecated-declarations \
92
          format-nonliteral, \
93
      DISABLED_WARNINGS_clang_QueuingApplicationDelegate.m := \
94
          objc-method-access, \
95
      JDK_LIBS := java.base:libjava, \
96
      LIBS_macosx := \
97
          -framework Accelerate \
98
          -framework ApplicationServices \
99
          -framework AudioToolbox \
100
          -framework Carbon \
101
          -framework Cocoa \
102
          -framework ExceptionHandling \
103
          -framework IOSurface \
104
          -framework JavaRuntimeSupport \
105
          -framework OpenGL \
106
          -framework QuartzCore \
107
          -framework Security, \
108
  ))
109

110
  TARGETS += $(BUILD_LIBOSXAPP)
111

112
  ##############################################################################
113
  # Build libosx
114
  ##############################################################################
115

116
  $(eval $(call SetupJdkLibrary, BUILD_LIBOSX, \
117
      NAME := osx, \
118
      OPTIMIZATION := LOW, \
119
      EXTRA_HEADER_DIRS := java.base:libjava, \
120
      DISABLED_WARNINGS_clang_CFileManager.m := deprecated-declarations, \
121
      JDK_LIBS := libosxapp, \
122
      LIBS_macosx := \
123
          -framework ApplicationServices \
124
          -framework Cocoa \
125
          -framework JavaRuntimeSupport \
126
          -framework SystemConfiguration, \
127
  ))
128

129
  TARGETS += $(BUILD_LIBOSX)
130
endif
131

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

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

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

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