summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorNick Kurshev <nickols_k@mail.ru>2001-10-27 12:04:27 +0000
committerNick Kurshev <nickols_k@mail.ru>2001-10-27 12:04:27 +0000
commit0fd944424bf4e807b2d134e934ce0e1896f1d836 (patch)
treef2fa43326af378dfcb18e3f7537abe82898de066 /Makefile
parent9927c7ee0dcd9a1ac487ca7e88eb73aee59d20f1 (diff)
downloadffmpeg-0fd944424bf4e807b2d134e934ce0e1896f1d836.tar.gz
Shared objects support
Originally committed as revision 194 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile15
1 files changed, 11 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 0467f8d055..2e257a5593 100644
--- a/Makefile
+++ b/Makefile
@@ -18,17 +18,23 @@ EXT=
PROG=ffmpeg ffplay ffserver
endif
+ifeq ($(BUILD_SHARED),yes)
+FFMPEG_LIB=-Llibavcodec -lffmpeg
+else
+FFMPEG_LIB=libavcodec/libavcodec.a
+endif
+
all: lib $(PROG)
lib:
$(MAKE) -C libavcodec all
$(MAKE) -C libav all
-ffmpeg$(EXE): ffmpeg.o libav/libav.a libavcodec/libavcodec.a
- $(CC) $(LDFLAGS) -o $@ $^ -lm
+ffmpeg$(EXE): ffmpeg.o libav/libav.a
+ $(CC) $(LDFLAGS) -lm -o $@ $^ $(FFMPEG_LIB)
-ffserver$(EXE): ffserver.o libav/libav.a libavcodec/libavcodec.a
- $(CC) $(LDFLAGS) -o $@ $^ -lm
+ffserver$(EXE): ffserver.o libav/libav.a
+ $(CC) $(LDFLAGS) -lm -o $@ $^ $(FFMPEG_LIB)
ffplay: ffmpeg$(EXE)
ln -sf $< $@
@@ -37,6 +43,7 @@ ffplay: ffmpeg$(EXE)
$(CC) $(CFLAGS) -c -o $@ $<
install: all
+ $(MAKE) -C libavcodec install
install -s -m 755 $(PROG) $(prefix)/bin
ln -sf ffmpeg $(prefix)/bin/ffplay