From 77d40d681d04404101db4519cfee44507a23eacc Mon Sep 17 00:00:00 2001 From: halleyscometsw Date: Fri, 14 Mar 2008 13:11:14 +0000 Subject: [PATCH] A correct way of getting version number. git-svn-id: https://vgmstream.svn.sourceforge.net/svnroot/vgmstream@50 51a99a44-fe44-0410-b1ba-c3e57ba2b86b --- readme.txt | 2 +- test/Makefile | 3 ++- test/Makefile.mingw | 2 +- test/test.c | 2 +- winamp/Makefile | 2 +- winamp/in_vgmstream.c | 2 +- 6 files changed, 7 insertions(+), 6 deletions(-) diff --git a/readme.txt b/readme.txt index f04c9c75..ac427ca8 100644 --- a/readme.txt +++ b/readme.txt @@ -26,7 +26,7 @@ Drop the in_vgmstream.dll in your Winamp plugins directory. There is no configuration or seeking yet. --- -Formats supported by this version of vgmstream ($Revision$): +Formats supported by this version of vgmstream: - .adx (CRI ADX ADPCM) - .brstm (RSTM: GC/Wii DSP ADPCM, 8/16 bit PCM) - .strm (STRM: NDS IMA ADPCM, 8/16 bit PCM) diff --git a/test/Makefile b/test/Makefile index 28c0d532..93d7969f 100644 --- a/test/Makefile +++ b/test/Makefile @@ -1,11 +1,12 @@ export SHELL = /bin/sh export CFLAGS=-Wall -O3 export LDFLAGS=-lm -L../src -lvgmstream +export STRIP=strip .PHONY: libvgmstream.a test: libvgmstream.a - $(CC) $(CFLAGS) test.c $(LDFLAGS) -o test + $(CC) $(CFLAGS) "-DVERSION=\"`../version.sh`\"" test.c $(LDFLAGS) -o test $(STRIP) test libvgmstream.a: diff --git a/test/Makefile.mingw b/test/Makefile.mingw index becb05dd..ee0ce111 100644 --- a/test/Makefile.mingw +++ b/test/Makefile.mingw @@ -8,7 +8,7 @@ export STRIP=i586-mingw32msvc-strip .PHONY: libvgmstream.a test.exe: libvgmstream.a - $(CC) $(CFLAGS) test.c $(LDFLAGS) -o test.exe + $(CC) $(CFLAGS) "-DVERSION=\"`../version.sh`\"" test.c $(LDFLAGS) -o test.exe $(STRIP) test.exe libvgmstream.a: diff --git a/test/test.c b/test/test.c index a331aabc..cca78ac0 100644 --- a/test/test.c +++ b/test/test.c @@ -9,7 +9,7 @@ extern char * optarg; extern int optind, opterr, optopt; void usage(const char * name) { - fprintf(stderr,"vgmstream test decoder $Revision$, $Date$\n" + fprintf(stderr,"vgmstream test decoder " VERSION "\n" "Usage: %s [-o outfile.wav] [-l loop count]\n" "\t[-f fade time] [-i] [-p] [-c] [-m] infile\n" "Options:\n" diff --git a/winamp/Makefile b/winamp/Makefile index c15d9231..2a1351f3 100644 --- a/winamp/Makefile +++ b/winamp/Makefile @@ -8,7 +8,7 @@ export STRIP=i586-mingw32msvc-strip .PHONY: libvgmstream.a in_vgmstream.dll: libvgmstream.a - $(CC) -shared $(CFLAGS) in_vgmstream.c $(LDFLAGS) -o in_vgmstream.dll + $(CC) -shared $(CFLAGS) "-DVERSION=\"`../version.sh`\"" in_vgmstream.c $(LDFLAGS) -o in_vgmstream.dll $(STRIP) in_vgmstream.dll libvgmstream.a: diff --git a/winamp/in_vgmstream.c b/winamp/in_vgmstream.c index 0abcc431..87e64fc5 100644 --- a/winamp/in_vgmstream.c +++ b/winamp/in_vgmstream.c @@ -12,7 +12,7 @@ #include "../src/util.h" #include "in2.h" -#define PLUGIN_DESCRIPTION "vgmstream plugin ($Revision$, $Date$)" +#define PLUGIN_DESCRIPTION "vgmstream plugin " VERSION /* post when playback stops */ #define WM_WA_MPEG_EOF WM_USER+2