Files
RetroArch/samples/midi/fmsynth_queue/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

37 lines
990 B
Makefile

# The FM synth's MIDI event queue: writers and the audio thread at
# once, overflow, and where drops are reported. Includes the driver.
include ../../sample_objdir.mk
TARGET := fmsynth_queue_test
CORE_DIR := ../../..
LRC := $(CORE_DIR)/libretro-common
SOURCES := fmsynth_queue_test.c \
$(LRC)/rthreads/rthreads.c
CFLAGS += -Wall -std=gnu99 -g1 -O1 -D_GNU_SOURCE -DHAVE_THREADS \
-I$(CORE_DIR) -I$(CORE_DIR)/gfx -I$(LRC)/include
LDFLAGS += -lpthread -lm
OBJS := $(call sample_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)
$(SAMPLE_OBJDIR)/%.o: $$(call sample_src,$$*).c
@mkdir -p $(@D)
$(CC) -c -o $@ $< $(CFLAGS)
$(TARGET): $(OBJS)
$(CC) -o $@ $^ $(LDFLAGS)
check: $(TARGET)
./$(TARGET)
clean:
rm -rf $(SAMPLE_OBJDIR)
rm -f $(TARGET) $(OBJS)
.PHONY: all check clean