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 07:15:03 +01: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)
|
2018-01-18 23:29:11 +01:00
|
|
|
CFLAGS += -DWIN32
|
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)
|
|
|
|
LDFLAGS += -L../src -L../ext_libs -lm -lvgmstream $(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)
|
2018-02-10 18:07:16 +01:00
|
|
|
$(CC) $(CFLAGS) "-DVERSION=\"`../version.sh`\"" 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)
|
|
|
|
$(CC) $(CFLAGS) -I$(LIBAO_INC_PATH) "-DVERSION=\"`../version.sh`\"" vgmstream123.c $(LDFLAGS) -L$(LIBAO_LIB_PATH) -lao -o $(OUTPUT_123)
|
|
|
|
$(STRIP) $(OUTPUT_123)
|
2008-03-25 08:25:46 +01:00
|
|
|
|
2008-03-10 20:20:40 +01:00
|
|
|
libvgmstream.a:
|
2015-01-22 01:28:43 +01:00
|
|
|
$(MAKE) -C ../src $@
|
2008-02-06 01:27:51 +01:00
|
|
|
|
2018-01-07 20:13:20 +01:00
|
|
|
$(TARGET_EXT_LIBS):
|
|
|
|
$(MAKE) -C ../ext_libs $@
|
|
|
|
|
2008-01-31 07:15:03 +01:00
|
|
|
clean:
|
2018-01-07 20:13:20 +01:00
|
|
|
$(RMF) $(OUTPUT_CLI)
|
|
|
|
|
|
|
|
.PHONY: clean vgmstream_cli libvgmstream.a $(TARGET_EXT_LIBS)
|