# $Id$ ## @file # Sub-Makefile for xz/liblzma. # # # Copyright (C) 2023 Oracle and/or its affiliates. # # This file is part of VirtualBox base platform packages, as # available from https://www.virtualbox.org. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation, in version 3 of the # License. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, see . # # SPDX-License-Identifier: GPL-3.0-only # SUB_DEPTH = ../../.. include $(KBUILD_PATH)/subheader.kmk LIBRARIES += VBox-liblzma VBox-liblzma-static VBox-liblzma_TEMPLATE = VBoxR3RuntimeDllNonPedantic VBox-liblzma_CFLAGS.linux = -std=gnu99 VBox-liblzma_CFLAGS.solaris = -std=gnu99 VBox-liblzma_CFLAGS.darwin = -std=gnu99 VBox-liblzma_CFLAGS.os2 = -std=gnu99 VBox-liblzma_INCS += \ api \ common \ check \ lz \ rangecoder \ lzma \ delta \ simple \ vbox VBox-liblzma_DEFS = \ IN_RT \ TUKLIB_SYMBOL_PREFIX=lzma_ \ ASSUME_RAM=128 \ HAVE_CHECK_CRC32=1 \ HAVE_CHECK_CRC64=1 \ HAVE_CHECK_SHA256=1 \ HAVE_DECODERS=1 \ HAVE_DECODER_ARM=1 \ HAVE_DECODER_ARMTHUMB=1 \ HAVE_DECODER_DELTA=1 \ HAVE_DECODER_IA64=1 \ HAVE_DECODER_LZMA1=1 \ HAVE_DECODER_LZMA2=1 \ HAVE_DECODER_POWERPC=1 \ HAVE_DECODER_SPARC=1 \ HAVE_DECODER_X86=1 \ HAVE_ENCODERS=1 \ HAVE_ENCODER_ARM=1 \ HAVE_ENCODER_ARMTHUMB=1 \ HAVE_ENCODER_DELTA=1 \ HAVE_ENCODER_IA64=1 \ HAVE_ENCODER_LZMA1=1 \ HAVE_ENCODER_LZMA2=1 \ HAVE_ENCODER_POWERPC=1 \ HAVE_ENCODER_SPARC=1 \ HAVE_ENCODER_X86=1 \ HAVE_LZIP_DECODER=1 \ HAVE_MBRTOWC=1 \ HAVE_MF_BT2=1 \ HAVE_MF_BT3=1 \ HAVE_MF_BT4=1 \ HAVE_MF_HC3=1 \ HAVE_MF_HC4=1 \ HAVE_STDBOOL_H=1 \ NDEBUG=1 VBox-liblzma_DEFS.amd64 += \ SIZEOF_SIZE_T=8 VBox-liblzma_DEFS.arm64 += \ SIZEOF_SIZE_T=8 VBox-liblzma_DEFS.x86 += \ SIZEOF_SIZE_T=4 VBox-liblzma_SOURCES = \ common/common.c \ common/block_util.c \ common/easy_preset.c \ common/filter_common.c \ common/hardware_physmem.c \ common/index.c \ common/stream_flags_common.c \ common/string_conversion.c \ common/vli_size.c \ common/hardware_cputhreads.c \ common/outqueue.c \ common/alone_encoder.c \ common/block_buffer_encoder.c \ common/block_encoder.c \ common/block_header_encoder.c \ common/easy_buffer_encoder.c \ common/easy_encoder.c \ common/easy_encoder_memusage.c \ common/filter_buffer_encoder.c \ common/filter_encoder.c \ common/filter_flags_encoder.c \ common/index_encoder.c \ common/stream_buffer_encoder.c \ common/stream_encoder.c \ common/stream_flags_encoder.c \ common/vli_encoder.c \ common/stream_encoder_mt.c \ common/microlzma_encoder.c \ common/alone_decoder.c \ common/auto_decoder.c \ common/block_buffer_decoder.c \ common/block_decoder.c \ common/block_header_decoder.c \ common/easy_decoder_memusage.c \ common/file_info.c \ common/filter_buffer_decoder.c \ common/filter_decoder.c \ common/filter_flags_decoder.c \ common/index_decoder.c \ common/index_hash.c \ common/stream_buffer_decoder.c \ common/stream_decoder.c \ common/stream_flags_decoder.c \ common/vli_decoder.c \ common/stream_decoder_mt.c \ common/microlzma_decoder.c \ common/lzip_decoder.c \ check/check.c \ check/crc32_table.c \ check/crc32_fast.c \ check/crc64_table.c \ check/crc64_fast.c \ check/sha256.c \ lz/lz_encoder.c \ lz/lz_encoder_mf.c \ lz/lz_decoder.c \ lzma/lzma_encoder_presets.c \ lzma/lzma_encoder.c \ lzma/lzma_encoder_optimum_fast.c \ lzma/lzma_encoder_optimum_normal.c \ lzma/fastpos_table.c \ lzma/lzma_decoder.c \ lzma/lzma2_encoder.c \ lzma/lzma2_decoder.c \ rangecoder/price_table.c \ delta/delta_common.c \ delta/delta_encoder.c \ delta/delta_decoder.c \ simple/simple_coder.c \ simple/simple_encoder.c \ simple/simple_decoder.c \ simple/x86.c \ simple/powerpc.c \ simple/ia64.c \ simple/arm.c \ simple/armthumb.c \ simple/arm64.c \ simple/sparc.c VBox-liblzma-static_TEMPLATE = VBoxR3StaticNonPedantic VBox-liblzma-static_DEFS = $(VBox-liblzma_DEFS) VBox-liblzma-static_INCS = $(VBox-liblzma_INCS) VBox-liblzma-static_CFLAGS.linux = $(VBox-liblzma_CFLAGS.linux) VBox-liblzma-static_CFLAGS.solaris = $(VBox-liblzma_CFLAGS.solaris) VBox-liblzma-static_CFLAGS.darwin = $(VBox-liblzma_CFLAGS.darwin) VBox-liblzma-static_CFLAGS.os2 = $(VBox-liblzma_CFLAGS.os2) ifdef VBOX_WITH_NOCRT_STATIC VBox-liblzma-static_DEFS += IPRT_NO_CRT_FOR_3RD_PARTY endif VBox-liblzma-static_SOURCES = $(VBox-liblzma_SOURCES) ifdef VBOX_WITH_32_ON_64_MAIN_API # 32-bit edition. LIBRARIES += VBox-liblzma-x86 VBox-liblzma-x86_TEMPLATE = VBoxR3DllNonPedantic-x86 VBox-liblzma-x86_EXTENDS = VBox-liblzma endif include $(FILE_KBUILD_SUB_FOOTER)