mirror of
https://github.com/libretro/RetroArch.git
synced 2026-11-22 21:09:34 -10:00
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.
35 lines
872 B
Makefile
35 lines
872 B
Makefile
TARGET := android_stylus_map_test
|
|
|
|
LIBRETRO_COMM_DIR := ../../../libretro-common
|
|
DRIVER_DIR := ../../../input/drivers
|
|
|
|
# The mapping decision is the driver's own (android_stylus_map.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_stylus_map_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_stylus_map_test.o: $(DRIVER_DIR)/android_stylus_map.h
|
|
|
|
check: all
|
|
./$(TARGET)
|
|
|
|
clean:
|
|
rm -f $(OBJS) $(TARGET)
|
|
|
|
.PHONY: all check clean
|