ac262505c1
Commit the accumulated working-tree changes as one snapshot. - Headless render: `--render OUT.png INPUT.wav` draws the spectrogram (full window, or `--pane` for the spectrogram pane only) to a PNG with no visible window. Options: `--annotations`/`--no-annotations`, `--annotation-opacity`, `--width`/`--height`. - mLnL annotations: parse the optional `mLnL` RIFF chunk (schema v2) and render tx_frame/assertion/control overlays, a timeline lane, and a waveform-scope echo, with hover tooltips on the spectrogram, timeline, and scope. - sched_offset_ms: parse the per-frame intent->air latency and surface it in the hover tooltips (boxes stay air-anchored upstream). - Supporting: build wiring (rspektrum.make), shared types/headers, web-build and capture-script tweaks, and removal of the old synchrosqueezing LaTeX doc. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
247 lines
7.1 KiB
Makefile
247 lines
7.1 KiB
Makefile
# GNU Make project makefile autogenerated by Premake
|
|
|
|
ifndef config
|
|
config=debug_x64
|
|
endif
|
|
|
|
ifndef verbose
|
|
SILENT = @
|
|
endif
|
|
|
|
.PHONY: clean prebuild
|
|
|
|
SHELLTYPE := posix
|
|
ifeq ($(shell echo "test"), "test")
|
|
SHELLTYPE := msdos
|
|
endif
|
|
|
|
# Configurations
|
|
# #############################################
|
|
|
|
ifeq ($(origin CC), default)
|
|
CC = gcc
|
|
endif
|
|
ifeq ($(origin CXX), default)
|
|
CXX = g++
|
|
endif
|
|
ifeq ($(origin AR), default)
|
|
AR = ar
|
|
endif
|
|
RESCOMP = windres
|
|
INCLUDES += -Isrc -Iinclude -Ibuild/external/raylib-master/src -Ibuild/external/raylib-master/src/external/miniaudio
|
|
FORCE_INCLUDE +=
|
|
ALL_CPPFLAGS += $(CPPFLAGS) -MD -MP $(DEFINES) $(INCLUDES)
|
|
ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)
|
|
LINKCMD = $(CXX) -o "$@" $(OBJECTS) $(RESOURCES) $(ALL_LDFLAGS) $(LIBS)
|
|
define PREBUILDCMDS
|
|
endef
|
|
define PRELINKCMDS
|
|
endef
|
|
define POSTBUILDCMDS
|
|
endef
|
|
|
|
ifeq ($(config),debug_x64)
|
|
TARGETDIR = bin/Debug
|
|
TARGET = $(TARGETDIR)/rspektrum
|
|
OBJDIR = obj/x64/Debug/rspektrum
|
|
DEFINES += -DDEBUG -DPLATFORM_DESKTOP -DGRAPHICS_API_OPENGL_33 -D_GLFW_X11
|
|
ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -m64 -Wshadow -g -std=c17
|
|
ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -m64 -Wshadow -g -std=c++17
|
|
LIBS += bin/Debug/libraylib.a -lpthread -lm -ldl -lrt -lX11
|
|
LDDEPS += bin/Debug/libraylib.a
|
|
ALL_LDFLAGS += $(LDFLAGS) -L/usr/lib64 -m64
|
|
|
|
else ifeq ($(config),debug_x86)
|
|
TARGETDIR = bin/Debug
|
|
TARGET = $(TARGETDIR)/rspektrum
|
|
OBJDIR = obj/x86/Debug/rspektrum
|
|
DEFINES += -DDEBUG -DPLATFORM_DESKTOP -DGRAPHICS_API_OPENGL_33 -D_GLFW_X11
|
|
ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -m32 -Wshadow -g -std=c17
|
|
ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -m32 -Wshadow -g -std=c++17
|
|
LIBS += bin/Debug/libraylib.a -lpthread -lm -ldl -lrt -lX11
|
|
LDDEPS += bin/Debug/libraylib.a
|
|
ALL_LDFLAGS += $(LDFLAGS) -L/usr/lib32 -m32
|
|
|
|
else ifeq ($(config),debug_arm64)
|
|
TARGETDIR = bin/Debug
|
|
TARGET = $(TARGETDIR)/rspektrum
|
|
OBJDIR = obj/ARM64/Debug/rspektrum
|
|
DEFINES += -DDEBUG -DPLATFORM_DESKTOP -DGRAPHICS_API_OPENGL_33 -D_GLFW_X11
|
|
ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -Wshadow -g -std=c17
|
|
ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -Wshadow -g -std=c++17
|
|
LIBS += bin/Debug/libraylib.a -lpthread -lm -ldl -lrt -lX11
|
|
LDDEPS += bin/Debug/libraylib.a
|
|
ALL_LDFLAGS += $(LDFLAGS)
|
|
|
|
else ifeq ($(config),release_x64)
|
|
TARGETDIR = bin/Release
|
|
TARGET = $(TARGETDIR)/rspektrum
|
|
OBJDIR = obj/x64/Release/rspektrum
|
|
DEFINES += -DNDEBUG -DPLATFORM_DESKTOP -DGRAPHICS_API_OPENGL_33 -D_GLFW_X11
|
|
ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -m64 -Wshadow -O2 -std=c17
|
|
ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -m64 -Wshadow -O2 -std=c++17
|
|
LIBS += bin/Release/libraylib.a -lpthread -lm -ldl -lrt -lX11
|
|
LDDEPS += bin/Release/libraylib.a
|
|
ALL_LDFLAGS += $(LDFLAGS) -L/usr/lib64 -m64 -s
|
|
|
|
else ifeq ($(config),release_x86)
|
|
TARGETDIR = bin/Release
|
|
TARGET = $(TARGETDIR)/rspektrum
|
|
OBJDIR = obj/x86/Release/rspektrum
|
|
DEFINES += -DNDEBUG -DPLATFORM_DESKTOP -DGRAPHICS_API_OPENGL_33 -D_GLFW_X11
|
|
ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -m32 -Wshadow -O2 -std=c17
|
|
ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -m32 -Wshadow -O2 -std=c++17
|
|
LIBS += bin/Release/libraylib.a -lpthread -lm -ldl -lrt -lX11
|
|
LDDEPS += bin/Release/libraylib.a
|
|
ALL_LDFLAGS += $(LDFLAGS) -L/usr/lib32 -m32 -s
|
|
|
|
else ifeq ($(config),release_arm64)
|
|
TARGETDIR = bin/Release
|
|
TARGET = $(TARGETDIR)/rspektrum
|
|
OBJDIR = obj/ARM64/Release/rspektrum
|
|
DEFINES += -DNDEBUG -DPLATFORM_DESKTOP -DGRAPHICS_API_OPENGL_33 -D_GLFW_X11
|
|
ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -Wshadow -O2 -std=c17
|
|
ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -Wshadow -O2 -std=c++17
|
|
LIBS += bin/Release/libraylib.a -lpthread -lm -ldl -lrt -lX11
|
|
LDDEPS += bin/Release/libraylib.a
|
|
ALL_LDFLAGS += $(LDFLAGS) -s
|
|
|
|
endif
|
|
|
|
# Per File Configurations
|
|
# #############################################
|
|
|
|
|
|
# File sets
|
|
# #############################################
|
|
|
|
GENERATED :=
|
|
OBJECTS :=
|
|
|
|
GENERATED += $(OBJDIR)/spectrogram.o
|
|
GENERATED += $(OBJDIR)/fft.o
|
|
GENERATED += $(OBJDIR)/stft.o
|
|
GENERATED += $(OBJDIR)/audio.o
|
|
GENERATED += $(OBJDIR)/render.o
|
|
GENERATED += $(OBJDIR)/ui.o
|
|
GENERATED += $(OBJDIR)/platform_linux.o
|
|
GENERATED += $(OBJDIR)/utils.o
|
|
GENERATED += $(OBJDIR)/primitives.o
|
|
GENERATED += $(OBJDIR)/mlnl.o
|
|
OBJECTS += $(OBJDIR)/spectrogram.o
|
|
OBJECTS += $(OBJDIR)/fft.o
|
|
OBJECTS += $(OBJDIR)/stft.o
|
|
OBJECTS += $(OBJDIR)/audio.o
|
|
OBJECTS += $(OBJDIR)/render.o
|
|
OBJECTS += $(OBJDIR)/ui.o
|
|
OBJECTS += $(OBJDIR)/platform_linux.o
|
|
OBJECTS += $(OBJDIR)/utils.o
|
|
OBJECTS += $(OBJDIR)/primitives.o
|
|
OBJECTS += $(OBJDIR)/mlnl.o
|
|
|
|
# Rules
|
|
# #############################################
|
|
|
|
all: $(TARGET)
|
|
@:
|
|
|
|
$(TARGET): $(GENERATED) $(OBJECTS) $(LDDEPS) | $(TARGETDIR)
|
|
$(PRELINKCMDS)
|
|
@echo Linking rspektrum
|
|
$(SILENT) $(LINKCMD)
|
|
$(POSTBUILDCMDS)
|
|
|
|
$(TARGETDIR):
|
|
@echo Creating $(TARGETDIR)
|
|
ifeq (posix,$(SHELLTYPE))
|
|
$(SILENT) mkdir -p $(TARGETDIR)
|
|
else
|
|
$(SILENT) mkdir $(subst /,\\,$(TARGETDIR))
|
|
endif
|
|
|
|
$(OBJDIR):
|
|
@echo Creating $(OBJDIR)
|
|
ifeq (posix,$(SHELLTYPE))
|
|
$(SILENT) mkdir -p $(OBJDIR)
|
|
else
|
|
$(SILENT) mkdir $(subst /,\\,$(OBJDIR))
|
|
endif
|
|
|
|
clean:
|
|
@echo Cleaning rspektrum
|
|
ifeq (posix,$(SHELLTYPE))
|
|
$(SILENT) rm -f $(TARGET)
|
|
$(SILENT) rm -rf $(GENERATED)
|
|
$(SILENT) rm -rf $(OBJDIR)
|
|
else
|
|
$(SILENT) if exist $(subst /,\\,$(TARGET)) del $(subst /,\\,$(TARGET))
|
|
$(SILENT) if exist $(subst /,\\,$(GENERATED)) del /s /q $(subst /,\\,$(GENERATED))
|
|
$(SILENT) if exist $(subst /,\\,$(OBJDIR)) rmdir /s /q $(subst /,\\,$(OBJDIR))
|
|
endif
|
|
|
|
prebuild: | $(OBJDIR)
|
|
$(PREBUILDCMDS)
|
|
|
|
ifneq (,$(PCH))
|
|
$(OBJECTS): $(GCH) | $(PCH_PLACEHOLDER)
|
|
$(GCH): $(PCH) | prebuild
|
|
@echo $(notdir $<)
|
|
$(SILENT) $(CXX) -x c++-header $(ALL_CXXFLAGS) -o "$@" -MF "$(@:%.gch=%.d)" -c "$<"
|
|
$(PCH_PLACEHOLDER): $(GCH) | $(OBJDIR)
|
|
ifeq (posix,$(SHELLTYPE))
|
|
$(SILENT) touch "$@"
|
|
else
|
|
$(SILENT) echo $null >> "$@"
|
|
endif
|
|
else
|
|
$(OBJECTS): | prebuild
|
|
endif
|
|
|
|
|
|
# File Rules
|
|
# #############################################
|
|
|
|
$(OBJDIR)/spectrogram.o: src/spectrogram.c
|
|
@echo "$(notdir $<)"
|
|
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<"
|
|
|
|
$(OBJDIR)/fft.o: src/fft.c
|
|
@echo "$(notdir $<)"
|
|
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<"
|
|
|
|
$(OBJDIR)/stft.o: src/stft.c
|
|
@echo "$(notdir $<)"
|
|
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<"
|
|
|
|
$(OBJDIR)/audio.o: src/audio.c
|
|
@echo "$(notdir $<)"
|
|
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<"
|
|
|
|
$(OBJDIR)/render.o: src/render.c
|
|
@echo "$(notdir $<)"
|
|
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<"
|
|
|
|
$(OBJDIR)/ui.o: src/ui.c
|
|
@echo "$(notdir $<)"
|
|
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<"
|
|
|
|
$(OBJDIR)/platform_linux.o: src/platform_linux.c
|
|
@echo "$(notdir $<)"
|
|
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<"
|
|
|
|
$(OBJDIR)/utils.o: src/utils.c
|
|
@echo "$(notdir $<)"
|
|
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<"
|
|
|
|
$(OBJDIR)/primitives.o: src/primitives.c
|
|
@echo "$(notdir $<)"
|
|
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<"
|
|
|
|
$(OBJDIR)/mlnl.o: src/mlnl.c
|
|
@echo "$(notdir $<)"
|
|
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<"
|
|
|
|
-include $(OBJECTS:%.o=%.d)
|
|
ifneq (,$(PCH))
|
|
-include $(PCH_PLACEHOLDER).d
|
|
endif |