2021-01-23 15:50:59 +01:00
|
|
|
###############################
|
2018-01-07 20:13:20 +01:00
|
|
|
# CLI tools
|
2021-01-23 15:50:59 +01:00
|
|
|
###############################
|
2008-01-31 06:15:03 +00:00
|
|
|
|
2021-01-23 15:50:59 +01:00
|
|
|
###############################################################################
|
2018-01-07 20:13:20 +01:00
|
|
|
### main defs
|
|
|
|
|
2018-08-20 20:08:24 +02:00
|
|
|
ifeq ($(TARGET_OS),Windows_NT)
|
2018-01-07 20:13:20 +01:00
|
|
|
OUTPUT_CLI = test.exe
|
2018-01-18 23:29:11 +01:00
|
|
|
OUTPUT_123 = vgmstream123.exe
|
2018-01-07 20:13:20 +01:00
|
|
|
else
|
|
|
|
OUTPUT_CLI = vgmstream-cli
|
2018-01-18 23:29:11 +01:00
|
|
|
OUTPUT_123 = vgmstream123
|
|
|
|
endif
|
|
|
|
|
|
|
|
# -DUSE_ALLOCA
|
2018-08-20 20:08:24 +02:00
|
|
|
ifeq ($(TARGET_OS),Windows_NT)
|
2021-07-29 23:42:34 +02:00
|
|
|
CFLAGS += -DWIN32 -I../ext_libs/Getopt -I../ext_includes/ffmpeg
|
2018-01-07 20:13:20 +01:00
|
|
|
endif
|
|
|
|
|
2021-01-23 15:50:59 +01:00
|
|
|
CFLAGS += $(DEF_CFLAGS) -DVAR_ARRAYS -I../ext_includes $(EXTRA_CFLAGS)
|
2021-08-07 12:33:50 +02:00
|
|
|
LDFLAGS += -L../src -L../ext_libs -lvgmstream -lm $(EXTRA_LDFLAGS)
|
2018-01-07 20:13:20 +01:00
|
|
|
TARGET_EXT_LIBS =
|
|
|
|
|
2021-01-23 15:50:59 +01:00
|
|
|
CFLAGS += $(LIBS_CFLAGS)
|
|
|
|
LDFLAGS += $(LIBS_LDFLAGS)
|
|
|
|
TARGET_EXT_LIBS += $(LIBS_TARGET_EXT_LIBS)
|
|
|
|
|
2018-01-18 23:29:11 +01:00
|
|
|
LIBAO_INC_PATH = ../../libao/include
|
|
|
|
LIBAO_LIB_PATH = ../../libao/bin
|
|
|
|
|
2018-01-07 20:13:20 +01:00
|
|
|
|
|
|
|
export CFLAGS LDFLAGS
|
|
|
|
|
2021-01-23 15:50:59 +01:00
|
|
|
|
|
|
|
###############################################################################
|
2018-01-07 20:13:20 +01:00
|
|
|
### targets
|
|
|
|
|
|
|
|
vgmstream_cli: libvgmstream.a $(TARGET_EXT_LIBS)
|
2021-08-07 20:41:50 +02:00
|
|
|
$(CC) $(CFLAGS) "-DVGMSTREAM_VERSION=\"$(VGMSTREAM_VERSION_PREV)\"" vgmstream_cli.c $(LDFLAGS) -o $(OUTPUT_CLI)
|
2018-01-07 20:13:20 +01:00
|
|
|
$(STRIP) $(OUTPUT_CLI)
|
|
|
|
|
2018-01-18 23:29:11 +01:00
|
|
|
vgmstream123: libvgmstream.a $(TARGET_EXT_LIBS)
|
2021-08-07 20:41:50 +02:00
|
|
|
$(CC) $(CFLAGS) -I$(LIBAO_INC_PATH) "-DVGMSTREAM_VERSION=\"$(VGMSTREAM_VERSION_PREV)\"" vgmstream123.c $(LDFLAGS) -L$(LIBAO_LIB_PATH) -lao -o $(OUTPUT_123)
|
2018-01-18 23:29:11 +01:00
|
|
|
$(STRIP) $(OUTPUT_123)
|
2008-03-25 07:25:46 +00:00
|
|
|
|
2008-03-10 19:20:40 +00:00
|
|
|
libvgmstream.a:
|
2015-01-21 19:28:43 -05:00
|
|
|
$(MAKE) -C ../src $@
|
2008-02-06 00:27:51 +00:00
|
|
|
|
2018-01-07 20:13:20 +01:00
|
|
|
$(TARGET_EXT_LIBS):
|
|
|
|
$(MAKE) -C ../ext_libs $@
|
|
|
|
|
2008-01-31 06:15:03 +00:00
|
|
|
clean:
|
2018-01-07 20:13:20 +01:00
|
|
|
$(RMF) $(OUTPUT_CLI)
|
|
|
|
|
|
|
|
.PHONY: clean vgmstream_cli libvgmstream.a $(TARGET_EXT_LIBS)
|