Files
RetroArch/samples/runloop/auto_state_load/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

26 lines
705 B
Makefile

TARGET := auto_state_load_test
ROOT := ../../..
SOURCES := auto_state_load_test.c $(ROOT)/command.c \
$(ROOT)/libretro-common/compat/compat_strl.c
CFLAGS += -O2 -g1 -std=gnu89 -Wall -flto \
-ffunction-sections -fdata-sections \
-I$(ROOT) -I$(ROOT)/menu -I$(ROOT)/libretro-common/include $(EXTRA_CFLAGS)
LDFLAGS += -flto -Wl,--gc-sections
ifneq ($(SANITIZER),)
CFLAGS += -fsanitize=$(SANITIZER) -fno-omit-frame-pointer
LDFLAGS += -fsanitize=$(SANITIZER)
endif
all: $(TARGET)
$(TARGET): $(SOURCES) $(ROOT)/runloop.c $(ROOT)/runloop.h
$(CC) $(CFLAGS) $(SOURCES) -o $@ $(LDFLAGS)
check: $(TARGET)
./$(TARGET)
clean:
rm -f $(TARGET) $(TARGET).exe
.PHONY: all check clean