summaryrefslogtreecommitdiffstats
path: root/Makefile
blob: 75e9f41285ba9d8ce6e5d4e39342274a7a6c6a4b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
CFLAGS=-Wall -O0 -g -W -Wno-unused-parameter `pkg-config --cflags liboil-0.3` -DRANDOM_PREFIX=sa -DOUTSIDE_SPEEX -D_GNU_SOURCE -pthread
LIBS=-lm `pkg-config --libs liboil-0.3`

SOURCES=common.c malloc.c oss.c bbuffer.c format.c volscale.c byteswap.c continued-fraction.c zero.c add.c speex/resample.c resample.c interleave.c converter.c g711.c mutex.c once.c thread.c
OBJS=$(SOURCES:.c=.o)

all: test-bufferq test-llist test-sine test-pull

test-bufferq: test-bufferq.o bufferq.o
	$(CC) $(CFLAGS) -o $@ $^

test-llist: test-llist.o
	$(CC) $(CFLAGS) -o $@ $^

test-sine: $(OBJS) test-sine.o
	$(CC) $(CFLAGS) -o $@ $^ $(LIBS)

test-pull: $(OBJS) test-pull.o
	$(CC) $(CFLAGS) -o $@ $^ $(LIBS)

*.o: *.h

indent:
	indent -bdfa -brf -kr -nbbo -nbc -ip0 -ppi 4 -cs -nbfde -npsl -br -brs -bap -i4 -bs -cdw -ce -npcs -hnl -cli4 -nut -ci8 < oss.c
#	astyle --indent=spaces=4 --brackets=attach --indent-switches  --max-instatement-indent=40 --pad=oper --unpad=paren --convert-tabs --mode=c < oss.c

clean:
	rm -f *.o meta-name-table.h test-bufferq test-llist test-sine core test-pull

common.o: meta-name-table.h

meta-name-table.h: meta-name-table.gperf Makefile
	gperf -t -N lookup_meta_name -H hash_meta_name -p -C < $< | sed -e 's/{""}/{"", 0}/g' > $@

fixme:
	find -name '*.c' -exec fgrep -H -A 3 -B 3 -i FIXME \{\} \;

update-speex:
	wget -O speex/speex_resampler.h http://svn.xiph.org/trunk/speex/include/speex/speex_resampler.h
	wget -O speex/resample.c http://svn.xiph.org/trunk/speex/libspeex/resample.c
	wget -O speex/arch.h http://svn.xiph.org/trunk/speex/libspeex/arch.h