| 1 | define \n
|
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 | endef
|
|---|
| 5 |
|
|---|
| 6 | FFMPEG_VER=0.8.10
|
|---|
| 7 | FFMPEG_SRC=ffmpeg-${FFMPEG_VER}
|
|---|
| 8 | FFMPEG_LIBS=codec device filter format util
|
|---|
| 9 |
|
|---|
| 10 | ffmpeg-clean:
|
|---|
| 11 | rm -rf ${FFMPEG_SRC}-static libav*${FFMPEG_VER}*
|
|---|
| 12 |
|
|---|
| 13 | ffmpeg-get:
|
|---|
| 14 | git clone git://source.ffmpeg.org/ffmpeg.git ${FFMPEG_SRC}-static
|
|---|
| 15 | cp -r ${FFMPEG_SRC}-static ${FFMPEG_SRC}-shared
|
|---|
| 16 |
|
|---|
| 17 | ffmpeg-build:
|
|---|
| 18 | cd ${FFMPEG_SRC}-static && ./configure --disable-optimizations --disable-shared --enable-static && make -j
|
|---|
| 19 | cd ${FFMPEG_SRC}-shared && ./configure --disable-optimizations --disable-static --enable-shared && make -j
|
|---|
| 20 |
|
|---|
| 21 | # NOTE in this .so are in *-shared/ and .a are in *-static
|
|---|
| 22 | ffmpeg-softlink:
|
|---|
| 23 | $(foreach l,$(FFMPEG_LIBS),ln -s ${FFMPEG_SRC}-shared/libav$l/libav$l.so ./libav$l-${FFMPEG_VER}.so ${\n})
|
|---|
| 24 | $(foreach l,$(FFMPEG_LIBS),ln -s ${FFMPEG_SRC}-static/libav$l/libav$l.a ./libav$l-${FFMPEG_VER}.a ${\n})
|
|---|
| 25 |
|
|---|
| 26 | ffmpeg: ffmpeg-clean ffmpeg-get ffmpeg-build ffmpeg-softlink
|
|---|
| 27 |
|
|---|
| 28 | all: ffmpeg
|
|---|
| 29 |
|
|---|
| 30 | clean: ffmpeg-clean
|
|---|