mirror of
https://github.com/libretro/RetroArch.git
synced 2026-11-23 00:36:42 -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.
25 lines
565 B
Makefile
25 lines
565 B
Makefile
CC ?= cc
|
|
PYTHON ?= python3
|
|
CFLAGS ?= -O2 -g1
|
|
CFLAGS += -Wall -Wextra -std=gnu89 -I../../.. -I../../../libretro-common/include
|
|
ifneq ($(SANITIZER),)
|
|
CFLAGS += -fsanitize=$(SANITIZER) -fno-omit-frame-pointer
|
|
endif
|
|
TARGET = hotkey_menu_test$(EXE)
|
|
|
|
all: $(TARGET)
|
|
|
|
driver_code.inc: extract.py ../../../input/input_driver.c
|
|
$(PYTHON) extract.py
|
|
|
|
$(TARGET): hotkey_menu_test.c driver_code.inc
|
|
$(CC) $(CFLAGS) hotkey_menu_test.c -o $@
|
|
|
|
check: $(TARGET)
|
|
$(RUNNER) ./$(TARGET)
|
|
|
|
clean:
|
|
rm -f driver_code.inc hotkey_menu_test hotkey_menu_test.exe
|
|
|
|
.PHONY: all check clean
|