diff options
author | David Phillips <dbphillipsnz@gmail.com> | 2015-07-03 16:18:00 +1200 |
---|---|---|
committer | David Phillips <dbphillipsnz@gmail.com> | 2015-07-03 16:18:00 +1200 |
commit | 6cdcd740ff956813cb444f2096abc414b624fd37 (patch) | |
tree | 7d2b196cad3ee43608ecc40dc7b83a58548a6e91 | |
parent | 3ff9e40c50565f5224e30cf73a370636700fd043 (diff) | |
download | cue-bin-split-6cdcd740ff956813cb444f2096abc414b624fd37.tar.xz |
Added config.mk
-rw-r--r-- | Makefile | 26 | ||||
-rw-r--r-- | config.mk | 2 | ||||
-rw-r--r-- | cue-bin-split.c (renamed from split.c) | 31 |
3 files changed, 52 insertions, 7 deletions
@@ -1,5 +1,25 @@ -CFLAGS += -Wall +# Makefile for cue-bin-split -all: split +.POSIX: +include config.mk -split: split.c +OBJECTS = cue-bin-split.o +CFLAGS += -Wall -Werror + + +all: cue-bin-split + +cue-bin-split: $(OBJECTS) + $(CC) -o $(EXEC_NAME) $< $(LDFLAGS) + +%.o: %.c + $(CC) -c -o $@ $< $(CFLAGS) + + +clean: + rm -f cue-bin-split + +distclean: clean + rm -f *.o + +.PHONY: all clean diff --git a/config.mk b/config.mk new file mode 100644 index 0000000..821eee9 --- /dev/null +++ b/config.mk @@ -0,0 +1,2 @@ +# Name of executable to be created +EXEC_NAME = cue-bin-split diff --git a/split.c b/cue-bin-split.c index c78b263..69423ae 100644 --- a/split.c +++ b/cue-bin-split.c @@ -1,10 +1,34 @@ +/* + * cue-bin-split - Split raw PCM files on time boundaries + * Copyright (c) 2015 David Phillips <dbphillipsnz@gmail.com> + * All rights reserved + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + #include <stdio.h> #include <stdlib.h> #include <assert.h> -/* Split.c - * Splits a raw audio file into segments bounded by the time specified on stdin */ - int main(int argc, char **argv) { FILE *fin = NULL; @@ -106,7 +130,6 @@ int main(int argc, char **argv) } } } else { - printf("Running to EOF\n"); for (i = (int)start_sample; ; i += items) { /* FIXME unnecessary call to fwrite with items == 0 possible */ |