mirror of
https://github.com/vgmstream/vgmstream.git
synced 2024-11-28 16:30:54 +01:00
51 lines
1.5 KiB
Makefile
51 lines
1.5 KiB
Makefile
# optional parts
|
|
export ENABLE_FFMPEG=0
|
|
ifeq ($(ENABLE_FFMPEG),1)
|
|
export FFMPEG_CC=-DVGM_USE_FFMPEG -I../../ffmpeg-dev/include
|
|
export FFMPEG_LD=-L../../ffmpeg-dev/lib -lavcodec -lavformat -lavutil
|
|
endif
|
|
|
|
export ENABLE_MAIATRAC3PLUS=1
|
|
ifeq ($(ENABLE_MAIATRAC3PLUS),1)
|
|
export MAT3P_CC=-DVGM_USE_MAIATRAC3PLUS
|
|
export MAT3P_LD=-lat3plusdecoder
|
|
endif
|
|
|
|
# config
|
|
export SHELL = /bin/sh
|
|
export CFLAGS=-Wall -O3 -DVGM_USE_G7221 -DVGM_USE_G719 $(MAT3P_CC) -DVAR_ARRAYS -I../ext_includes $(FFMPEG_CC)
|
|
export LDFLAGS=-L../src -L../ext_libs -lvgmstream -lvorbis -lmpg123-0 -lg7221_decode -lg719_decode $(MAT3P_LD) -lm $(FFMPEG_LD)
|
|
#export CC=i586-mingw32msvc-gcc
|
|
#export AR=i586-mingw32msvc-ar
|
|
#export STRIP=i586-mingw32msvc-strip
|
|
export CC=i686-w64-mingw32-gcc
|
|
export AR=i686-w64-mingw32-ar
|
|
export STRIP=i686-w64-mingw32-strip
|
|
|
|
.PHONY: libvgmstream.a libvorbis.a libmpg123-0.a libg7221_decode.a libg719_decode.a libat3plusdecoder.a
|
|
|
|
test.exe: libvgmstream.a libvorbis.a libmpg123-0.a libg7221_decode.a libg719_decode.a libat3plusdecoder.a
|
|
$(CC) $(CFLAGS) "-DVERSION=\"`../version.sh`\"" test.c $(LDFLAGS) -o test.exe
|
|
$(STRIP) test.exe
|
|
|
|
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 $@
|
|
|
|
clean:
|
|
rm -f test.exe
|