1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2024-11-15 06:06:04 +00:00
oot/tools/audio/sampleconv/Makefile
Tharo ef329e633a
[Audio 2/?] Extract audio samples to wav (#2020)
* [Audio 2/?] Extract audio samples to wav

Co-authored-by: zelda2774 <69368340+zelda2774@users.noreply.github.com>

* How

* Hopefully fix warning I don't get locally

* Pad default sample filenames, comment on the vadpcm frame encoder functions, other suggested changes

* Small tweaks to above

* Remove some obsolete code

---------

Co-authored-by: zelda2774 <69368340+zelda2774@users.noreply.github.com>
2024-08-08 22:39:18 -04:00

36 lines
762 B
Makefile

CC := gcc
CFLAGS := -Wall -Wextra -MMD
OPTFLAGS := -Og -g3
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)