2021-01-23 15:50:59 +01:00
|
|
|
###############################
|
2018-01-07 20:13:20 +01:00
|
|
|
# XMPlay plugin
|
2021-01-23 15:50:59 +01:00
|
|
|
###############################
|
2017-01-03 14:27:06 +01:00
|
|
|
|
2018-08-20 20:08:24 +02:00
|
|
|
|
2018-09-08 17:07:33 +02:00
|
|
|
# cross-compile
|
2018-08-20 20:08:24 +02:00
|
|
|
ifneq ($(TARGET_OS),Windows_NT)
|
2018-09-08 17:07:33 +02:00
|
|
|
export CC=i586-mingw32msvc-gcc
|
|
|
|
export AR=i586-mingw32msvc-ar
|
|
|
|
export STRIP=i586-mingw32msvc-strip
|
|
|
|
export WINDRES=i586-mingw32msvc-windres
|
2017-01-03 14:27:06 +01:00
|
|
|
endif
|
|
|
|
|
|
|
|
|
2021-01-23 15:50:59 +01:00
|
|
|
###############################################################################
|
2018-01-07 20:13:20 +01:00
|
|
|
### main defs
|
|
|
|
OUTPUT_XMPLAY = xmp-vgmstream.dll
|
2017-01-03 14:27:06 +01:00
|
|
|
|
2021-07-29 23:42:34 +02:00
|
|
|
ifeq ($(TARGET_OS),Windows_NT)
|
|
|
|
CFLAGS += -m32 -DUSE_ALLOCA -DWIN32 -I../ext_includes/ffmpeg
|
|
|
|
endif
|
|
|
|
|
|
|
|
CFLAGS += $(DEF_CFLAGS) -I../ext_includes $(EXTRA_CFLAGS)
|
2018-01-07 20:13:20 +01:00
|
|
|
LDFLAGS += -L../src -L../ext_libs -lm -lvgmstream $(EXTRA_LDFLAGS)
|
|
|
|
TARGET_EXT_LIBS =
|
2017-01-03 14:27:06 +01:00
|
|
|
|
2021-01-23 15:50:59 +01:00
|
|
|
CFLAGS += $(LIBS_CFLAGS)
|
|
|
|
LDFLAGS += $(LIBS_LDFLAGS)
|
|
|
|
TARGET_EXT_LIBS += $(LIBS_TARGET_EXT_LIBS)
|
2021-01-12 15:11:24 +01:00
|
|
|
|
2017-01-03 14:27:06 +01:00
|
|
|
|
2018-01-07 20:13:20 +01:00
|
|
|
export CFLAGS LDFLAGS
|
2017-01-03 14:27:06 +01:00
|
|
|
|
|
|
|
|
2021-01-23 15:50:59 +01:00
|
|
|
###############################################################################
|
2018-01-07 20:13:20 +01:00
|
|
|
### targets
|
2017-01-03 14:27:06 +01:00
|
|
|
|
2018-01-07 20:13:20 +01:00
|
|
|
xmp_vgmstream: libvgmstream.a $(TARGET_EXT_LIBS)
|
|
|
|
$(CC) -shared -static-libgcc $(CFLAGS) "-DVERSION=\"`../version.sh`\"" xmp_vgmstream.c $(LDFLAGS) -o $(OUTPUT_XMPLAY) xmpin.def
|
|
|
|
$(STRIP) $(OUTPUT_XMPLAY)
|
2017-01-03 14:27:06 +01:00
|
|
|
|
2018-01-07 20:13:20 +01:00
|
|
|
libvgmstream.a:
|
|
|
|
$(MAKE) -C ../src $@
|
|
|
|
|
|
|
|
$(TARGET_EXT_LIBS):
|
|
|
|
$(MAKE) -C ../ext_libs $@
|
2017-09-24 19:14:19 +02:00
|
|
|
|
2017-01-03 14:27:06 +01:00
|
|
|
clean:
|
2018-01-07 20:13:20 +01:00
|
|
|
$(RMF) $(OUTPUT_XMPLAY)
|
|
|
|
|
|
|
|
.PHONY: clean xmp_vgmstream libvgmstream.a $(TARGET_EXT_LIBS)
|