diff options
author | Taylor Holberton <taylorcholberton@gmail.com> | 2016-10-01 12:33:46 -0400 |
---|---|---|
committer | Taylor Holberton <taylorcholberton@gmail.com> | 2016-10-01 12:33:46 -0400 |
commit | b88fd4ff9c6ae7af26c81b6fee069dc90ef2707d (patch) | |
tree | 9b4aff781116b8c812bcf7c7a70c9581b7c56fae | |
parent | c01d4a386cfc5997f877ae44712ea6304e8756bd (diff) |
put programs into utils dir
-rw-r--r-- | Makefile | 19 | ||||
-rw-r--r-- | utils/Makefile | 34 | ||||
-rw-r--r-- | utils/tinycap.c (renamed from tinycap.c) | 4 | ||||
-rw-r--r-- | utils/tinymix.c (renamed from tinymix.c) | 0 | ||||
-rw-r--r-- | utils/tinypcminfo.c (renamed from tinypcminfo.c) | 0 | ||||
-rw-r--r-- | utils/tinyplay.c (renamed from tinyplay.c) | 0 | ||||
-rw-r--r-- | utils/tinywavinfo.c (renamed from tinywavinfo.c) | 0 |
7 files changed, 41 insertions, 16 deletions
@@ -8,19 +8,8 @@ CROSS_COMPILE = PREFIX = /usr/local .PHONY: all -all: $(LIB) $(SHLIB) tinyplay tinycap tinymix tinypcminfo - -tinyplay: $(SHLIB) tinyplay.o - $(CROSS_COMPILE)$(CC) $(LDFLAGS) tinyplay.o -L. -ltinyalsa -o tinyplay - -tinycap: $(SHLIB) tinycap.o - $(CROSS_COMPILE)$(CC) $(LDFLAGS) tinycap.o -L. -ltinyalsa -o tinycap - -tinymix: $(SHLIB) tinymix.o - $(CROSS_COMPILE)$(CC) $(LDFLAGS) tinymix.o -L. -ltinyalsa -o tinymix - -tinypcminfo: $(SHLIB) tinypcminfo.o - $(CROSS_COMPILE)$(CC) $(LDFLAGS) tinypcminfo.o -L. -ltinyalsa -o tinypcminfo +all: $(LIB) $(SHLIB) + $(MAKE) -C utils $(SHLIB): $(OBJECTS) $(CROSS_COMPILE)$(CC) $(LDFLAGS) -shared $(OBJECTS) -o $(SHLIB) @@ -33,8 +22,8 @@ $(LIB): $(OBJECTS) .PHONY: clean clean: - -rm $(LIB) $(SHLIB) $(OBJECTS) tinyplay.o tinyplay tinycap.o tinycap \ - tinymix.o tinymix tinypcminfo.o tinypcminfo + -rm $(LIB) $(SHLIB) $(OBJECTS) + $(MAKE) -C utils clean .PHONY: install install: $(LIB) $(SHLIB) diff --git a/utils/Makefile b/utils/Makefile new file mode 100644 index 0000000..0270975 --- /dev/null +++ b/utils/Makefile @@ -0,0 +1,34 @@ +DESTDIR ?= +PREFIX ?= /usr/local +CROSS_COMPILE ?= + +CC = $(CROSS_COMPILE)gcc +CFLAGS ?= -Wall -Wextra -Werror -Wfatal-errors + +LD = $(CROSS_COMPILE)ld +LDFLAGS ?= + +.PHONY: all +all: tinyplay tinycap tinymix tinypcminfo + +tinyplay: tinyplay.c -ltinyalsa + +tinycap: tinycap.c -ltinyalsa + +tinymix: tinymix.c -ltinyalsa + +tinypcminfo: tinypcminfo.c -ltinyalsa + +.PHONY: clean +clean: + rm -f tinyplay tinycap + rm -f tinymix + rm -f tinypcminfo + +.PHONY: install +install: tinyplay tinycap tinymix tinypcminfo + cp -u tinyplay $(PREFIX)/bin/ + cp -u tinycap $(PREFIX)/bin/ + cp -u tinymix $(PREFIX)/bin/ + cp -u tinypcminfo $(PREFIX)/bin/ + diff --git a/tinycap.c b/utils/tinycap.c index 4e0e651..61d6b62 100644 --- a/tinycap.c +++ b/utils/tinycap.c @@ -66,7 +66,9 @@ unsigned int capture_sample(FILE *file, unsigned int card, unsigned int device, void sigint_handler(int sig) { - capturing = 0; + if (sig == SIGINT){ + capturing = 0; + } } int main(int argc, char **argv) diff --git a/tinymix.c b/utils/tinymix.c index 5966df9..5966df9 100644 --- a/tinymix.c +++ b/utils/tinymix.c diff --git a/tinypcminfo.c b/utils/tinypcminfo.c index 4eb0afa..4eb0afa 100644 --- a/tinypcminfo.c +++ b/utils/tinypcminfo.c diff --git a/tinyplay.c b/utils/tinyplay.c index 920b0e8..920b0e8 100644 --- a/tinyplay.c +++ b/utils/tinyplay.c diff --git a/tinywavinfo.c b/utils/tinywavinfo.c index 99ee5da..99ee5da 100644 --- a/tinywavinfo.c +++ b/utils/tinywavinfo.c |