mirror of
https://github.com/zeldaret/oot.git
synced 2025-01-15 21:07:15 +00:00
df5d4cb467
* Introduce afile_sizes, generate headers of sizes for soundfonts and sequences * Initial tools/audio README * Versioning for samplebank extraction * Clean up the disassemble_sequence.py runnable interface * Add static assertions for maximum bank sizes * Boost optimization for audio tools * Samplebank XML doc * Soundfont XML doc * More docs in sampleconv for vadpcm * Various tools fixes/cleanup * VADPCM doc * Try to fix md formatting * VADPCM doc can come later * Fix merge with PR 9 * Fix blobs from MM * Try to fix bss * Try fix bss round 2 * Fix sampleconv memset bug * Suggested documentation tweaks
36 lines
758 B
Makefile
36 lines
758 B
Makefile
|
|
CC := gcc
|
|
CFLAGS := -Wall -Wextra -MMD
|
|
OPTFLAGS := -O3
|
|
LDFLAGS :=
|
|
|
|
CLANG_FORMAT := clang-format-14
|
|
FORMAT_ARGS := -i -style=file
|
|
|
|
SRC_DIRS := $(shell find src -type d)
|
|
C_FILES := $(foreach dir,$(SRC_DIRS),$(wildcard $(dir)/*.c))
|
|
O_FILES := $(foreach f,$(C_FILES:.c=.o),build/$f)
|
|
|
|
DEP_FILES := $(foreach f,$(C_FILES:.c=.d),build/$f)
|
|
|
|
$(shell mkdir -p build $(foreach dir,$(SRC_DIRS),build/$(dir)))
|
|
|
|
.PHONY: all clean distclean format
|
|
|
|
all: sampleconv
|
|
|
|
clean:
|
|
$(RM) -rf build sampleconv
|
|
|
|
distclean: clean
|
|
|
|
format:
|
|
$(CLANG_FORMAT) $(FORMAT_ARGS) $(C_FILES) $(foreach dir,$(SRC_DIRS),$(wildcard $(dir)/*.h))
|
|
|
|
sampleconv: $(O_FILES)
|
|
$(CC) $(LDFLAGS) $(O_FILES) -lm -o $@
|
|
|
|
build/src/%.o: src/%.c
|
|
$(CC) -c $(CFLAGS) $(OPTFLAGS) $< -o $@
|
|
|
|
-include $(DEP_FILES)
|