vgmstream/xmplay/Makefile

54 lines
1.2 KiB
Makefile
Raw Normal View History

###############################
# XMPlay plugin
###############################
# cross-compile
ifneq ($(TARGET_OS),Windows_NT)
export CC=i586-mingw32msvc-gcc
export AR=i586-mingw32msvc-ar
export STRIP=i586-mingw32msvc-strip
export WINDRES=i586-mingw32msvc-windres
endif
###############################################################################
### main defs
OUTPUT_XMPLAY = xmp-vgmstream.dll
2021-07-29 23:42:34 +02:00
ifeq ($(TARGET_OS),Windows_NT)
CFLAGS += -m32 -DWIN32
2021-07-29 23:42:34 +02:00
endif
CFLAGS += $(DEF_CFLAGS) -I../ext_includes $(EXTRA_CFLAGS)
2023-01-15 21:10:44 +01:00
LDFLAGS += -L../src -L../ext_libs/$(DLL_DIR) -lvgmstream -lm $(EXTRA_LDFLAGS)
TARGET_EXT_LIBS =
CFLAGS += $(LIBS_CFLAGS)
LDFLAGS += $(LIBS_LDFLAGS)
TARGET_EXT_LIBS += $(LIBS_TARGET_EXT_LIBS)
2021-01-12 15:11:24 +01:00
export CFLAGS LDFLAGS
2024-07-18 23:50:22 +02:00
SRCS = $(wildcard *.c)
OBJECTS = $(wildcard *.o)
###############################################################################
### targets
xmp_vgmstream: libvgmstream.a $(TARGET_EXT_LIBS)
2024-07-18 23:50:22 +02:00
$(CC) -shared -static-libgcc $(CFLAGS) $(SRCS) $(LDFLAGS) -o $(OUTPUT_XMPLAY) xmpin.def
$(STRIP) $(OUTPUT_XMPLAY)
libvgmstream.a:
$(MAKE) -C ../src $@
$(TARGET_EXT_LIBS):
$(MAKE) -C ../ext_libs $@
clean:
2024-07-18 23:50:22 +02:00
$(RMF) $(OBJECTS) $(OUTPUT_XMPLAY)
.PHONY: clean xmp_vgmstream libvgmstream.a $(TARGET_EXT_LIBS)