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.
26 lines
676 B
Makefile
26 lines
676 B
Makefile
# midi/drivers/coremidi_queue.h: the CoreMIDI driver's lock-free input
|
|
# queue, which builds and runs anywhere.
|
|
|
|
TARGET := coremidi_queue_test
|
|
REPO_ROOT := ../../..
|
|
|
|
SOURCES := coremidi_queue_test.c
|
|
CFLAGS += -Wall -std=gnu99 -g1 -O1 -I$(REPO_ROOT) -I$(REPO_ROOT)/libretro-common/include
|
|
LDFLAGS += -lpthread
|
|
OBJS := $(SOURCES:.c=.o)
|
|
ifneq ($(SANITIZER),)
|
|
CFLAGS := -fsanitize=$(SANITIZER) -fno-omit-frame-pointer $(CFLAGS)
|
|
LDFLAGS := -fsanitize=$(SANITIZER) $(LDFLAGS)
|
|
endif
|
|
|
|
all: $(TARGET)
|
|
%.o: %.c
|
|
$(CC) -c -o $@ $< $(CFLAGS)
|
|
$(TARGET): $(OBJS)
|
|
$(CC) -o $@ $^ $(LDFLAGS)
|
|
check: $(TARGET)
|
|
./$(TARGET)
|
|
clean:
|
|
rm -f $(TARGET) $(OBJS)
|
|
.PHONY: all check clean
|