-
Notifications
You must be signed in to change notification settings - Fork 11
/
Makefile
71 lines (54 loc) · 1.96 KB
/
Makefile
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
include config.mak
TOPDIR=$(CURDIR)
export CFLAGS=-Wall -pedantic -O3 -ftree-vectorize -I$(TOPDIR)/libaacenc -I$(TOPDIR)/libbitbuf -I$(TOPDIR)/libfr -I$(TOPDIR)/libsbrenc -I$(TOPDIR)/libresamp $(EXTRACFLAGS)
SUBDIRS=libaacenc libbitbuf libfr libsbrenc libresamp
LIBS=libaacenc/libaacenc.a libbitbuf/libbitbuf.a libfr/libfr.a libsbrenc/libsbrenc.a libresamp/libresamp.a
TARGET=aacplusenc
LDFLAGS=-L$(TOPDIR)/libaacenc -L$(TOPDIR)/libbitbuf -L$(TOPDIR)/libfr -L$(TOPDIR)/libsbrenc -L$(TOPDIR)/libresamp
LDLIBS=-laacenc -lbitbuf -lfr -lsbrenc -lresamp -lm
ifdef FFTW3
LDLIBS+=-lfftw3f
endif
INSTDIR=/usr/local
%.a:
$(MAKE) -C $$(dirname $*)
all: config.h $(TARGET)
$(TARGET): $(LIBS) au_channel.h adts.h aacplusenc.c
for i in $(LIBS) ; do \
$(MAKE) $$i ;\
done
$(CC) $(CFLAGS) -o $(TARGET) aacplusenc.c $(LDFLAGS) $(LDLIBS)
.PHONY: clean test
clean:
rm -f $(ofiles) $(TARGET) config.* test-*
for i in $(SUBDIRS) ; do \
$(MAKE) -C $$i clean ;\
done
install: all
mkdir -p $(INSTDIR)/bin
cp aacplusenc $(INSTDIR)/bin
strip -s -R.comment $(INSTDIR)/bin/aacplusenc
MONO:=pan=1:0.5:0.5:channels=1
MPLAYER:=mplayer -msglevel all=0:statusline=5
AO:=-ao pcm:fast:file
test: all
$(MPLAYER) -af lavcresample=32000:$(MONO) $(AO)=test32m.wav test.wav
$(MPLAYER) -af lavcresample=44100:$(MONO) $(AO)=test44m.wav test.wav
$(MPLAYER) -af lavcresample=48000:$(MONO) $(AO)=test48m.wav test.wav
$(MPLAYER) -af lavcresample=32000 $(AO)=test32s.wav test.wav
$(MPLAYER) -af lavcresample=44100 $(AO)=test44s.wav test.wav
$(MPLAYER) -af lavcresample=48000 $(AO)=test48s.wav test.wav
./aacplusenc test32m.wav test32m.aac 18
./aacplusenc test44m.wav test44m.aac 40
./aacplusenc test48m.wav test48m.aac 40
./aacplusenc test32s.wav test32s.aac 18
./aacplusenc test44s.wav test44s.aac 48
./aacplusenc test48s.wav test48s.aac 48
$(MPLAYER) test32m.aac
$(MPLAYER) test44m.aac
$(MPLAYER) test48m.aac
$(MPLAYER) test32s.aac
$(MPLAYER) test44s.aac
$(MPLAYER) test48s.aac
config.mak:
./configure