Add XMPlay makefile

When linking using the .def there are some warnings that could be
improved, ignore for now.
This commit is contained in:
bnnm 2017-01-03 14:27:06 +01:00
parent 7c7ea121ba
commit 46108764d5
3 changed files with 90 additions and 19 deletions

View File

@ -14,9 +14,9 @@
## Compiling modules
### test.exe / in_vgmstream (Winamp)
### test.exe / in_vgmstream (Winamp) / xmp-vgmstream (XMPlay)
**With GCC**: use the *./Makefile* in the root folder, see inside for options. For compilation flags check *test/Makefile.mingw* or *winamp/Makefile.mingw*.
**With GCC**: use the *./Makefile* in the root folder, see inside for options. For compilation flags check the *Makefile* in each folder.
You need to manually rebuild if you change a *.h* file (use *make clean*).
In Linux you may need to use *Makefile.unix.am* instead, and note that some Linux makefiles aren't up to date.
@ -34,24 +34,25 @@ mingw32-make.exe mingw_test -f Makefile ^
```
**With MSVC**: open *./vgmstream.sln* and compile in Visual Studio.
For XMPlay open *xmp-vgmstream/xmp-vgmstream.sln* instead; FDK-AAC/QAAC/others may be needed (see below).
### foo_input_vgmstream (foobar2000)
Requires MSVC (foobar/SDK only links to MSVC C++ DLLs) and these dependencies:
- foobar2000 SDK, in ../foobar/: http://www.foobar2000.org/SDK
- WTL includes (if needed): http://wtl.sourceforge.net/
- FDK-AAC, in ../fdk-aac/: https://github.com/kode54/fdk-aac
- QAAC, in ../qaac/: https://github.com/kode54/qaac
FDK-AAC/QAAC can be disabled by removing VGM_USE_MP4V2 and VGM_USE_FDKAAC.
- foobar2000 SDK, in *(vgmstream)/../foobar/*: http://www.foobar2000.org/SDK
- FDK-AAC, in *(vgmstream)/../fdk-aac/*: https://github.com/kode54/fdk-aac
- QAAC, in *(vgmstream)/../qaac/*: https://github.com/kode54/qaac
- WTL91_5321_Final includes (if needed): http://wtl.sourceforge.net/
FDK-AAC/QAAC can be disabled by removing *VGM_USE_MP4V2* and *VGM_USE_FDKAAC*.
Open *./vgmstream.sln* as a base and add *fb2k/foo_input_vgmstream.vcxproj*, which expects the above.
You may need to manually add includes and libs from WTL and ../foobar/foobar2000/shared/ in the compiler/linker options.
Open *./vgmstream.sln* as a base and add *fb2k/foo_input_vgmstream.vcxproj*, which expects the above, and all projects from those dependencies.
Depending on your VS version you may need to manually do the following:
- Change each project's compiler version from VS2010 to yours
- For foobar add *(vgmstream)/../WTL91_5321_Final/Include* to the compilers's *additional includes*
- For foobar add *(vgmstream)/../foobar/foobar2000/shared/shared.lib* to the linker's *additional dependencies*
VS2013 may not be compatible with the SDK.
### xmp-vgmstream (XMPlay)
Currently only MSVC is supported, though it should be compilable with GCC.
Use *xmp-vgmstream/xmp-vgmstream.sln*; FDK-AAC/QAAC may be needed (see above).
## Development

View File

@ -1,4 +1,4 @@
.PHONY: buildfullrelease buildrelease mingw_test mingw_winamp sourceball mingwbin
.PHONY: buildfullrelease buildrelease mingw_test mingw_winamp mingw_xmplay sourceball mingwbin
buildfullrelease: clean sourceball mingwbin
@ -13,8 +13,8 @@ sourceball:
tar cvzf "vgmstream-`./version.sh`.tar.gz" vgmstream-`./version.sh`/*
rm -rf vgmstream-`./version.sh`
mingwbin: mingw_test mingw_winamp
zip -FS -j "vgmstream-`./version.sh`-test.zip" COPYING readme.txt test/test.exe winamp/in_vgmstream.dll ext_libs/*.dll
mingwbin: mingw_test mingw_winamp mingw_xmplay
zip -FS -j "vgmstream-`./version.sh`-test.zip" COPYING readme.txt test/test.exe winamp/in_vgmstream.dll xmp-vgmstream/xmp-vgmstream.dll ext_libs/*.dll
mingw_test:
$(MAKE) -C test -f Makefile.mingw test.exe
@ -22,10 +22,14 @@ mingw_test:
mingw_winamp:
$(MAKE) -C winamp in_vgmstream.dll
mingw_xmplay:
$(MAKE) -C xmp-vgmstream xmp-vgmstream.dll
clean:
rm -rf vgmstream-*
rm -f vgmstream-*.zip
$(MAKE) -C src clean
$(MAKE) -C test clean
$(MAKE) -C test -f Makefile.mingw clean
$(MAKE) -C winamp clean
$(MAKE) -C src clean
$(MAKE) -C xmp-vgmstream clean
$(MAKE) -C ext_libs -f Makefile.mingw clean

66
xmp-vgmstream/Makefile Normal file
View File

@ -0,0 +1,66 @@
# optional parts
VGM_ENABLE_FFMPEG=1
ifeq ($(VGM_ENABLE_FFMPEG),1)
FFMPEG_CC=-DVGM_USE_FFMPEG -DVGM_USE_FFMPEG_ACCURATE_LOOPING
FFMPEG_LD=-lavcodec -lavformat -lavutil
endif
VGM_ENABLE_MAIATRAC3PLUS=0
ifeq ($(VGM_ENABLE_MAIATRAC3PLUS),1)
MAT3P_CC=-DVGM_USE_MAIATRAC3PLUS
MAT3P_LD=-lat3plusdecoder
endif
#MPEG_CC=-DVGM_USE_MPEG
MPEG_LD=-lmpg123-0
VGM_DISABLE_MPEG=0
ifeq ($(VGM_DISABLE_MPEG),1)
MPEG_CC=-DVGM_DISABLE_MPEG
MPEG_LD=
endif
# config
export SHELL = /bin/sh
export CFLAGS=-Wall -O3 $(MPEG_CC) -DVGM_USE_G7221 -DVGM_USE_G719 $(MAT3P_CC) $(FFMPEG_CC) -DUSE_ALLOCA -DWIN32 -I../ext_includes $(EXTRA_CFLAGS)
export LDFLAGS=-L../src -L../ext_libs -lvgmstream -lvorbis $(MPEG_LD) -lg7221_decode -lg719_decode $(MAT3P_LD) $(FFMPEG_LD) -lm $(EXTRA_LDFLAGS)
export CC=gcc
export AR=ar
export STRIP=strip
.PHONY: libvgmstream.a libvorbis.a libmpg123-0.a libg7221_decode.a libg719_decode.a libat3plusdecoder.a libavcodec.a libavformat.a libavutil.a
xmp-vgmstream.dll: libvgmstream.a libvorbis.a libmpg123-0.a libg7221_decode.a libg719_decode.a libat3plusdecoder.a libavcodec.a libavformat.a libavutil.a
$(CC) -shared -static-libgcc $(CFLAGS) "-DVERSION=\"`../version.sh`\"" DllMain.c $(LDFLAGS) -o xmp-vgmstream.dll xmpin.def
$(STRIP) xmp-vgmstream.dll
libvgmstream.a:
$(MAKE) -C ../src $@
libvorbis.a:
$(MAKE) -C ../ext_libs -f Makefile.mingw $@
libmpg123-0.a:
$(MAKE) -C ../ext_libs -f Makefile.mingw $@
libg7221_decode.a:
$(MAKE) -C ../ext_libs -f Makefile.mingw $@
libg719_decode.a:
$(MAKE) -C ../ext_libs -f Makefile.mingw $@
libat3plusdecoder.a:
$(MAKE) -C ../ext_libs -f Makefile.mingw $@
libavcodec.a:
$(MAKE) -C ../ext_libs -f Makefile.mingw $@
libavformat.a:
$(MAKE) -C ../ext_libs -f Makefile.mingw $@
libavutil.a:
$(MAKE) -C ../ext_libs -f Makefile.mingw $@
clean:
rm -f xmp-vgmstream.dll