# $Id: Makefile.kmk 96407 2022-08-22 17:43:14Z vboxsync $ ## @file # Sub-Makefile for the libogg. # # # Copyright (C) 2022 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_VBOXLIBOGG = Template for adjusting assembler and C compiler flags. TEMPLATE_VBOXLIBOGG_EXTENDS = VBoxR3DllNonPedanticFast ifeq ($(KBUILD_TARGET),win) TEMPLATE_VBOXLIBOGG_ASFLAGS.amd64 = $(filter-out -Worphan-labels -f win64, $(TEMPLATE_VBoxR3DllNonPedanticFast_ASFLAGS.amd64)) \ -f x64 else TEMPLATE_VBOXLIBOGG_CFLAGS = $(filter-out $(VBOX_GCC_fvisibility-hidden), $(TEMPLATE_VBoxR3DllNonPedanticFast_CFLAGS)) TEMPLATE_VBOXLIBOGG_CFLAGS.amd64 = $(TEMPLATE_VBoxR3DllNonPedanticFast_CFLAGS.amd64) -msse # Needed? TEMPLATE_VBOXLIBOGG_CFLAGS.x86 = $(TEMPLATE_VBoxR3DllNonPedanticFast_CFLAGS.x86) -msse TEMPLATE_VBOXLIBOGG_ASFLAGS.amd64 = $(filter-out -Worphan-labels, $(TEMPLATE_VBoxR3DllNonPedanticFast_ASFLAGS.amd64)) TEMPLATE_VBOXLIBOGG_ASFLAGS.x86 = $(filter-out -Worphan-labels, $(TEMPLATE_VBoxR3DllNonPedanticFast_ASFLAGS.x86)) endif # # The VBox Ogg shared library. # LIBRARIES += VBox-libogg VBox-libogg_TEMPLATE := VBOXLIBOGG VBox-libogg_INCS := \ . \ include/ \ include/ogg \ src VBox-libogg_SOURCES := \ src/bitwise.c \ src/framing.c include $(FILE_KBUILD_SUB_FOOTER)