# $Id: Makefile.kmk 98103 2023-01-17 14:15:46Z vboxsync $ ## @file # Sub-Makefile for libvorbis. # # # Copyright (C) 2022-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 # # Need to drop some assembly flags and add some C flags (gcc) present in # VBoxR3DllNonPedantic. So, create or own template deriving from it. # # Note! We ASSUME that see is available here (doesn't build cleanly on 32-bit # linux without this assumption). Too bad for anyone with ancient CPUs. # TEMPLATE_VBOXLIBVORBIS = Template for adjusting assembler and C compiler flags. TEMPLATE_VBOXLIBVORBIS_EXTENDS = VBoxR3DllNonPedanticFast ifeq ($(KBUILD_TARGET),win) TEMPLATE_VBOXLIBVORBIS_ASFLAGS.amd64 = $(filter-out -Worphan-labels -f win64, $(TEMPLATE_VBoxR3DllNonPedanticFast_ASFLAGS.amd64)) \ -f x64 else TEMPLATE_VBOXLIBVORBIS_CFLAGS = $(filter-out $(VBOX_GCC_fvisibility-hidden), $(TEMPLATE_VBoxR3DllNonPedanticFast_CFLAGS)) TEMPLATE_VBOXLIBVORBIS_CFLAGS.amd64 = $(TEMPLATE_VBoxR3DllNonPedanticFast_CFLAGS.amd64) -msse # Needed? TEMPLATE_VBOXLIBVORBIS_CFLAGS.x86 = $(TEMPLATE_VBoxR3DllNonPedanticFast_CFLAGS.x86) -msse TEMPLATE_VBOXLIBVORBIS_ASFLAGS.amd64 = $(filter-out -Worphan-labels, $(TEMPLATE_VBoxR3DllNonPedanticFast_ASFLAGS.amd64)) TEMPLATE_VBOXLIBVORBIS_ASFLAGS.x86 = $(filter-out -Worphan-labels, $(TEMPLATE_VBoxR3DllNonPedanticFast_ASFLAGS.x86)) endif # # The VBox libvorbis shared library. # LIBRARIES += VBox-libvorbis VBox-libvorbis_TEMPLATE := VBOXLIBVORBIS VBox-libvorbis_INCS := \ . \ include \ lib \ ../libogg-1.3.5/include # Include our own config.h. Not required on Windows. ifn1of ($(KBUILD_TARGET), win) VBox-libvorbis_DEFS += HAVE_CONFIG_H endif VBox-libvorbis_SOURCES := \ lib/mdct.c \ lib/smallft.c \ lib/block.c \ lib/envelope.c \ lib/window.c \ lib/lsp.c \ lib/lpc.c \ lib/analysis.c \ lib/synthesis.c \ lib/psy.c \ lib/info.c \ lib/floor1.c \ lib/floor0.c \ lib/res0.c \ lib/mapping0.c \ lib/registry.c \ lib/codebook.c \ lib/sharedbook.c \ lib/lookup.c \ lib/bitrate.c \ lib/vorbisenc.c \ lib/vorbisfile.c include $(FILE_KBUILD_SUB_FOOTER)