1 | # $Id: Makefile.kmk 98767 2023-02-28 09:06:44Z vboxsync $
|
---|
2 | ## @file
|
---|
3 | # Sub-Makefile for xz/liblzma.
|
---|
4 | #
|
---|
5 |
|
---|
6 | #
|
---|
7 | # Copyright (C) 2023 Oracle and/or its affiliates.
|
---|
8 | #
|
---|
9 | # This file is part of VirtualBox base platform packages, as
|
---|
10 | # available from https://www.virtualbox.org.
|
---|
11 | #
|
---|
12 | # This program is free software; you can redistribute it and/or
|
---|
13 | # modify it under the terms of the GNU General Public License
|
---|
14 | # as published by the Free Software Foundation, in version 3 of the
|
---|
15 | # License.
|
---|
16 | #
|
---|
17 | # This program is distributed in the hope that it will be useful, but
|
---|
18 | # WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
---|
20 | # General Public License for more details.
|
---|
21 | #
|
---|
22 | # You should have received a copy of the GNU General Public License
|
---|
23 | # along with this program; if not, see <https://www.gnu.org/licenses>.
|
---|
24 | #
|
---|
25 | # SPDX-License-Identifier: GPL-3.0-only
|
---|
26 | #
|
---|
27 |
|
---|
28 |
|
---|
29 | SUB_DEPTH = ../../../../..
|
---|
30 | include $(KBUILD_PATH)/subheader.kmk
|
---|
31 |
|
---|
32 | LIBRARIES += VBox-liblzma VBox-liblzma-static
|
---|
33 | VBox-liblzma_TEMPLATE = VBoxR3RuntimeDllNonPedantic
|
---|
34 | VBox-liblzma_CFLAGS.linux = -std=gnu99
|
---|
35 | VBox-liblzma_CFLAGS.solaris = -std=gnu99
|
---|
36 | VBox-liblzma_CFLAGS.darwin = -std=gnu99
|
---|
37 | VBox-liblzma_CFLAGS.os2 = -std=gnu99
|
---|
38 | VBox-liblzma_INCS += \
|
---|
39 | api \
|
---|
40 | common \
|
---|
41 | check \
|
---|
42 | lz \
|
---|
43 | rangecoder \
|
---|
44 | lzma \
|
---|
45 | delta \
|
---|
46 | simple \
|
---|
47 | vbox
|
---|
48 | VBox-liblzma_DEFS = \
|
---|
49 | TUKLIB_SYMBOL_PREFIX=lzma_ \
|
---|
50 | ASSUME_RAM=128 \
|
---|
51 | HAVE_CHECK_CRC32=1 \
|
---|
52 | HAVE_CHECK_CRC64=1 \
|
---|
53 | HAVE_CHECK_SHA256=1 \
|
---|
54 | HAVE_DECODERS=1 \
|
---|
55 | HAVE_DECODER_ARM=1 \
|
---|
56 | HAVE_DECODER_ARMTHUMB=1 \
|
---|
57 | HAVE_DECODER_DELTA=1 \
|
---|
58 | HAVE_DECODER_IA64=1 \
|
---|
59 | HAVE_DECODER_LZMA1=1 \
|
---|
60 | HAVE_DECODER_LZMA2=1 \
|
---|
61 | HAVE_DECODER_POWERPC=1 \
|
---|
62 | HAVE_DECODER_SPARC=1 \
|
---|
63 | HAVE_DECODER_X86=1 \
|
---|
64 | HAVE_ENCODERS=1 \
|
---|
65 | HAVE_ENCODER_ARM=1 \
|
---|
66 | HAVE_ENCODER_ARMTHUMB=1 \
|
---|
67 | HAVE_ENCODER_DELTA=1 \
|
---|
68 | HAVE_ENCODER_IA64=1 \
|
---|
69 | HAVE_ENCODER_LZMA1=1 \
|
---|
70 | HAVE_ENCODER_LZMA2=1 \
|
---|
71 | HAVE_ENCODER_POWERPC=1 \
|
---|
72 | HAVE_ENCODER_SPARC=1 \
|
---|
73 | HAVE_ENCODER_X86=1 \
|
---|
74 | HAVE_LZIP_DECODER=1 \
|
---|
75 | HAVE_MBRTOWC=1 \
|
---|
76 | HAVE_MF_BT2=1 \
|
---|
77 | HAVE_MF_BT3=1 \
|
---|
78 | HAVE_MF_BT4=1 \
|
---|
79 | HAVE_MF_HC3=1 \
|
---|
80 | HAVE_MF_HC4=1 \
|
---|
81 | HAVE_STDBOOL_H=1 \
|
---|
82 | NDEBUG=1
|
---|
83 | VBox-liblzma_DEFS.amd64 += \
|
---|
84 | SIZEOF_SIZE_T=8
|
---|
85 | VBox-liblzma_DEFS.arm64 += \
|
---|
86 | SIZEOF_SIZE_T=8
|
---|
87 | VBox-liblzma_DEFS.x86 += \
|
---|
88 | SIZEOF_SIZE_T=4
|
---|
89 | VBox-liblzma_SOURCES = \
|
---|
90 | common/common.c \
|
---|
91 | common/block_util.c \
|
---|
92 | common/easy_preset.c \
|
---|
93 | common/filter_common.c \
|
---|
94 | common/hardware_physmem.c \
|
---|
95 | common/index.c \
|
---|
96 | common/stream_flags_common.c \
|
---|
97 | common/string_conversion.c \
|
---|
98 | common/vli_size.c \
|
---|
99 | common/hardware_cputhreads.c \
|
---|
100 | common/outqueue.c \
|
---|
101 | common/alone_encoder.c \
|
---|
102 | common/block_buffer_encoder.c \
|
---|
103 | common/block_encoder.c \
|
---|
104 | common/block_header_encoder.c \
|
---|
105 | common/easy_buffer_encoder.c \
|
---|
106 | common/easy_encoder.c \
|
---|
107 | common/easy_encoder_memusage.c \
|
---|
108 | common/filter_buffer_encoder.c \
|
---|
109 | common/filter_encoder.c \
|
---|
110 | common/filter_flags_encoder.c \
|
---|
111 | common/index_encoder.c \
|
---|
112 | common/stream_buffer_encoder.c \
|
---|
113 | common/stream_encoder.c \
|
---|
114 | common/stream_flags_encoder.c \
|
---|
115 | common/vli_encoder.c \
|
---|
116 | common/stream_encoder_mt.c \
|
---|
117 | common/microlzma_encoder.c \
|
---|
118 | common/alone_decoder.c \
|
---|
119 | common/auto_decoder.c \
|
---|
120 | common/block_buffer_decoder.c \
|
---|
121 | common/block_decoder.c \
|
---|
122 | common/block_header_decoder.c \
|
---|
123 | common/easy_decoder_memusage.c \
|
---|
124 | common/file_info.c \
|
---|
125 | common/filter_buffer_decoder.c \
|
---|
126 | common/filter_decoder.c \
|
---|
127 | common/filter_flags_decoder.c \
|
---|
128 | common/index_decoder.c \
|
---|
129 | common/index_hash.c \
|
---|
130 | common/stream_buffer_decoder.c \
|
---|
131 | common/stream_decoder.c \
|
---|
132 | common/stream_flags_decoder.c \
|
---|
133 | common/vli_decoder.c \
|
---|
134 | common/stream_decoder_mt.c \
|
---|
135 | common/microlzma_decoder.c \
|
---|
136 | common/lzip_decoder.c \
|
---|
137 | check/check.c \
|
---|
138 | check/crc32_table.c \
|
---|
139 | check/crc32_fast.c \
|
---|
140 | check/crc64_table.c \
|
---|
141 | check/crc64_fast.c \
|
---|
142 | check/sha256.c \
|
---|
143 | lz/lz_encoder.c \
|
---|
144 | lz/lz_encoder_mf.c \
|
---|
145 | lz/lz_decoder.c \
|
---|
146 | lzma/lzma_encoder_presets.c \
|
---|
147 | lzma/lzma_encoder.c \
|
---|
148 | lzma/lzma_encoder_optimum_fast.c \
|
---|
149 | lzma/lzma_encoder_optimum_normal.c \
|
---|
150 | lzma/fastpos_table.c \
|
---|
151 | lzma/lzma_decoder.c \
|
---|
152 | lzma/lzma2_encoder.c \
|
---|
153 | lzma/lzma2_decoder.c \
|
---|
154 | rangecoder/price_table.c \
|
---|
155 | delta/delta_common.c \
|
---|
156 | delta/delta_encoder.c \
|
---|
157 | delta/delta_decoder.c \
|
---|
158 | simple/simple_coder.c \
|
---|
159 | simple/simple_encoder.c \
|
---|
160 | simple/simple_decoder.c \
|
---|
161 | simple/x86.c \
|
---|
162 | simple/powerpc.c \
|
---|
163 | simple/ia64.c \
|
---|
164 | simple/arm.c \
|
---|
165 | simple/armthumb.c \
|
---|
166 | simple/arm64.c \
|
---|
167 | simple/sparc.c
|
---|
168 |
|
---|
169 | VBox-liblzma-static_TEMPLATE = VBoxR3StaticNonPedantic
|
---|
170 | VBox-liblzma-static_DEFS = $(VBox-liblzma_DEFS)
|
---|
171 | VBox-liblzma-static_INCS = $(VBox-liblzma_INCS)
|
---|
172 | VBox-liblzma-static_CFLAGS.linux = $(VBox-liblzma_CFLAGS.linux)
|
---|
173 | VBox-liblzma-static_CFLAGS.solaris = $(VBox-liblzma_CFLAGS.solaris)
|
---|
174 | VBox-liblzma-static_CFLAGS.darwin = $(VBox-liblzma_CFLAGS.darwin)
|
---|
175 | VBox-liblzma-static_CFLAGS.os2 = $(VBox-liblzma_CFLAGS.os2)
|
---|
176 | ifdef VBOX_WITH_NOCRT_STATIC
|
---|
177 | VBox-liblzma-static_DEFS += IPRT_NO_CRT_FOR_3RD_PARTY
|
---|
178 | endif
|
---|
179 | VBox-liblzma-static_SOURCES = $(VBox-liblzma_SOURCES)
|
---|
180 |
|
---|
181 | ifdef VBOX_WITH_32_ON_64_MAIN_API # 32-bit edition.
|
---|
182 | LIBRARIES += VBox-liblzma-x86
|
---|
183 | VBox-liblzma-x86_TEMPLATE = VBoxR3DllNonPedantic-x86
|
---|
184 | VBox-liblzma-x86_EXTENDS = VBox-liblzma
|
---|
185 | endif
|
---|
186 |
|
---|
187 |
|
---|
188 | include $(FILE_KBUILD_SUB_FOOTER)
|
---|
189 |
|
---|