Commit 7a043999 authored by michaelni's avatar michaelni

Shared library for libavformat support patch by (Tim Allen <tim at proximity dot com dot au>)


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@2033 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent e9463442
...@@ -39,7 +39,7 @@ EXTRALIBS+=-lmedia -lbe ...@@ -39,7 +39,7 @@ EXTRALIBS+=-lmedia -lbe
endif endif
ifeq ($(BUILD_SHARED),yes) 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 else
DEP_LIBS=libavcodec/$(LIBPREF)avcodec$(LIBSUF) libavformat/$(LIBPREF)avformat$(LIBSUF) DEP_LIBS=libavcodec/$(LIBPREF)avcodec$(LIBSUF) libavformat/$(LIBPREF)avformat$(LIBSUF)
ifeq ($(CONFIG_MP3LAME),yes) ifeq ($(CONFIG_MP3LAME),yes)
...@@ -109,6 +109,7 @@ videohook: .libs ...@@ -109,6 +109,7 @@ videohook: .libs
install: all $(INSTALLVHOOK) install: all $(INSTALLVHOOK)
$(MAKE) -C libavcodec install $(MAKE) -C libavcodec install
$(MAKE) -C libavformat install
install -d $(prefix)/bin install -d $(prefix)/bin
install -c -s -m 755 $(PROG) $(prefix)/bin install -c -s -m 755 $(PROG) $(prefix)/bin
......
...@@ -63,19 +63,39 @@ OBJS+= ogg.o ...@@ -63,19 +63,39 @@ OBJS+= ogg.o
endif endif
LIB= $(LIBPREF)avformat$(LIBSUF) LIB= $(LIBPREF)avformat$(LIBSUF)
ifeq ($(BUILD_SHARED),yes)
SLIB= $(SLIBPREF)avformat$(SLIBSUF)
endif
SRCS := $(OBJS:.o=.c) $(PPOBJS:.o=.cpp) SRCS := $(OBJS:.o=.c) $(PPOBJS:.o=.cpp)
all: $(LIB) all: $(LIB) $(SLIB)
$(LIB): $(OBJS) $(PPOBJS) $(LIB): $(OBJS) $(PPOBJS)
rm -f $@ rm -f $@
$(AR) rc $@ $(OBJS) $(PPOBJS) $(AR) rc $@ $(OBJS) $(PPOBJS)
$(RANLIB) $@ $(RANLIB) $@
$(SLIB): $(OBJS)
$(CC) $(SHFLAGS) -o $@ $(OBJS) $(EXTRALIBS) $(AMREXTRALIBS)
depend: $(SRCS) depend: $(SRCS)
$(CC) -MM $(CFLAGS) $^ 1>.depend $(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 installlib: all
install -m 644 $(LIB) $(prefix)/lib install -m 644 $(LIB) $(prefix)/lib
mkdir -p $(prefix)/include/ffmpeg mkdir -p $(prefix)/include/ffmpeg
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment