mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-08 15:30:14 +00:00
[Audio 4/?] Build Samplebanks, match Audiotable (#2032)
* [Audio 4/?] Build Samplebanks, match Audiotable * Fix some makefile formatting * Add missing scope in MARK chunk handling * Add comment to generate asm file when buffer bug data is emitted, remove duplicate CC4 definition * Adjust comment * SBCFLAGS * Remove unnecessary comments on notes_lut * Split build directories creation command into several to avoid it becoming too long * objcopy -j -> --only-section * Fix mkdir warning when extracted/VERSION/assets doesn't exist
This commit is contained in:
parent
c8ec6042e1
commit
d3b9ba17da
16 changed files with 1795 additions and 15 deletions
|
@ -1,14 +1,44 @@
|
|||
PROGRAMS := sbc
|
||||
|
||||
ifeq ($(shell which xml2-config),)
|
||||
$(error xml2-config not found. Did you install libxml2-dev?)
|
||||
endif
|
||||
|
||||
CLANG_FORMAT := clang-format-14
|
||||
FORMAT_ARGS := -i -style=file
|
||||
|
||||
CC := gcc
|
||||
CFLAGS := -Wall -Wextra -pedantic
|
||||
OPTFLAGS := -Og -g3
|
||||
|
||||
XML_CFLAGS := $(shell xml2-config --cflags)
|
||||
XML_LDFLAGS := $(shell xml2-config --libs)
|
||||
|
||||
.PHONY: all clean distclean format
|
||||
|
||||
all:
|
||||
all: $(PROGRAMS)
|
||||
$(MAKE) -C sampleconv
|
||||
|
||||
clean:
|
||||
$(RM) $(PROGRAMS)
|
||||
$(MAKE) -C sampleconv clean
|
||||
|
||||
distclean: clean
|
||||
$(MAKE) -C sampleconv distclean
|
||||
|
||||
format:
|
||||
$(CLANG_FORMAT) $(FORMAT_ARGS) $(shell find . -maxdepth 1 -type f -name "*.[ch]")
|
||||
$(MAKE) -C sampleconv format
|
||||
|
||||
sbc_SOURCES := samplebank_compiler.c samplebank.c aifc.c xml.c util.c
|
||||
|
||||
sbc_CFLAGS := $(XML_CFLAGS)
|
||||
|
||||
sbc_LDFLAGS := $(XML_LDFLAGS)
|
||||
|
||||
define COMPILE =
|
||||
$(1): $($1_SOURCES)
|
||||
$(CC) $(CFLAGS) $($1_CFLAGS) $$^ $($1_LDFLAGS) -o $$@
|
||||
endef
|
||||
|
||||
$(foreach p,$(PROGRAMS),$(eval $(call COMPILE,$(p))))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue