Files
RetroArch/samples/input/android_key_state/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
868 B
Makefile

TARGET := android_key_state_test
LIBRETRO_COMM_DIR := ../../../libretro-common
DRIVER_DIR := ../../../input/drivers
# The key-state writes are the driver's own (android_key_state.h, which
# takes no NDK types); the Android side of the pipeline is reproduced
# in the harness, because the driver only builds against the NDK.
SOURCES := android_key_state_test.c
OBJS := $(SOURCES:.c=.o)
CFLAGS += -Wall -Wextra -std=c89 -pedantic -g1 -O1 \
-I$(LIBRETRO_COMM_DIR)/include -I$(DRIVER_DIR)
ifneq ($(SANITIZER),)
CFLAGS := -fsanitize=$(SANITIZER) -fno-omit-frame-pointer $(CFLAGS)
LDFLAGS := -fsanitize=$(SANITIZER) $(LDFLAGS)
endif
all: $(TARGET)
$(TARGET): $(OBJS)
$(CC) -o $@ $(OBJS) $(LDFLAGS)
android_key_state_test.o: $(DRIVER_DIR)/android_key_state.h
check: all
./$(TARGET)
clean:
rm -f $(OBJS) $(TARGET)
.PHONY: all check clean