mirror of
https://github.com/vgmstream/vgmstream.git
synced 2024-11-24 15:00:11 +01:00
52f04eef82
- rename to VERSION to VGMSTREAM_VERSION to avoid some clashes - improve git-less builds
57 lines
1.5 KiB
Makefile
57 lines
1.5 KiB
Makefile
###############################
|
|
# CLI tools
|
|
###############################
|
|
|
|
###############################################################################
|
|
### main defs
|
|
|
|
ifeq ($(TARGET_OS),Windows_NT)
|
|
OUTPUT_CLI = test.exe
|
|
OUTPUT_123 = vgmstream123.exe
|
|
else
|
|
OUTPUT_CLI = vgmstream-cli
|
|
OUTPUT_123 = vgmstream123
|
|
endif
|
|
|
|
# -DUSE_ALLOCA
|
|
ifeq ($(TARGET_OS),Windows_NT)
|
|
CFLAGS += -DWIN32 -I../ext_libs/Getopt -I../ext_includes/ffmpeg
|
|
endif
|
|
|
|
CFLAGS += $(DEF_CFLAGS) -DVAR_ARRAYS -I../ext_includes $(EXTRA_CFLAGS)
|
|
LDFLAGS += -L../src -L../ext_libs -lvgmstream -lm $(EXTRA_LDFLAGS)
|
|
TARGET_EXT_LIBS =
|
|
|
|
CFLAGS += $(LIBS_CFLAGS)
|
|
LDFLAGS += $(LIBS_LDFLAGS)
|
|
TARGET_EXT_LIBS += $(LIBS_TARGET_EXT_LIBS)
|
|
|
|
LIBAO_INC_PATH = ../../libao/include
|
|
LIBAO_LIB_PATH = ../../libao/bin
|
|
|
|
|
|
export CFLAGS LDFLAGS
|
|
|
|
|
|
###############################################################################
|
|
### targets
|
|
|
|
vgmstream_cli: libvgmstream.a $(TARGET_EXT_LIBS)
|
|
$(CC) $(CFLAGS) "-DVGMSTREAM_VERSION=\"$(VGMSTREAM_VERSION_PREV)\"" vgmstream_cli.c $(LDFLAGS) -o $(OUTPUT_CLI)
|
|
$(STRIP) $(OUTPUT_CLI)
|
|
|
|
vgmstream123: libvgmstream.a $(TARGET_EXT_LIBS)
|
|
$(CC) $(CFLAGS) -I$(LIBAO_INC_PATH) "-DVGMSTREAM_VERSION=\"$(VGMSTREAM_VERSION_PREV)\"" vgmstream123.c $(LDFLAGS) -L$(LIBAO_LIB_PATH) -lao -o $(OUTPUT_123)
|
|
$(STRIP) $(OUTPUT_123)
|
|
|
|
libvgmstream.a:
|
|
$(MAKE) -C ../src $@
|
|
|
|
$(TARGET_EXT_LIBS):
|
|
$(MAKE) -C ../ext_libs $@
|
|
|
|
clean:
|
|
$(RMF) $(OUTPUT_CLI)
|
|
|
|
.PHONY: clean vgmstream_cli libvgmstream.a $(TARGET_EXT_LIBS)
|