diff --git a/bootstrap b/bootstrap index 8a81def4..ac09a56a 100755 --- a/bootstrap +++ b/bootstrap @@ -1,6 +1,37 @@ #!/bin/sh # audacious-vgmstream script - automake/autoconf init + +# gets all files and updates .am scripts to avoid having to do manually (frowned upon by automake, whatevs) +# maybe there is a better way or place for this +VGMSTREAM_SRCS=`(cd ./src/ && ls *.c) | tr '\n' ' '` +VGMSTREAM_HDRS=`(cd ./src/ && ls *.h) | tr '\n' ' '` +CODING_SRCS=`(cd ./src/coding/ && ls *.c) | tr '\n' ' '` +CODING_HDRS=`(cd ./src/coding/ && ls *.h) | tr '\n' ' '` +LAYOUT_SRCS=`(cd ./src/layout/ && ls *.c) | tr '\n' ' '` +LAYOUT_HDRS=`(cd ./src/layout/ && ls *.h) | tr '\n' ' '` +META_SRCS=`(cd ./src/meta/ && ls *.c) | tr '\n' ' '` +META_HDRS=`(cd ./src/meta/ && ls *.h) | tr '\n' ' '` +AUDACIOUS_SRCS=`(cd ./unix/ && ls *.cc) | tr '\n' ' '` +AUDACIOUS_HDRS=`(cd ./unix/ && ls *.h) | tr '\n' ' '` +sed -i -e "s/libvgmstream_la_SOURCES =.*/libvgmstream_la_SOURCES = $VGMSTREAM_SRCS/g" ./src/Makefile.unix.am +sed -i -e "s/EXTRA_DIST =.*/EXTRA_DIST = $VGMSTREAM_HDRS/g" ./src/Makefile.unix.am +sed -i -e "s/libcoding_la_SOURCES =.*/libcoding_la_SOURCES = $CODING_SRCS/g" ./src/coding/Makefile.unix.am +sed -i -e "s/EXTRA_DIST =.*/EXTRA_DIST = $CODING_HDRS/g" ./src/coding/Makefile.unix.am +sed -i -e "s/liblayout_la_SOURCES =.*/liblayout_la_SOURCES = $LAYOUT_SRCS/g" ./src/layout/Makefile.unix.am +sed -i -e "s/EXTRA_DIST =.*/EXTRA_DIST = $LAYOUT_HDRS/g" ./src/layout/Makefile.unix.am +sed -i -e "s/libmeta_la_SOURCES =.*/libmeta_la_SOURCES = $META_SRCS/g" ./src/meta/Makefile.unix.am +sed -i -e "s/EXTRA_DIST =.*/EXTRA_DIST = $META_HDRS/g" ./src/meta/Makefile.unix.am +sed -i -e "s/libvgmstream_la_SOURCES =.*/libvgmstream_la_SOURCES = $AUDACIOUS_SRCS/g" ./unix/Makefile.unix.am +sed -i -e "s/EXTRA_DIST =.*/EXTRA_DIST = $AUDACIOUS_HDRS/g" ./unix/Makefile.unix.am + +# get version to show in about dialogs +# again, not very pretty +VGMSTREAM_VERSION=`./version.sh` +sed -i -e "s/VGMSTREAM_VERSION/$VGMSTREAM_VERSION/g" ./unix/Makefile.unix.am + + +# create fake files expected by automake and process touch README AUTHORS NEWS ChangeLog aclocal autoheader diff --git a/src/Makefile.unix.am b/src/Makefile.unix.am index 1bf90572..2e31dddd 100644 --- a/src/Makefile.unix.am +++ b/src/Makefile.unix.am @@ -5,9 +5,11 @@ noinst_LTLIBRARIES = libvgmstream.la AM_CFLAGS = -Wall @CFLAGS@ -I$(top_builddir) -I$(top_srcdir) -I$(top_srcdir)/ext_includes/ AM_MAKEFLAGS=-f Makefile.unix -libvgmstream_la_LDFLAGS = coding/libcoding.la layout/liblayout.la meta/libmeta.la -libvgmstream_la_SOURCES = formats.c streamfile.c util.c vgmstream.c ../ext_libs/clHCA.c - SUBDIRS = coding layout meta -##EXTRA_DIST = formats.h stack_alloc.h streamfile.h streamtypes.h util.h vgmstream.h ../ext_includes/clHCA.h +# sources/headers are updated automatically by ./bootstrap script (not all headers are needed though) +libvgmstream_la_LDFLAGS = coding/libcoding.la layout/liblayout.la meta/libmeta.la +libvgmstream_la_SOURCES = (auto-updated) +libvgmstream_la_SOURCES += ../ext_libs/clHCA.c +EXTRA_DIST = (auto-updated) +EXTRA_DIST += ../ext_includes/clHCA.h diff --git a/src/coding/Makefile.unix.am b/src/coding/Makefile.unix.am index e563885f..7a6b9697 100644 --- a/src/coding/Makefile.unix.am +++ b/src/coding/Makefile.unix.am @@ -5,39 +5,7 @@ noinst_LTLIBRARIES = libcoding.la AM_CFLAGS = -Wall @CFLAGS@ -I$(top_builddir) -I$(top_srcdir) -I$(top_srcdir)/ext_includes/ AM_MAKEFLAGS=-f Makefile.unix -libcoding_la_LDFLAGS = -libcoding_la_SOURCES = -libcoding_la_SOURCES += adx_decoder.c -libcoding_la_SOURCES += eaxa_decoder.c -libcoding_la_SOURCES += g721_decoder.c -libcoding_la_SOURCES += ima_decoder.c -libcoding_la_SOURCES += ngc_afc_decoder.c -libcoding_la_SOURCES += ngc_dsp_decoder.c -libcoding_la_SOURCES += ngc_dtk_decoder.c -libcoding_la_SOURCES += pcm_decoder.c -libcoding_la_SOURCES += psx_decoder.c -libcoding_la_SOURCES += xa_decoder.c -libcoding_la_SOURCES += ogg_vorbis_decoder.c -libcoding_la_SOURCES += sdx2_decoder.c -libcoding_la_SOURCES += ws_decoder.c -libcoding_la_SOURCES += mpeg_decoder.c -libcoding_la_SOURCES += acm_decoder.c -libcoding_la_SOURCES += nwa_decoder.c -libcoding_la_SOURCES += aica_decoder.c -libcoding_la_SOURCES += msadpcm_decoder.c -libcoding_la_SOURCES += nds_procyon_decoder.c -libcoding_la_SOURCES += l5_555_decoder.c -libcoding_la_SOURCES += SASSC_decoder.c -libcoding_la_SOURCES += g7221_decoder.c -libcoding_la_SOURCES += lsf_decoder.c -libcoding_la_SOURCES += mtaf_decoder.c -libcoding_la_SOURCES += g719_decoder.c -libcoding_la_SOURCES += hca_decoder.c -libcoding_la_SOURCES += fsb_vorbis_decoder.c -libcoding_la_SOURCES += wwise_vorbis_decoder.c -libcoding_la_SOURCES += wwise_vorbis_utils.c -libcoding_la_SOURCES += ogl_vorbis_decoder.c -libcoding_la_SOURCES += mc3_decoder.c -libcoding_la_SOURCES += coding_utils.c - -##EXTRA_DIST = acm_decoder.h coding.h fsb_vorbis_data.h g72x_state.h nwa_decoder.h wwise_vorbis_data.h wwise_vorbis_utils.h +# sources/headers are updated automatically by ./bootstrap script (not all headers are needed though) +libcoding_la_LDFLAGS = +libcoding_la_SOURCES = (auto-updated) +EXTRA_DIST = (auto-updated) diff --git a/src/layout/Makefile.unix.am b/src/layout/Makefile.unix.am index 4eb3c28f..aba5a514 100644 --- a/src/layout/Makefile.unix.am +++ b/src/layout/Makefile.unix.am @@ -5,39 +5,7 @@ noinst_LTLIBRARIES = liblayout.la AM_CFLAGS = -Wall @CFLAGS@ -I$(top_builddir) -I$(top_srcdir) -I$(top_srcdir)/ext_includes/ AM_MAKEFLAGS=-f Makefile.unix -liblayout_la_LDFLAGS = -liblayout_la_SOURCES = -liblayout_la_SOURCES += ast_blocked.c -liblayout_la_SOURCES += blocked.c -liblayout_la_SOURCES += caf_blocked.c -liblayout_la_SOURCES += ea_block.c -liblayout_la_SOURCES += halpst_blocked.c -liblayout_la_SOURCES += interleave.c -liblayout_la_SOURCES += nolayout.c -liblayout_la_SOURCES += xa_blocked.c -liblayout_la_SOURCES += wsi_blocked.c -liblayout_la_SOURCES += str_snds_blocked.c -liblayout_la_SOURCES += ws_aud_blocked.c -liblayout_la_SOURCES += interleave_byte.c -liblayout_la_SOURCES += mus_acm_layout.c -liblayout_la_SOURCES += aix_layout.c -liblayout_la_SOURCES += ims_block.c -liblayout_la_SOURCES += de2_blocked.c -liblayout_la_SOURCES += xvas_block.c -liblayout_la_SOURCES += vs_blocked.c -liblayout_la_SOURCES += emff_blocked.c -liblayout_la_SOURCES += thp_blocked.c -liblayout_la_SOURCES += gsb_blocked.c -liblayout_la_SOURCES += filp_blocked.c -liblayout_la_SOURCES += aax_layout.c -liblayout_la_SOURCES += ivaud_layout.c -liblayout_la_SOURCES += mxch_blocked.c -liblayout_la_SOURCES += psx_mgav_blocked.c -liblayout_la_SOURCES += ps2_adm_blocked.c -liblayout_la_SOURCES += bdsp_blocked.c -liblayout_la_SOURCES += tra_blocked.c -liblayout_la_SOURCES += ps2_iab_blocked.c -liblayout_la_SOURCES += ps2_strlr_blocked.c -liblayout_la_SOURCES += scd_int_layout.c - -##EXTRA_DIST = layout.h +# sources/headers are updated automatically by ./bootstrap script (not all headers are needed though) +liblayout_la_LDFLAGS = +liblayout_la_SOURCES = (auto-updated) +EXTRA_DIST = (auto-updated) diff --git a/src/meta/Makefile.unix.am b/src/meta/Makefile.unix.am index 1298ff40..02a5b112 100644 --- a/src/meta/Makefile.unix.am +++ b/src/meta/Makefile.unix.am @@ -5,263 +5,7 @@ noinst_LTLIBRARIES = libmeta.la AM_CFLAGS = -Wall @CFLAGS@ -DVAR_ARRAYS -I$(top_builddir) -I$(top_srcdir) -I$(top_srcdir)/ext_includes/ AM_MAKEFLAGS=-f Makefile.unix +# sources/headers are updated automatically by ./bootstrap script (not all headers are needed though) libmeta_la_LDFLAGS = -libmeta_la_SOURCES = -libmeta_la_SOURCES += Cstr.c -libmeta_la_SOURCES += adx.c -libmeta_la_SOURCES += afc_header.c -libmeta_la_SOURCES += agsc.c -libmeta_la_SOURCES += ast.c -libmeta_la_SOURCES += brstm.c -libmeta_la_SOURCES += ea_header.c -libmeta_la_SOURCES += gcsw.c halpst.c -libmeta_la_SOURCES += nds_strm.c -libmeta_la_SOURCES += ngc_adpdtk.c -libmeta_la_SOURCES += ngc_caf.c -libmeta_la_SOURCES += ngc_dsp_std.c -libmeta_la_SOURCES += ps2_ads.c -libmeta_la_SOURCES += ps2_exst.c -libmeta_la_SOURCES += ps2_ild.c -libmeta_la_SOURCES += ps2_int.c -libmeta_la_SOURCES += ps2_mib.c -libmeta_la_SOURCES += ps2_mic.c -libmeta_la_SOURCES += ps2_npsf.c -libmeta_la_SOURCES += ps2_pnb.c -libmeta_la_SOURCES += ps2_rxw.c -libmeta_la_SOURCES += ps2_str.c -libmeta_la_SOURCES += ps2_svag.c -libmeta_la_SOURCES += ps2_vag.c -libmeta_la_SOURCES += ps2_vpk.c -libmeta_la_SOURCES += psx_cdxa.c -libmeta_la_SOURCES += raw.c -libmeta_la_SOURCES += rs03.c -libmeta_la_SOURCES += rsf.c -libmeta_la_SOURCES += rwsd.c -libmeta_la_SOURCES += psx_gms.c -libmeta_la_SOURCES += xbox_xwav.c -libmeta_la_SOURCES += xbox_wavm.c -libmeta_la_SOURCES += genh.c -libmeta_la_SOURCES += ogg_vorbis_file.c -libmeta_la_SOURCES += ps2_bmdx.c -libmeta_la_SOURCES += aifc.c -libmeta_la_SOURCES += str_snds.c -libmeta_la_SOURCES += ws_aud.c -libmeta_la_SOURCES += ahx.c -libmeta_la_SOURCES += ivb.c -libmeta_la_SOURCES += svs.c -libmeta_la_SOURCES += riff.c -libmeta_la_SOURCES += pos.c -libmeta_la_SOURCES += nwa.c -libmeta_la_SOURCES += ps2_rws.c -libmeta_la_SOURCES += ps2_hgc1.c -libmeta_la_SOURCES += xss.c -libmeta_la_SOURCES += ps2_sl3.c -libmeta_la_SOURCES += ps2_aus.c -libmeta_la_SOURCES += fsb.c -libmeta_la_SOURCES += fsb5.c -libmeta_la_SOURCES += rsd.c -libmeta_la_SOURCES += rwx.c -libmeta_la_SOURCES += xwb.c -libmeta_la_SOURCES += ea_old.c -libmeta_la_SOURCES += ps2_xa30.c -libmeta_la_SOURCES += musc.c -libmeta_la_SOURCES += ps2_leg.c -libmeta_la_SOURCES += ps2_filp.c -libmeta_la_SOURCES += ps2_ikm.c -libmeta_la_SOURCES += musx.c -libmeta_la_SOURCES += ps2_sfs.c -libmeta_la_SOURCES += sat_dvi.c -libmeta_la_SOURCES += ps2_bg00.c -libmeta_la_SOURCES += dc_kcey.c -libmeta_la_SOURCES += ps2_rstm.c -libmeta_la_SOURCES += acm.c -libmeta_la_SOURCES += ps2_kces.c -libmeta_la_SOURCES += ps2_dxh.c -libmeta_la_SOURCES += ps2_psh.c -libmeta_la_SOURCES += mus_acm.c -libmeta_la_SOURCES += sli.c -libmeta_la_SOURCES += sfl.c -libmeta_la_SOURCES += pcm.c -libmeta_la_SOURCES += ps2_psw.c -libmeta_la_SOURCES += rkv.c -libmeta_la_SOURCES += ps2_vas.c -libmeta_la_SOURCES += ps2_tec.c -libmeta_la_SOURCES += ps2_enth.c -libmeta_la_SOURCES += sdt.c -libmeta_la_SOURCES += aix.c -libmeta_la_SOURCES += ngc_tydsp.c -libmeta_la_SOURCES += wvs.c -libmeta_la_SOURCES += xbox_stma.c -libmeta_la_SOURCES += xbox_ims.c -libmeta_la_SOURCES += de2.c -libmeta_la_SOURCES += dc_str.c -libmeta_la_SOURCES += xbox_xmu.c -libmeta_la_SOURCES += ngc_bh2pcm.c -libmeta_la_SOURCES += sat_sap.c -libmeta_la_SOURCES += dc_idvi.c -libmeta_la_SOURCES += ps2_rnd.c -libmeta_la_SOURCES += xbox_xvas.c -libmeta_la_SOURCES += kraw.c -libmeta_la_SOURCES += ps2_xa2.c -libmeta_la_SOURCES += idsp.c -libmeta_la_SOURCES += ngc_ymf.c -libmeta_la_SOURCES += nds_sad.c -libmeta_la_SOURCES += ps2_ccc.c -libmeta_la_SOURCES += psx_fag.c -libmeta_la_SOURCES += ps2_mihb.c -libmeta_la_SOURCES += ngc_pdt.c -libmeta_la_SOURCES += wii_mus.c -libmeta_la_SOURCES += dc_asd.c -libmeta_la_SOURCES += naomi_spsd.c -libmeta_la_SOURCES += bgw.c -libmeta_la_SOURCES += ps2_ass.c -libmeta_la_SOURCES += ngc_waa_wac_wad_wam.c -libmeta_la_SOURCES += seg.c -libmeta_la_SOURCES += str_asr.c -libmeta_la_SOURCES += zwdsp.c -libmeta_la_SOURCES += gca.c -libmeta_la_SOURCES += ish_isd.c -libmeta_la_SOURCES += spt_spd.c -libmeta_la_SOURCES += ydsp.c -libmeta_la_SOURCES += gsp_gsb.c -libmeta_la_SOURCES += ngc_ssm.c -libmeta_la_SOURCES += msvp.c -libmeta_la_SOURCES += ps2_joe.c -libmeta_la_SOURCES += vs.c -libmeta_la_SOURCES += vgs.c -libmeta_la_SOURCES += dc_dcsw_dcs.c -libmeta_la_SOURCES += wii_smp.c -libmeta_la_SOURCES += ss_stream.c -libmeta_la_SOURCES += emff.c -libmeta_la_SOURCES += thp.c -libmeta_la_SOURCES += wii_sts.c -libmeta_la_SOURCES += capdsp.c -libmeta_la_SOURCES += wii_sng.c -libmeta_la_SOURCES += aax.c -libmeta_la_SOURCES += ps2_p2bt.c -libmeta_la_SOURCES += ps2_gbts.c -libmeta_la_SOURCES += ngc_ffcc_str.c -libmeta_la_SOURCES += sat_baka.c -libmeta_la_SOURCES += nds_swav.c -libmeta_la_SOURCES += vsf.c -libmeta_la_SOURCES += nds_rrds.c -libmeta_la_SOURCES += ps2_tk5.c -libmeta_la_SOURCES += ads.c -libmeta_la_SOURCES += wii_str.c -libmeta_la_SOURCES += zsd.c -libmeta_la_SOURCES += ps2_mcg.c -libmeta_la_SOURCES += redspark.c -libmeta_la_SOURCES += ivaud.c -libmeta_la_SOURCES += ps2_vgs.c -libmeta_la_SOURCES += ps2_sps.c -libmeta_la_SOURCES += nds_hwas.c -libmeta_la_SOURCES += ngc_lps.c -libmeta_la_SOURCES += ps2_snd.c -libmeta_la_SOURCES += naomi_adpcm.c -libmeta_la_SOURCES += sd9.c -libmeta_la_SOURCES += 2dx9.c -libmeta_la_SOURCES += ngc_dsp_ygo.c -libmeta_la_SOURCES += ps2_vgv.c -libmeta_la_SOURCES += ngc_gcub.c -libmeta_la_SOURCES += maxis_xa.c -libmeta_la_SOURCES += ngc_sck_dsp.c -libmeta_la_SOURCES += apple_caff.c -libmeta_la_SOURCES += pc_mxst.c -libmeta_la_SOURCES += pc_sob.c -libmeta_la_SOURCES += exakt_sc.c -libmeta_la_SOURCES += wii_bns.c -libmeta_la_SOURCES += pona.c -libmeta_la_SOURCES += xbox_hlwav.c -libmeta_la_SOURCES += stx.c -libmeta_la_SOURCES += ps2_stm.c -libmeta_la_SOURCES += myspd.c -libmeta_la_SOURCES += his.c -libmeta_la_SOURCES += ps2_ast.c -libmeta_la_SOURCES += dmsg_segh.c -libmeta_la_SOURCES += ngc_dsp_konami.c -libmeta_la_SOURCES += ps2_ster.c -libmeta_la_SOURCES += bnsf.c -libmeta_la_SOURCES += ps2_wb.c -libmeta_la_SOURCES += s14_sss.c -libmeta_la_SOURCES += ps2_gcm.c -libmeta_la_SOURCES += ps2_smpl.c -libmeta_la_SOURCES += ps2_msa.c -libmeta_la_SOURCES += pc_smp.c -libmeta_la_SOURCES += p3d.c -libmeta_la_SOURCES += ps2_adsc.c -libmeta_la_SOURCES += psx_str_mgav.c -libmeta_la_SOURCES += ngc_bo2.c -libmeta_la_SOURCES += ngc_dsp_mpds.c -libmeta_la_SOURCES += ps2_khv.c -libmeta_la_SOURCES += ps2_voi.c -libmeta_la_SOURCES += dsp_sth_str.c -libmeta_la_SOURCES += ps2_b1s.c -libmeta_la_SOURCES += ps2_wad.c -libmeta_la_SOURCES += ps2_lpcm.c -libmeta_la_SOURCES += ps2_adm.c -libmeta_la_SOURCES += dsp_bdsp.c -libmeta_la_SOURCES += ps2_vms.c -libmeta_la_SOURCES += ps2_xau.c -libmeta_la_SOURCES += gh3_bar.c -libmeta_la_SOURCES += ffw.c -libmeta_la_SOURCES += ps2_jstm.c -libmeta_la_SOURCES += ps3_xvag.c -libmeta_la_SOURCES += ps3_cps.c -libmeta_la_SOURCES += sqex_scd.c -libmeta_la_SOURCES += ngc_nst_dsp.c -libmeta_la_SOURCES += baf.c -libmeta_la_SOURCES += ps3_msf.c -libmeta_la_SOURCES += nub_vag.c -libmeta_la_SOURCES += ps3_past.c -libmeta_la_SOURCES += sgxd.c -libmeta_la_SOURCES += ngca.c -libmeta_la_SOURCES += wii_ras.c -libmeta_la_SOURCES += ps2_spm.c -libmeta_la_SOURCES += x360_tra.c -libmeta_la_SOURCES += ps2_iab.c -libmeta_la_SOURCES += ps2_strlr.c -libmeta_la_SOURCES += lsf.c -libmeta_la_SOURCES += vawx.c -libmeta_la_SOURCES += pc_snds.c -libmeta_la_SOURCES += ps2_wmus.c -libmeta_la_SOURCES += mattel_hyperscan.c -libmeta_la_SOURCES += ios_psnd.c -libmeta_la_SOURCES += pc_adp.c -libmeta_la_SOURCES += excitebots.c -libmeta_la_SOURCES += ps2_mtaf.c -libmeta_la_SOURCES += ps3_klbs.c -libmeta_la_SOURCES += tun.c -libmeta_la_SOURCES += wpd.c -libmeta_la_SOURCES += mn_str.c -libmeta_la_SOURCES += ps2_mss.c -libmeta_la_SOURCES += ps2_hsf.c -libmeta_la_SOURCES += ps3_ivag.c -libmeta_la_SOURCES += ps2_2pfs.c -libmeta_la_SOURCES += ubi_ckd.c -libmeta_la_SOURCES += otm.c -libmeta_la_SOURCES += bcstm.c -libmeta_la_SOURCES += bfwav.c -libmeta_la_SOURCES += bfstm.c -libmeta_la_SOURCES += g1l.c -libmeta_la_SOURCES += ps2_vbk.c -libmeta_la_SOURCES += mca.c -libmeta_la_SOURCES += btsnd.c -libmeta_la_SOURCES += hca.c -libmeta_la_SOURCES += ps2_svag_snk.c -libmeta_la_SOURCES += mp4.c -libmeta_la_SOURCES += xma.c -libmeta_la_SOURCES += ps2_vds_vdm.c -libmeta_la_SOURCES += x360_cxs.c -libmeta_la_SOURCES += dsp_adx.c -libmeta_la_SOURCES += bik.c -libmeta_la_SOURCES += akb.c -libmeta_la_SOURCES += x360_ast.c -libmeta_la_SOURCES += wwise.c -libmeta_la_SOURCES += ubi_raki.c -libmeta_la_SOURCES += x360_pasx.c -libmeta_la_SOURCES += x360_nub.c -libmeta_la_SOURCES += sxd.c -libmeta_la_SOURCES += ogl.c -libmeta_la_SOURCES += mc3.c - -##EXTRA_DIST = meta.h +libmeta_la_SOURCES = (auto-updated) +EXTRA_DIST = (auto-updated) diff --git a/unix/Makefile.unix.am b/unix/Makefile.unix.am index 62bc801a..e64804d5 100644 --- a/unix/Makefile.unix.am +++ b/unix/Makefile.unix.am @@ -1,12 +1,14 @@ -## audacious-vgmstream script +## audacious-vgmstream automake script lib_LTLIBRARIES = libvgmstream.la libdir = @plugindir@/@INPUT_PLUGIN_DIR@ AM_MAKEFLAGS=-f Makefile.unix -AM_CXXFLAGS = -Wall -std=c++11 -fpermissive @CXXFLAGS@ -I$(top_builddir) -I$(top_srcdir) -I$(top_srcdir)/ext_includes/ @GTK_CFLAGS@ +AM_CXXFLAGS = -DVERSION=\"VGMSTREAM_VERSION\" -Wall -std=c++11 -fpermissive @CXXFLAGS@ -I$(top_builddir) -I$(top_srcdir) -I$(top_srcdir)/ext_includes/ @GTK_CFLAGS@ AM_LIBS = +# sources/headers are updated automatically by ./bootstrap script (not all headers are needed though) libvgmstream_la_LDFLAGS = -no-undefined -module -avoid-version -export-symbols-regex get_plugin_info ../src/libvgmstream.la -libvgmstream_la_SOURCES = plugin.cc vfs.cc +libvgmstream_la_SOURCES = (auto-updated) +EXTRA_DIST = (auto-updated) diff --git a/unix/plugin.cc b/unix/plugin.cc index 89f29106..f84b1d9b 100644 --- a/unix/plugin.cc +++ b/unix/plugin.cc @@ -22,7 +22,13 @@ extern "C" { #include "vfs.h" -#define VERSION "1.3.0" +#ifndef VERSION +#include "../version.h" +#endif +#ifndef VERSION +#define VERSION "(unknown version)" +#endif + #define CFG_ID "vgmstream" // ID for storing in audacious #define MIN_BUFFER_SIZE 576 @@ -124,7 +130,7 @@ bool read_data(const char * filename, Tuple & tuple) { return false; } - tuple.set_filename(filename); + tuple.set_filename(filename); //may leak string??? int rate = get_vgmstream_average_bitrate(vgmstream); tuple.set_int(Tuple::Bitrate, rate);