Files
RetroArch/samples/audio/bitstream/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

45 lines
971 B
Makefile

include ../../sample_objdir.mk
TARGET := bitstream_test
LIBRETRO_COMM_DIR := ../../../libretro-common
INCDIRS := -I$(LIBRETRO_COMM_DIR)/include -I../../..
SOURCES_C := \
bitstream_test.c \
../../../audio/audio_bitstream.c \
$(LIBRETRO_COMM_DIR)/formats/dts/rdts.c \
$(LIBRETRO_COMM_DIR)/formats/ac3/rac3_frame.c \
$(LIBRETRO_COMM_DIR)/formats/iec61937/iec61937.c
CFLAGS += -std=gnu99 -Wall -Wextra $(INCDIRS) -DHAVE_RDTS -DHAVE_RAC3
LDFLAGS += -lm
ifneq ($(SANITIZER),)
CFLAGS := -fsanitize=$(SANITIZER) -fno-omit-frame-pointer -g1 $(CFLAGS)
LDFLAGS := -fsanitize=$(SANITIZER) $(LDFLAGS)
endif
OBJS := $(call sample_objs,$(SOURCES_C:.c=.o))
all: $(TARGET)
$(TARGET): $(OBJS)
$(CC) -o $@ $^ $(LDFLAGS)
%.o: %.c
$(CC) $(CFLAGS) -c -o $@ $<
$(SAMPLE_OBJDIR)/%.o: $$(call sample_src,$$*).c
@mkdir -p $(@D)
$(CC) $(CFLAGS) -c -o $@ $<
check: $(TARGET)
./$(TARGET)
clean:
rm -rf $(SAMPLE_OBJDIR)
rm -f $(OBJS) $(TARGET)
.PHONY: all check clean