Files
RetroArch/samples/frontend/thread_elevation/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

42 lines
1.1 KiB
Makefile

# The thread elevation chain runner, driven with a scripted backend
# list: the order backends are tried in, the thread id a brokered one
# is handed, and a pending request refused on its own thread carrying
# on with the rest of the chain.
#
# make check build and run
# make check SANITIZER=address,undefined
# make check SANITIZER=thread
TARGET := thread_elevation_test
CORE_DIR := ../../..
SANITIZER ?= $(SAN)
SOURCES_C := \
thread_elevation_test.c \
$(CORE_DIR)/frontend/thread_elevation.c \
$(CORE_DIR)/frontend/thread_elevation/eevdf.c \
$(CORE_DIR)/libretro-common/rthreads/rthreads.c
CFLAGS += -g1 -O1 -Wall -Wextra -std=c89 -pedantic -Wno-long-long \
-D_GNU_SOURCE -DHAVE_THREADS -DTHREAD_ELEVATION_BACKENDS_EXTERNAL \
-I$(CORE_DIR) -I$(CORE_DIR)/libretro-common/include
LDFLAGS += -lpthread
ifneq ($(SANITIZER),)
CFLAGS += -fsanitize=$(SANITIZER) -fno-omit-frame-pointer
LDFLAGS += -fsanitize=$(SANITIZER)
endif
all: $(TARGET)
$(TARGET): $(SOURCES_C)
$(CC) $(CFLAGS) -o $@ $(SOURCES_C) $(LDFLAGS)
check: $(TARGET)
./$(TARGET)
clean:
rm -f $(TARGET)
.PHONY: all check clean