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

34 lines
808 B
Makefile

TARGET := linux_not_joystick_test
LIBRETRO_COMM_DIR := ../../../libretro-common
COMMON_DIR := ../../../input/common
# The rule set is the drivers' own (linux_not_joystick.h, which takes no
# libudev or evdev types), so nothing here needs a device or a display.
SOURCES := linux_not_joystick_test.c
OBJS := $(SOURCES:.c=.o)
CFLAGS += -Wall -Wextra -std=c89 -pedantic -g1 -O1 \
-I$(LIBRETRO_COMM_DIR)/include -I$(COMMON_DIR)
ifneq ($(SANITIZER),)
CFLAGS := -fsanitize=$(SANITIZER) -fno-omit-frame-pointer $(CFLAGS)
LDFLAGS := -fsanitize=$(SANITIZER) $(LDFLAGS)
endif
all: $(TARGET)
$(TARGET): $(OBJS)
$(CC) -o $@ $(OBJS) $(LDFLAGS)
linux_not_joystick_test.o: $(COMMON_DIR)/linux_not_joystick.h
check: all
./$(TARGET)
clean:
rm -f $(OBJS) $(TARGET)
.PHONY: all check clean