1# libFLAC - Free Lossless Audio Codec library 2# Copyright (C) 2001-2009 Josh Coalson 3# Copyright (C) 2011-2023 Xiph.Org Foundation 4# 5# Redistribution and use in source and binary forms, with or without 6# modification, are permitted provided that the following conditions 7# are met: 8# 9# - Redistributions of source code must retain the above copyright 10# notice, this list of conditions and the following disclaimer. 11# 12# - Redistributions in binary form must reproduce the above copyright 13# notice, this list of conditions and the following disclaimer in the 14# documentation and/or other materials provided with the distribution. 15# 16# - Neither the name of the Xiph.org Foundation nor the names of its 17# contributors may be used to endorse or promote products derived from 18# this software without specific prior written permission. 19# 20# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 23# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR 24# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 25# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 26# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 27# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 28# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 29# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 30# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 32AM_CPPFLAGS = -I$(top_builddir) -I$(srcdir)/include -I$(top_srcdir)/include 33lib_LTLIBRARIES = libFLAC.la 34noinst_LTLIBRARIES = libFLAC-static.la 35if DEBUG 36DEBUGCFLAGS = -DFLAC__OVERFLOW_DETECT 37else 38if ASSOC_MATH_AVAILABLE 39ASSOCMATHCFLAGS = -fassociative-math -fno-signed-zeros -fno-trapping-math -freciprocal-math 40endif 41endif 42 43AM_CFLAGS = $(DEBUGCFLAGS) ${ASSOCMATHCFLAGS} @OGG_CFLAGS@ 44 45libFLAC_la_LIBADD = @OGG_LIBS@ -lm 46 47SUBDIRS = include . 48 49m4datadir = $(datadir)/aclocal 50m4data_DATA = libFLAC.m4 51 52pkgconfigdir = $(libdir)/pkgconfig 53pkgconfig_DATA = flac.pc 54 55EXTRA_DIST = \ 56 CMakeLists.txt \ 57 flac.pc.in \ 58 libFLAC.m4 \ 59 version.rc \ 60 deduplication/bitreader_read_rice_signed_block.c \ 61 deduplication/lpc_compute_autocorrelation_intrin.c \ 62 deduplication/lpc_compute_autocorrelation_intrin_sse2.c \ 63 deduplication/lpc_compute_autocorrelation_intrin_neon.c 64 65if OS_IS_WINDOWS 66windows_unicode_compat = ../share/win_utf8_io/win_utf8_io.c 67if HAVE_WINDRES 68libFLAC_la_DEPENDENCIES = version.o 69windows_resource_link = -Wl,version.o 70endif 71endif 72 73if FLaC__HAS_OGG 74extra_ogg_sources = \ 75 ogg_decoder_aspect.c \ 76 ogg_encoder_aspect.c \ 77 ogg_helper.c \ 78 ogg_mapping.c 79endif 80 81# see 'http://www.gnu.org/software/libtool/manual/libtool.html#Libtool-versioning' for numbering convention 82libFLAC_la_LDFLAGS = $(AM_LDFLAGS) -no-undefined -version-info 13:0:1 $(windows_resource_link) 83 84libFLAC_sources = \ 85 bitmath.c \ 86 bitreader.c \ 87 bitwriter.c \ 88 cpu.c \ 89 crc.c \ 90 fixed.c \ 91 fixed_intrin_sse2.c \ 92 fixed_intrin_ssse3.c \ 93 fixed_intrin_sse42.c \ 94 fixed_intrin_avx2.c \ 95 float.c \ 96 format.c \ 97 lpc.c \ 98 lpc_intrin_sse2.c \ 99 lpc_intrin_sse41.c \ 100 lpc_intrin_avx2.c \ 101 lpc_intrin_fma.c \ 102 lpc_intrin_neon.c \ 103 md5.c \ 104 memory.c \ 105 metadata_iterators.c \ 106 metadata_object.c \ 107 stream_decoder.c \ 108 stream_encoder.c \ 109 stream_encoder_intrin_sse2.c \ 110 stream_encoder_intrin_ssse3.c \ 111 stream_encoder_intrin_avx2.c \ 112 stream_encoder_framing.c \ 113 window.c \ 114 $(windows_unicode_compat) \ 115 $(extra_ogg_sources) 116 117libFLAC_la_SOURCES = $(libFLAC_sources) 118 119# needed for test_libFLAC 120libFLAC_static_la_SOURCES = $(libFLAC_sources) 121 122.rc.o: 123 $(RC) $(AM_CPPFLAGS) $< $@ 124