vgmstream/winamp/Makefile

59 lines
1.4 KiB
Makefile
Raw Normal View History

###############################
# Winamp 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
2021-08-14 17:22:47 +02:00
CFLAGS += $(DEF_CFLAGS) $(EXTRA_CFLAGS)
LDFLAGS += -L../src -lvgmstream -lm $(EXTRA_LDFLAGS)
TARGET_EXT_LIBS =
OUTPUT_WINAMP = in_vgmstream.dll
2021-07-29 23:42:34 +02:00
ifeq ($(TARGET_OS),Windows_NT)
2021-08-14 17:22:47 +02:00
CFLAGS += -DWIN32 -m32 -DUSE_ALLOCA -I../ext_includes
LDFLAGS += -L../ext_libs
2021-07-29 23:42:34 +02:00
endif
CFLAGS += $(LIBS_CFLAGS)
LDFLAGS += $(LIBS_LDFLAGS)
TARGET_EXT_LIBS += $(LIBS_TARGET_EXT_LIBS)
export CFLAGS LDFLAGS
2021-04-18 13:04:00 +02:00
#SRC_SRCS = $(wildcard *.c)
SRC_SRCS = in_vgmstream.c in_streamfile.c in_config.c
###############################################################################
### targets
in_vgmstream: libvgmstream.a $(TARGET_EXT_LIBS) resource.o
$(CC) -shared -static-libgcc $(CFLAGS) "-DVGMSTREAM_VERSION=\"$(VGMSTREAM_VERSION_PREV)\"" $(SRC_SRCS) resource.o $(LDFLAGS) -o $(OUTPUT_WINAMP)
$(STRIP) $(OUTPUT_WINAMP)
resource.o: resource.rc resource.h
$(WINDRES) -o resource.o resource.rc
libvgmstream.a:
$(MAKE) -C ../src $@
$(TARGET_EXT_LIBS):
$(MAKE) -C ../ext_libs $@
clean:
$(RMF) $(OUTPUT_WINAMP) resource.o
.PHONY: clean in_vgmstream libvgmstream.a $(TARGET_EXT_LIBS)