diff --git a/neotools/.gitignore b/neotools/.gitignore index d68123b..144b82f 100644 --- a/neotools/.gitignore +++ b/neotools/.gitignore @@ -5,7 +5,10 @@ *.pcm *.wav +*.obj_*/ *.o +*.d +CMakeLists.txt adpcm adpcmb neoadpcmextract diff --git a/neotools/neoadpcmextract.Makefile b/neotools/neoadpcmextract.Makefile index e6fe428..1249ee1 100644 --- a/neotools/neoadpcmextract.Makefile +++ b/neotools/neoadpcmextract.Makefile @@ -4,7 +4,8 @@ CFLAGS := -std=c99 -O2 -pipe -Wall -Wextra -pedantic LDFLAGS := $(CFLAGS) -OBJECT := $(SOURCE:%.c=%.o) +OBJDIR := .obj_$(TARGET) +OBJECT := $(patsubst %.c, $(OBJDIR)/%.o, $(SOURCE)) DEPEND := $(OBJECT:%.o=%.d) .PHONY: default all clean @@ -14,10 +15,13 @@ all: $(TARGET) $(TARGET): $(OBJECT) $(CC) $(LDFLAGS) $^ -o $@ -%.o: %.c +$(OBJDIR): + mkdir -p $@ + +$(OBJDIR)/%.o: %.c | $(OBJDIR) $(CC) $(CFLAGS) -MMD -c $< -o $@ -include: $(DEPEND) clean: - rm -f $(TARGET) $(OBJECT) $(DEPEND) + rm -rf $(OBJDIR) diff --git a/neotools/neoadpcmextract.h b/neotools/neoadpcmextract.h new file mode 100644 index 0000000..b55222f --- /dev/null +++ b/neotools/neoadpcmextract.h @@ -0,0 +1,8 @@ +#ifndef __NEOADPCMEXTRACT_H__ +#define __NEOADPCMEXTRACT_H__ + +#include + +int vgmExtractSamples(FILE* file); + +#endif//__NEOADPCMEXTRACT_H__