diff --git a/neotools/.gitignore b/neotools/.gitignore index 144b82f..c61056b 100644 --- a/neotools/.gitignore +++ b/neotools/.gitignore @@ -5,10 +5,6 @@ *.pcm *.wav -*.obj_*/ -*.o -*.d -CMakeLists.txt -adpcm -adpcmb -neoadpcmextract +.idea/ +build/ +cmake-build-*/ diff --git a/neotools/CMakeLists.txt b/neotools/CMakeLists.txt new file mode 100644 index 0000000..43789f0 --- /dev/null +++ b/neotools/CMakeLists.txt @@ -0,0 +1,18 @@ +project(neoadpcmtools) +cmake_minimum_required(VERSION "3.1" FATAL_ERROR) + +add_executable(adpcm adpcm.c) +target_compile_options(adpcm PRIVATE + -fomit-frame-pointer -Werror -Wall + -W -Wno-sign-compare -Wno-unused + -Wpointer-arith -Wbad-function-cast -Wcast-align -Waggregate-return + -pedantic + -Wshadow + -Wstrict-prototypes) +target_link_libraries(adpcm m) + +add_executable(adpcmb adpcmb.c) + +add_executable(neoadpcmextract autoextract.c neoadpcmextract.c) +set_property(TARGET neoadpcmextract PROPERTY C_STANDARD 99) +target_compile_options(neoadpcmextract PRIVATE -Wall -Wextra -pedantic) diff --git a/neotools/adpcm.Makefile b/neotools/adpcm.Makefile deleted file mode 100644 index 371766d..0000000 --- a/neotools/adpcm.Makefile +++ /dev/null @@ -1,34 +0,0 @@ -# Standard makefile to use as a base for DJGPP projects (not anymore lol) -# By MARTINEZ Fabrice aka SNK of SUPREMACY - -# Programs to use during make -LD := $(CC) - -TARGET := adpcm -SOURCE := adpcm.c - -# Flags for compilation -CFLAGS := -fomit-frame-pointer -O3 -Werror -Wall \ - -W -Wno-sign-compare -Wno-unused \ - -Wpointer-arith -Wbad-function-cast -Wcast-align -Waggregate-return \ - -pedantic \ - -Wshadow \ - -Wstrict-prototypes -LDFLAGS := -lm - -# Object files -OBJECT := $(SOURCE:%.c=%.o) - -# Make rules -all: $(TARGET) - -$(TARGET): $(OBJECT) - $(LD) $(CFLAGS) $(LDFLAGS) $^ -o $@ - -%.o: %.c - $(CC) $(CFLAGS) -c $< -o $@ - -# Rules to manage files -.PHONY: clean -clean: - rm -f $(TARGET) $(OBJECT) diff --git a/neotools/adpcmb.Makefile b/neotools/adpcmb.Makefile deleted file mode 100644 index e6677be..0000000 --- a/neotools/adpcmb.Makefile +++ /dev/null @@ -1,15 +0,0 @@ -CC = gcc -CFLAGS = -O3 - -SRC = . -OBJ = . - -OUT_OBJ = $(OBJ)/adpcmb - -all: $(OUT_OBJ) - -$(OBJ)/%.exe: $(SRC)/%.c - $(CC) $(CCFLAGS) $(MAINFLAGS) $< -o $@ - -clean: - rm $(OUT_OBJ) diff --git a/neotools/neoadpcmextract.Makefile b/neotools/neoadpcmextract.Makefile deleted file mode 100644 index 1249ee1..0000000 --- a/neotools/neoadpcmextract.Makefile +++ /dev/null @@ -1,27 +0,0 @@ -TARGET := neoadpcmextract -SOURCE := autoextract.c neoadpcmextract.c -CFLAGS := -std=c99 -O2 -pipe -Wall -Wextra -pedantic -LDFLAGS := $(CFLAGS) - - -OBJDIR := .obj_$(TARGET) -OBJECT := $(patsubst %.c, $(OBJDIR)/%.o, $(SOURCE)) -DEPEND := $(OBJECT:%.o=%.d) - -.PHONY: default all clean -default: $(TARGET) -all: $(TARGET) - -$(TARGET): $(OBJECT) - $(CC) $(LDFLAGS) $^ -o $@ - -$(OBJDIR): - mkdir -p $@ - -$(OBJDIR)/%.o: %.c | $(OBJDIR) - $(CC) $(CFLAGS) -MMD -c $< -o $@ - --include: $(DEPEND) - -clean: - rm -rf $(OBJDIR)