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

62 lines
1.6 KiB
Makefile

TARGET := net_retropad_repeat_test
# The Remote RetroPad core itself, driven by a frontend of a few
# callbacks, its messages read back over loopback.
# make && make check
REPO_ROOT := ../../..
LRC := $(REPO_ROOT)/libretro-common
CFLAGS += -Wall -std=gnu99 -g1 -O1 -I$(LRC)/include
ifneq ($(SANITIZER),)
CFLAGS += -fsanitize=$(SANITIZER) -fno-omit-frame-pointer
LDFLAGS += -fsanitize=$(SANITIZER)
endif
# undefined behaviour fails the run rather than being reported past
ifneq ($(findstring undefined,$(SANITIZER)),)
CFLAGS += -fno-sanitize-recover=undefined
LDFLAGS += -fno-sanitize-recover=undefined
endif
SOURCES := net_retropad_repeat_test.c \
$(REPO_ROOT)/cores/libretro-net-retropad/net_retropad_core.c \
$(LRC)/net/net_compat.c \
$(LRC)/net/net_socket.c \
$(LRC)/compat/compat_strl.c \
$(LRC)/compat/fopen_utf8.c \
$(LRC)/compat/compat_posix_string.c \
$(LRC)/encodings/encoding_utf.c \
$(LRC)/encodings/encoding_crc32.c \
$(LRC)/features/features_cpu.c \
$(LRC)/file/file_path.c \
$(LRC)/file/file_path_io.c \
$(LRC)/formats/json/rjson.c \
$(LRC)/streams/file_stream.c \
$(LRC)/string/rstrtod.c \
$(LRC)/streams/interface_stream.c \
$(LRC)/streams/memory_stream.c \
$(LRC)/string/stdstring.c \
$(LRC)/time/rtime.c \
$(LRC)/vfs/vfs_implementation.c
LIBS := -lm
ifneq ($(findstring mingw,$(CC)),)
LIBS += -lws2_32 -liphlpapi
endif
ifeq ($(OS),Windows_NT)
LIBS += -lws2_32 -liphlpapi
endif
all: $(TARGET)
$(TARGET): $(SOURCES)
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(SOURCES) $(LIBS)
check: all
./$(TARGET)
clean:
rm -f $(TARGET) $(TARGET).exe
.PHONY: all check clean