jdk

Форк
0
/
StaticLibsImage.gmk 
82 строки · 2.9 Кб
1
#
2
# Copyright (c) 2019, 2023, 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
# This makefile creates an image of the optional static versions of certain JDK
27
# libraries.
28

29
default: all
30

31
include $(SPEC)
32
include MakeBase.gmk
33

34
include CopyFiles.gmk
35
include Modules.gmk
36

37
ALL_MODULES = $(call FindAllModules)
38

39
################################################################################
40

41
TARGETS :=
42

43
ifneq ($(filter static-libs-image, $(MAKECMDGOALS)), )
44
  IMAGE_DEST_DIR=$(STATIC_LIBS_IMAGE_DIR)/lib
45
else ifneq ($(filter static-libs-graal-image, $(MAKECMDGOALS)), )
46
  IMAGE_DEST_DIR=$(STATIC_LIBS_GRAAL_IMAGE_DIR)/lib
47
endif
48

49
# Copy JDK static libs to the image.
50
$(foreach m, $(ALL_MODULES), \
51
  $(eval $(call SetupCopyFiles, COPY_STATIC_LIBS_$m, \
52
      FLATTEN := true, \
53
      SRC := $(SUPPORT_OUTPUTDIR)/native/$m, \
54
      DEST := $(IMAGE_DEST_DIR), \
55
      FILES := $(filter %$(STATIC_LIBRARY_SUFFIX), \
56
          $(call FindFiles, $(SUPPORT_OUTPUTDIR)/native/$m/*/static)), \
57
  )) \
58
  $(eval TARGETS += $$(COPY_STATIC_LIBS_$m)) \
59
  $(eval STATIC_LIBS_TARGETS += $$(COPY_STATIC_LIBS_$m)) \
60
)
61

62
ifneq ($(filter static-libs-image, $(MAKECMDGOALS)), )
63
  # Copy libjvm static library to the image.
64
  $(foreach v, $(JVM_VARIANTS), \
65
    $(eval $(call SetupCopyFiles, COPY_STATIC_LIBS_$v, \
66
        SRC := $(HOTSPOT_OUTPUTDIR)/variant-$v/libjvm/objs/static, \
67
        DEST := $(IMAGE_DEST_DIR)/$v, \
68
        FILES := $(wildcard $(HOTSPOT_OUTPUTDIR)/variant-$v/libjvm/objs/static/*$(STATIC_LIBRARY_SUFFIX)), \
69
    )) \
70
    $(eval TARGETS += $$(COPY_STATIC_LIBS_$v)) \
71
    $(eval HOTSPOT_VARIANT_STATIC_LIBS_TARGETS += $$(COPY_STATIC_LIBS_$v)) \
72
  )
73
endif
74

75
################################################################################
76

77
static-libs-image: $(HOTSPOT_VARIANT_STATIC_LIBS_TARGETS) $(STATIC_LIBS_TARGETS)
78
static-libs-graal-image: $(STATIC_LIBS_TARGETS)
79

80
all: $(TARGETS)
81

82
.PHONY: all
83

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

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

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

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