sad

simple audio daemon
git clone git://git.2f30.org/sad
Log | Files | Refs | LICENSE

commit ae4a4c25d43cb372ccc56975f9fc84740dffcfaa
parent 707ec3a7587c370183990356f33d02c862b38e3b
Author: sin <sin@2f30.org>
Date:   Sat, 27 Dec 2014 15:07:02 +0000

Add config.def.h

Diffstat:
MMakefile | 28++++++++++++++++++----------
Aconfig.def.h | 4++++
Moutput.c | 6+-----
3 files changed, 23 insertions(+), 15 deletions(-)

diff --git a/Makefile b/Makefile @@ -19,16 +19,16 @@ all: $(BIN) $(BIN): $(OBJ) $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJ) $(LDLIBS) -sndio.o: sad.h -cmd.o: sad.h -mp3.o: sad.h -wav.o: sad.h -vorbis.o: sad.h -playlist.o: sad.h -sad.o: sad.h -decoder.o: sad.h -output.o: sad.h -fifo.o: sad.h +sndio.o: config.h sad.h +cmd.o: config.h sad.h +mp3.o: config.h sad.h +wav.o: config.h sad.h +vorbis.o: config.h sad.h +playlist.o: config.h sad.h +sad.o: config.h sad.h +decoder.o: config.h sad.h +output.o: config.h sad.h +fifo.o: config.h sad.h install: all mkdir -p $(DESTDIR)$(PREFIX)/bin @@ -39,3 +39,11 @@ uninstall: clean: rm -f $(BIN) $(OBJ) + +.SUFFIXES: .def.h + +.def.h.h: + cp $< $@ + +.PHONY: + all install uninstall clean diff --git a/config.def.h b/config.def.h @@ -0,0 +1,4 @@ +static Outputdesc Outputdescs[] = { + { "sndio", 16, 44100, 2, 1, &sndiooutput }, + { "fifo", 16, 44100, 2, 1, &fifooutput }, +}; diff --git a/output.c b/output.c @@ -17,11 +17,7 @@ typedef struct { Output *output; } Outputdesc; -/* TODO: should be moved to config.def.h */ -static Outputdesc Outputdescs[] = { - { "sndio", 16, 44100, 2, 1, &sndiooutput }, - { "fifo", 16, 44100, 2, 1, &fifooutput }, -}; +#include "config.h" static int inbits; static long inrate;