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

30 lines
745 B
Makefile

TARGET := keymaps_lut_test
REPO_ROOT := ../../..
# input/input_keymaps.c is compiled into the test (it reaches the
# file's static table); no platform's key headers are pulled in.
CFLAGS += -Wall -Wno-unused-function -std=gnu99 -g1 -O1 -DRARCH_INTERNAL \
-I$(REPO_ROOT)/libretro-common/include -I$(REPO_ROOT)
SOURCES := keymaps_lut_test.c \
$(REPO_ROOT)/libretro-common/compat/compat_strl.c
ifneq ($(SANITIZER),)
CFLAGS += -fsanitize=$(SANITIZER) -fno-omit-frame-pointer
LDFLAGS += -fsanitize=$(SANITIZER)
endif
all: $(TARGET)
$(TARGET): $(SOURCES) $(REPO_ROOT)/input/input_keymaps.c
$(CC) $(CFLAGS) -o $@ $(SOURCES) $(LDFLAGS)
check: all
./$(TARGET)
clean:
rm -f $(TARGET) $(TARGET).exe
.PHONY: all check clean