2016-11-15 00:05:19 +01:00
|
|
|
# optional parts
|
2016-12-26 13:57:15 +01:00
|
|
|
VGM_ENABLE_FFMPEG=1
|
2016-11-27 16:14:19 +01:00
|
|
|
ifeq ($(VGM_ENABLE_FFMPEG),1)
|
2017-01-08 02:54:18 +01:00
|
|
|
FFMPEG_CC=-DVGM_USE_FFMPEG
|
2016-12-26 13:57:15 +01:00
|
|
|
FFMPEG_LD=-lavcodec -lavformat -lavutil
|
2016-11-15 00:05:19 +01:00
|
|
|
endif
|
|
|
|
|
2016-12-26 13:57:15 +01:00
|
|
|
VGM_ENABLE_MAIATRAC3PLUS=0
|
2016-11-27 16:14:19 +01:00
|
|
|
ifeq ($(VGM_ENABLE_MAIATRAC3PLUS),1)
|
|
|
|
MAT3P_CC=-DVGM_USE_MAIATRAC3PLUS
|
|
|
|
MAT3P_LD=-lat3plusdecoder
|
2016-11-15 00:05:19 +01:00
|
|
|
endif
|
|
|
|
|
2016-11-27 16:14:19 +01:00
|
|
|
#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
|
|
|
|
|
|
|
|
|
2016-11-15 00:05:19 +01:00
|
|
|
# config
|
2008-03-10 20:20:40 +01:00
|
|
|
export SHELL = /bin/sh
|
2016-12-27 14:28:52 +01:00
|
|
|
export CFLAGS=-Wall -O3 $(MPEG_CC) -DVGM_USE_G7221 -DVGM_USE_G719 $(MAT3P_CC) $(FFMPEG_CC) -DVAR_ARRAYS -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)
|
2015-08-30 20:47:35 +02:00
|
|
|
#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
|
2008-03-10 20:20:40 +01:00
|
|
|
|
2016-12-26 13:57:15 +01:00
|
|
|
.PHONY: libvgmstream.a libvorbis.a libmpg123-0.a libg7221_decode.a libg719_decode.a libat3plusdecoder.a libavcodec.a libavformat.a libavutil.a
|
2008-03-10 20:20:40 +01:00
|
|
|
|
2016-12-26 13:57:15 +01:00
|
|
|
test.exe: libvgmstream.a libvorbis.a libmpg123-0.a libg7221_decode.a libg719_decode.a libat3plusdecoder.a libavcodec.a libavformat.a libavutil.a
|
2008-03-14 14:11:14 +01:00
|
|
|
$(CC) $(CFLAGS) "-DVERSION=\"`../version.sh`\"" test.c $(LDFLAGS) -o test.exe
|
2008-03-11 06:40:29 +01:00
|
|
|
$(STRIP) test.exe
|
2008-03-10 20:20:40 +01:00
|
|
|
|
|
|
|
libvgmstream.a:
|
2008-06-15 07:43:40 +02:00
|
|
|
$(MAKE) -C ../src $@
|
|
|
|
|
2008-06-15 13:24:09 +02:00
|
|
|
libvorbis.a:
|
2008-06-15 07:43:40 +02:00
|
|
|
$(MAKE) -C ../ext_libs -f Makefile.mingw $@
|
2008-03-10 20:20:40 +01:00
|
|
|
|
2008-07-05 13:49:29 +02:00
|
|
|
libmpg123-0.a:
|
|
|
|
$(MAKE) -C ../ext_libs -f Makefile.mingw $@
|
|
|
|
|
2010-03-23 21:57:12 +01:00
|
|
|
libg7221_decode.a:
|
|
|
|
$(MAKE) -C ../ext_libs -f Makefile.mingw $@
|
|
|
|
|
2015-01-25 06:08:25 +01:00
|
|
|
libg719_decode.a:
|
|
|
|
$(MAKE) -C ../ext_libs -f Makefile.mingw $@
|
|
|
|
|
2015-05-12 00:02:21 +02:00
|
|
|
libat3plusdecoder.a:
|
|
|
|
$(MAKE) -C ../ext_libs -f Makefile.mingw $@
|
2016-12-26 13:57:15 +01:00
|
|
|
|
|
|
|
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 $@
|
|
|
|
|
2008-03-10 20:20:40 +01:00
|
|
|
clean:
|
|
|
|
rm -f test.exe
|