Files
RetroArch/samples/input/device_registry/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

35 lines
820 B
Makefile

TARGET := device_registry_test
LIBRETRO_COMM_DIR := ../../../libretro-common
INPUT_DIR := ../../../input
# The registry is the frontend's own (input_registry.h, which takes no
# driver, settings or libretro types); the drivers that report
# controllers are reproduced in the harness.
SOURCES := device_registry_test.c
OBJS := $(SOURCES:.c=.o)
CFLAGS += -Wall -Wextra -std=c89 -pedantic -g1 -O1 \
-I$(LIBRETRO_COMM_DIR)/include -I$(INPUT_DIR)
ifneq ($(SANITIZER),)
CFLAGS := -fsanitize=$(SANITIZER) -fno-omit-frame-pointer $(CFLAGS)
LDFLAGS := -fsanitize=$(SANITIZER) $(LDFLAGS)
endif
all: $(TARGET)
$(TARGET): $(OBJS)
$(CC) -o $@ $(OBJS) $(LDFLAGS)
device_registry_test.o: $(INPUT_DIR)/input_registry.h
check: all
./$(TARGET)
clean:
rm -f $(OBJS) $(TARGET)
.PHONY: all check clean