summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Allen <tim@proximity.com.au>2003-07-11 21:33:27 +0000
committerMichael Niedermayer <michaelni@gmx.at>2003-07-11 21:33:27 +0000
commit6bc114b2fb026ff0c521caf206ad08fdb5910383 (patch)
treeb56174bf7a6186cc9d6f4b15e8972b9a045ee0b7
parent14b3225377998175b0ce1026432d179d34d179c0 (diff)
Shared library for libavformat support patch by (Tim Allen <tim at proximity dot com dot au>)
Originally committed as revision 2033 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--Makefile3
-rw-r--r--libavformat/Makefile22
2 files changed, 23 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 975aad5320..b0420c8a6a 100644
--- a/Makefile
+++ b/Makefile
@@ -39,7 +39,7 @@ EXTRALIBS+=-lmedia -lbe
endif
ifeq ($(BUILD_SHARED),yes)
-DEP_LIBS=libavcodec/$(SLIBPREF)avcodec$(SLIBSUF) libavformat/$(LIBPREF)avformat$(LIBSUF)
+DEP_LIBS=libavcodec/$(SLIBPREF)avcodec$(SLIBSUF) libavformat/$(SLIBPREF)avformat$(SLIBSUF)
else
DEP_LIBS=libavcodec/$(LIBPREF)avcodec$(LIBSUF) libavformat/$(LIBPREF)avformat$(LIBSUF)
ifeq ($(CONFIG_MP3LAME),yes)
@@ -109,6 +109,7 @@ videohook: .libs
install: all $(INSTALLVHOOK)
$(MAKE) -C libavcodec install
+ $(MAKE) -C libavformat install
install -d $(prefix)/bin
install -c -s -m 755 $(PROG) $(prefix)/bin
diff --git a/libavformat/Makefile b/libavformat/Makefile
index e5aa9c4a42..b689b8ead8 100644
--- a/libavformat/Makefile
+++ b/libavformat/Makefile
@@ -63,19 +63,39 @@ OBJS+= ogg.o
endif
LIB= $(LIBPREF)avformat$(LIBSUF)
+ifeq ($(BUILD_SHARED),yes)
+SLIB= $(SLIBPREF)avformat$(SLIBSUF)
+endif
SRCS := $(OBJS:.o=.c) $(PPOBJS:.o=.cpp)
-all: $(LIB)
+all: $(LIB) $(SLIB)
$(LIB): $(OBJS) $(PPOBJS)
rm -f $@
$(AR) rc $@ $(OBJS) $(PPOBJS)
$(RANLIB) $@
+$(SLIB): $(OBJS)
+ $(CC) $(SHFLAGS) -o $@ $(OBJS) $(EXTRALIBS) $(AMREXTRALIBS)
+
depend: $(SRCS)
$(CC) -MM $(CFLAGS) $^ 1>.depend
+install: all
+ifeq ($(BUILD_SHARED),yes)
+ install -d $(prefix)/lib
+ install -s -m 755 $(SLIB) $(prefix)/lib/libavformat-$(VERSION).so
+ ln -sf libavformat-$(VERSION).so $(prefix)/lib/libavformat.so
+ ldconfig || true
+ mkdir -p $(prefix)/include/ffmpeg
+ install -m 644 $(VPATH)/avformat.h $(prefix)/include/ffmpeg/avformat.h
+ install -m 644 $(VPATH)/avio.h $(prefix)/include/ffmpeg/avio.h
+ install -m 644 $(VPATH)/rtp.h $(prefix)/include/ffmpeg/rtp.h
+ install -m 644 $(VPATH)/rtsp.h $(prefix)/include/ffmpeg/rtsp.h
+ install -m 644 $(VPATH)/rtspcodes.h $(prefix)/include/ffmpeg/rtspcodes.h
+endif
+
installlib: all
install -m 644 $(LIB) $(prefix)/lib
mkdir -p $(prefix)/include/ffmpeg