2018-01-07 20:13:20 +01:00
|
|
|
###############################
|
|
|
|
# vgmstream makefile
|
|
|
|
###############################
|
2008-03-11 06:40:29 +01:00
|
|
|
|
2018-01-07 20:13:20 +01:00
|
|
|
### defs
|
|
|
|
# currently aimed to WIN32 builds but vgmstream_cli should work for others (or use autotools instead)
|
2018-08-20 20:08:24 +02:00
|
|
|
export TARGET_OS = $(OS)
|
2020-04-12 20:38:21 +02:00
|
|
|
|
|
|
|
#for Win builds with vgmstream123
|
|
|
|
LIBAO_DLL_PATH = ../libao/bin
|
2018-01-07 20:13:20 +01:00
|
|
|
|
|
|
|
### tools
|
|
|
|
RMF = rm -f
|
|
|
|
|
2018-08-20 20:08:24 +02:00
|
|
|
ifeq ($(TARGET_OS),Windows_NT)
|
2018-01-07 20:13:20 +01:00
|
|
|
SHELL = sh
|
|
|
|
CC = gcc
|
|
|
|
AR = ar
|
|
|
|
STRIP = strip
|
|
|
|
WINDRES = windres
|
|
|
|
DLLTOOL = dlltool
|
|
|
|
|
|
|
|
# same thing, the above should be available
|
|
|
|
#CC = i686-w64-mingw32-gcc
|
|
|
|
#AR = i686-w64-mingw32-ar
|
|
|
|
#STRIP = i686-w64-mingw32-strip
|
|
|
|
#WINDRES = i686-w64-mingw32-windres
|
|
|
|
#DLLTOOL = i686-w64-mingw32-dlltool
|
|
|
|
|
|
|
|
else
|
|
|
|
SHELL = /bin/sh
|
|
|
|
CC = gcc
|
|
|
|
AR = ar
|
|
|
|
STRIP = strip
|
|
|
|
WINDRES =
|
|
|
|
DLLTOOL =
|
|
|
|
|
|
|
|
# (old crosscompile, not used anymore?)
|
|
|
|
#CC = i586-mingw32msvc-gcc
|
|
|
|
#AR = i586-mingw32msvc-ar
|
|
|
|
#STRIP = i586-mingw32msvc-strip
|
|
|
|
#WINDRES = i586-mingw32msvc-windres
|
|
|
|
#DLLTOOL = i586-mingw32msvc-dlltool
|
|
|
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
export RMF SHELL CC AR STRIP WINDRES DLLTOOL
|
|
|
|
|
|
|
|
|
|
|
|
### targets
|
|
|
|
|
|
|
|
buildrelease: clean bin
|
|
|
|
|
2020-04-12 20:38:21 +02:00
|
|
|
buildrelease-ex: clean bin-ex
|
|
|
|
|
2018-01-07 20:13:20 +01:00
|
|
|
buildfullrelease: clean sourceball bin
|
2008-03-11 06:40:29 +01:00
|
|
|
|
2008-03-14 14:28:46 +01:00
|
|
|
sourceball:
|
2008-05-18 08:16:56 +02:00
|
|
|
rm -rf vgmstream-`./version.sh`
|
2015-01-22 01:28:43 +01:00
|
|
|
git checkout-index -f -a --prefix=vgmstream-`./version.sh`/
|
|
|
|
# git archive --format zip --output vgmstream-`./version.sh`.zip master
|
2008-05-18 08:16:56 +02:00
|
|
|
echo "#!/bin/sh" > vgmstream-`./version.sh`/version.sh
|
|
|
|
echo "echo \"`./version.sh`\"" >> vgmstream-`./version.sh`/version.sh
|
|
|
|
tar cvzf "vgmstream-`./version.sh`.tar.gz" vgmstream-`./version.sh`/*
|
|
|
|
rm -rf vgmstream-`./version.sh`
|
2008-03-11 06:40:29 +01:00
|
|
|
|
2018-01-07 20:13:20 +01:00
|
|
|
bin mingwbin: vgmstream_cli winamp xmplay
|
2018-01-19 00:39:04 +01:00
|
|
|
zip -FS -j "vgmstream-`./version.sh`-test.zip" COPYING README.md cli/test.exe winamp/in_vgmstream.dll xmplay/xmp-vgmstream.dll ext_libs/*.dll
|
2008-03-11 06:40:29 +01:00
|
|
|
|
2020-04-12 20:38:21 +02:00
|
|
|
#separate since vgmstream123 is kinda untested
|
|
|
|
bin-ex mingwbin-ex: vgmstream_cli winamp xmplay vgmstream123
|
|
|
|
zip -FS -j "vgmstream-`./version.sh`-test.zip" COPYING README.md cli/test.exe cli/vgmstream123.exe winamp/in_vgmstream.dll xmplay/xmp-vgmstream.dll ext_libs/*.dll $(LIBAO_DLL_PATH)/*.dll
|
|
|
|
|
2018-01-07 20:13:20 +01:00
|
|
|
vgmstream_cli mingw_test:
|
2018-01-19 00:39:04 +01:00
|
|
|
$(MAKE) -C cli vgmstream_cli
|
2008-03-11 06:40:29 +01:00
|
|
|
|
2018-01-18 23:29:11 +01:00
|
|
|
vgmstream123:
|
2018-01-19 00:39:04 +01:00
|
|
|
$(MAKE) -C cli vgmstream123
|
2008-03-11 06:40:29 +01:00
|
|
|
|
2018-01-07 20:13:20 +01:00
|
|
|
winamp mingw_winamp:
|
|
|
|
$(MAKE) -C winamp in_vgmstream
|
|
|
|
|
|
|
|
xmplay mingw_xmplay:
|
|
|
|
$(MAKE) -C xmplay xmp_vgmstream
|
2017-01-03 14:27:06 +01:00
|
|
|
|
2008-03-11 06:40:29 +01:00
|
|
|
clean:
|
2018-01-07 20:13:20 +01:00
|
|
|
$(RMF) vgmstream-*.zip
|
2017-01-03 14:27:06 +01:00
|
|
|
$(MAKE) -C src clean
|
2018-01-19 00:39:04 +01:00
|
|
|
$(MAKE) -C cli clean
|
2008-03-11 06:40:29 +01:00
|
|
|
$(MAKE) -C winamp clean
|
2017-05-01 17:22:36 +02:00
|
|
|
$(MAKE) -C xmplay clean
|
2018-01-07 20:13:20 +01:00
|
|
|
$(MAKE) -C ext_libs clean
|
|
|
|
|
|
|
|
.PHONY: clean buildfullrelease buildrelease sourceball bin vgmstream_cli winamp xmplay mingwbin mingw_test mingw_winamp mingw_xmplay
|
|
|
|
|
|
|
|
#deprecated: buildfullrelease sourceball mingwbin mingw_test mingw_winamp mingw_xmplay
|