mirror of
https://github.com/libretro/RetroArch.git
synced 2026-11-23 00:36:42 -10:00
data_transfer reads only through its reader callback. The path entry points keep their names, data_transfer_open_prefix and data_transfer_open_window, in streams/data_transfer_file.c (<streams/data_transfer_file.h>), which opens the file through filestream, reads it at offsets and closes it with the transfer; data_transfer_open_prefix_reader and data_transfer_set_release are the core's side of that. cdfs reads only through the stream a track holds. cdfs_open_track, cdfs_open_data_track and cdfs_open_raw_track are in streams/cdfs_file.c (<streams/cdfs_file.h>); the length-based sector probe they use is cdfs_track_sector_size_from_length. rdvd_vfs, which binds files to the DVD source, and rdvd_stream, which drives it, are streams/rdvd_vfs.c and streams/rdvd_stream.c, their headers under <streams/>. cdfs_file_test covers the path openers: a cooked iso and a raw bin sized by length, a cue sheet resolving its bin beside it, an INDEX 01 offset, the data track, refusals.
74 lines
2.9 KiB
Makefile
74 lines
2.9 KiB
Makefile
include ../../sample_objdir.mk
|
|
|
|
TARGET := content_prefetch_test
|
|
|
|
# The unit under test is the shipping tasks/task_content_prefetch.c,
|
|
# compiled from the tree against the real task queue and the real
|
|
# data_transfer spine. This is the path a menu content load defers
|
|
# to, and delivery is by ownership transfer, so the sanitizer flavors
|
|
# matter as much as the assertions.
|
|
REPO_ROOT := ../../..
|
|
LIBRETRO_COMM_DIR := $(REPO_ROOT)/libretro-common
|
|
|
|
SOURCES := content_prefetch_test.c \
|
|
$(REPO_ROOT)/tasks/task_content_prefetch.c \
|
|
$(LIBRETRO_COMM_DIR)/queues/task_queue.c \
|
|
$(LIBRETRO_COMM_DIR)/rthreads/rthreads.c \
|
|
$(LIBRETRO_COMM_DIR)/rthreads/retro_eventcount.c \
|
|
$(LIBRETRO_COMM_DIR)/features/features_cpu.c \
|
|
$(LIBRETRO_COMM_DIR)/formats/data_transfer.c $(LIBRETRO_COMM_DIR)/streams/data_transfer_file.c \
|
|
$(LIBRETRO_COMM_DIR)/memmap/memmap.c \
|
|
$(LIBRETRO_COMM_DIR)/file/archive_file.c \
|
|
$(LIBRETRO_COMM_DIR)/file/archive_file_zlib.c \
|
|
$(LIBRETRO_COMM_DIR)/file/file_path.c \
|
|
$(LIBRETRO_COMM_DIR)/file/file_path_io.c \
|
|
$(LIBRETRO_COMM_DIR)/lists/string_list.c \
|
|
$(LIBRETRO_COMM_DIR)/streams/file_stream.c \
|
|
$(LIBRETRO_COMM_DIR)/string/rstrtod.c \
|
|
$(LIBRETRO_COMM_DIR)/streams/interface_stream.c \
|
|
$(LIBRETRO_COMM_DIR)/streams/memory_stream.c \
|
|
$(LIBRETRO_COMM_DIR)/streams/rzip_stream.c \
|
|
$(LIBRETRO_COMM_DIR)/streams/trans_stream.c \
|
|
$(LIBRETRO_COMM_DIR)/streams/trans_stream_pipe.c \
|
|
$(LIBRETRO_COMM_DIR)/streams/trans_stream_deflate.c \
|
|
$(LIBRETRO_COMM_DIR)/streams/trans_stream_zlib.c \
|
|
$(LIBRETRO_COMM_DIR)/encodings/encoding_crc32.c \
|
|
$(LIBRETRO_COMM_DIR)/encodings/encoding_deflate.c \
|
|
$(LIBRETRO_COMM_DIR)/encodings/encoding_utf.c \
|
|
$(LIBRETRO_COMM_DIR)/string/stdstring.c \
|
|
$(LIBRETRO_COMM_DIR)/time/rtime.c \
|
|
$(LIBRETRO_COMM_DIR)/vfs/vfs_implementation.c \
|
|
$(LIBRETRO_COMM_DIR)/compat/compat_strl.c \
|
|
$(LIBRETRO_COMM_DIR)/compat/compat_strldup.c \
|
|
$(LIBRETRO_COMM_DIR)/compat/fopen_utf8.c
|
|
|
|
OBJS := $(call sample_objs,$(SOURCES:.c=.o))
|
|
|
|
CFLAGS += -Wall -std=gnu99 -g1 -DHAVE_THREADS -DHAVE_COMPRESSION \
|
|
-DHAVE_ZLIB -I$(LIBRETRO_COMM_DIR)/include -I$(REPO_ROOT)
|
|
LDFLAGS += -lz -lpthread -lm
|
|
|
|
# The samples workflow passes SANITIZER=address,undefined; honour it.
|
|
ifneq ($(SANITIZER),)
|
|
CFLAGS := -fsanitize=$(SANITIZER) -fno-omit-frame-pointer $(CFLAGS)
|
|
LDFLAGS := -fsanitize=$(SANITIZER) $(LDFLAGS)
|
|
endif
|
|
|
|
all: $(TARGET)
|
|
|
|
%.o: %.c
|
|
$(CC) -c -o $@ $< $(CFLAGS)
|
|
|
|
$(SAMPLE_OBJDIR)/%.o: $$(call sample_src,$$*).c
|
|
@mkdir -p $(@D)
|
|
$(CC) -c -o $@ $< $(CFLAGS)
|
|
|
|
$(TARGET): $(OBJS)
|
|
$(CC) -o $@ $^ $(LDFLAGS)
|
|
|
|
clean:
|
|
rm -rf $(SAMPLE_OBJDIR)
|
|
rm -f $(TARGET) $(OBJS)
|
|
|
|
.PHONY: clean all
|