Files
RetroArch/samples/audio/device_label_path/Makefile
LibretroAdmin 21635dd171 samples: build with -g1 instead of -g
The sample and test builds used full debug info. -g1 keeps what
sanitizer reports and backtraces need - function names, files and line
numbers - and drops the variable and type information nobody reads in
CI. Objects get about 30% smaller (rh265.o under ASan+UBSan: 5.1MB to
3.7MB), so the ccache caches hold more of each job's build and are
quicker to restore and save.
2026-10-13 11:50:11 +02:00

41 lines
1.1 KiB
Makefile

# A device list entry "/dev/dsp0 (card)" comes back to init as the
# device string; the path is what gets opened. oss and audioio,
# compiled whole with open() intercepted, and the helper on its own.
compiler := gcc
TARGET := device_label_path_test
CORE_DIR = ../../..
LIBRETRO_COMM_DIR = $(CORE_DIR)/libretro-common
CC := $(compiler)
CFLAGS += -std=gnu99 -Wall -Wno-unused-function -Wno-unused-parameter \
-Wno-missing-field-initializers -g1 -O1 -DRARCH_INTERNAL \
-I$(CORE_DIR) -I$(LIBRETRO_COMM_DIR)/include -I$(CORE_DIR)/deps \
-Ishim -U_FORTIFY_SOURCE
SANITIZER ?=
ifneq ($(SANITIZER),)
CFLAGS += -fsanitize=$(SANITIZER) -fno-omit-frame-pointer
LDFLAGS += -fsanitize=$(SANITIZER)
endif
SOURCES := device_label_path_test.c \
$(LIBRETRO_COMM_DIR)/lists/string_list.c \
$(LIBRETRO_COMM_DIR)/string/stdstring.c \
$(LIBRETRO_COMM_DIR)/compat/compat_strl.c \
$(LIBRETRO_COMM_DIR)/compat/compat_strldup.c \
$(LIBRETRO_COMM_DIR)/encodings/encoding_utf.c
all: $(TARGET)
$(TARGET): $(SOURCES)
$(CC) $(CFLAGS) -o $@ $(SOURCES) $(LDFLAGS)
check: all
./$(TARGET)
clean:
rm -f $(TARGET)
.PHONY: all check clean