2021-01-23 15:50:59 +01:00
|
|
|
###############################
|
2018-01-07 20:13:20 +01:00
|
|
|
# Winamp plugin
|
2021-01-23 15:50:59 +01:00
|
|
|
###############################
|
2016-11-15 00:05:19 +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
|
2016-11-15 00:05:19 +01:00
|
|
|
endif
|
|
|
|
|
2016-11-27 16:14:19 +01:00
|
|
|
|
2021-01-23 15:50:59 +01:00
|
|
|
###############################################################################
|
2018-01-07 20:13:20 +01:00
|
|
|
### 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 =
|
|
|
|
|
2018-01-07 20:13:20 +01:00
|
|
|
OUTPUT_WINAMP = in_vgmstream.dll
|
2016-11-27 16:14:19 +01:00
|
|
|
|
2021-07-29 23:42:34 +02:00
|
|
|
ifeq ($(TARGET_OS),Windows_NT)
|
2023-01-17 18:11:11 +01:00
|
|
|
CFLAGS += -DWIN32 -m32 -I../ext_includes
|
2023-01-15 21:10:44 +01:00
|
|
|
LDFLAGS += -L../ext_libs/$(DLL_DIR)
|
2021-07-29 23:42:34 +02:00
|
|
|
endif
|
|
|
|
|
2021-01-23 15:50:59 +01:00
|
|
|
CFLAGS += $(LIBS_CFLAGS)
|
|
|
|
LDFLAGS += $(LIBS_LDFLAGS)
|
|
|
|
TARGET_EXT_LIBS += $(LIBS_TARGET_EXT_LIBS)
|
2008-03-10 23:58:31 +01:00
|
|
|
|
2015-01-25 06:08:25 +01:00
|
|
|
|
2018-01-07 20:13:20 +01:00
|
|
|
export CFLAGS LDFLAGS
|
2015-01-22 01:28:43 +01:00
|
|
|
|
2024-07-18 23:50:22 +02:00
|
|
|
SRCS = $(wildcard *.c)
|
|
|
|
OBJECTS = $(wildcard *.o)
|
2016-12-26 13:57:15 +01:00
|
|
|
|
2021-01-23 15:50:59 +01:00
|
|
|
###############################################################################
|
2018-01-07 20:13:20 +01:00
|
|
|
### targets
|
2016-12-26 13:57:15 +01:00
|
|
|
|
2021-01-23 15:50:59 +01:00
|
|
|
in_vgmstream: libvgmstream.a $(TARGET_EXT_LIBS) resource.o
|
2024-07-18 23:50:22 +02:00
|
|
|
$(CC) -shared -static-libgcc $(CFLAGS) $(SRCS) resource.o $(LDFLAGS) -o $(OUTPUT_WINAMP)
|
2018-01-07 20:13:20 +01:00
|
|
|
$(STRIP) $(OUTPUT_WINAMP)
|
2016-12-26 13:57:15 +01:00
|
|
|
|
2018-01-07 20:13:20 +01:00
|
|
|
resource.o: resource.rc resource.h
|
|
|
|
$(WINDRES) -o resource.o resource.rc
|
|
|
|
|
|
|
|
libvgmstream.a:
|
|
|
|
$(MAKE) -C ../src $@
|
|
|
|
|
|
|
|
$(TARGET_EXT_LIBS):
|
|
|
|
$(MAKE) -C ../ext_libs $@
|
2017-09-24 19:14:19 +02:00
|
|
|
|
2008-03-10 23:58:31 +01:00
|
|
|
clean:
|
2024-07-18 23:50:22 +02:00
|
|
|
$(RMF) $(OUTPUT_WINAMP) $(OBJECTS) resource.o
|
2018-01-07 20:13:20 +01:00
|
|
|
|
|
|
|
.PHONY: clean in_vgmstream libvgmstream.a $(TARGET_EXT_LIBS)
|