Skip to content

Commit

Permalink
Add test target in the Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
teknoraver committed Jun 2, 2010
1 parent 4b05aad commit 0e47966
Showing 1 changed file with 30 additions and 1 deletion.
31 changes: 30 additions & 1 deletion Makefile
Expand Up @@ -27,7 +27,7 @@ $(TARGET): $(LIBS) au_channel.h adts.h aacplusenc.c
done done
$(CC) $(CFLAGS) -o $(TARGET) aacplusenc.c $(LDFLAGS) $(CC) $(CFLAGS) -o $(TARGET) aacplusenc.c $(LDFLAGS)


.PHONY: clean .PHONY: clean test
clean: clean:
rm -f $(ofiles) $(TARGET) config.* test-* rm -f $(ofiles) $(TARGET) config.* test-*
for i in $(SUBDIRS) ; do \ for i in $(SUBDIRS) ; do \
Expand All @@ -39,5 +39,34 @@ install: all
cp aacplusenc $(INSTDIR)/bin cp aacplusenc $(INSTDIR)/bin
strip -s -R.comment $(INSTDIR)/bin/aacplusenc 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: config.mak:
./configure ./configure

0 comments on commit 0e47966

Please sign in to comment.