diff options
author | Nick Kurshev <nickols_k@mail.ru> | 2001-10-27 12:04:27 +0000 |
---|---|---|
committer | Nick Kurshev <nickols_k@mail.ru> | 2001-10-27 12:04:27 +0000 |
commit | 0fd944424bf4e807b2d134e934ce0e1896f1d836 (patch) | |
tree | f2fa43326af378dfcb18e3f7537abe82898de066 /libavcodec | |
parent | 9927c7ee0dcd9a1ac487ca7e88eb73aee59d20f1 (diff) | |
download | ffmpeg-0fd944424bf4e807b2d134e934ce0e1896f1d836.tar.gz |
Shared objects support
Originally committed as revision 194 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/Makefile | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/libavcodec/Makefile b/libavcodec/Makefile index ad4f24873e..b2381714f6 100644 --- a/libavcodec/Makefile +++ b/libavcodec/Makefile @@ -39,15 +39,22 @@ endif SRCS = $(OBJS:.o=.c) $(ASM_OBJS:.o=.s) LIB= libavcodec.a +ifeq ($(BUILD_SHARED),yes) +SLIB= libffmpeg-$(VERSION).so +endif TESTS= imgresample-test dct-test motion-test -all: $(LIB) +all: $(LIB) $(SLIB) tests: apiexample cpuid_test $(TESTS) $(LIB): $(OBJS) $(ASM_OBJS) rm -f $@ $(AR) rcs $@ $(OBJS) $(ASM_OBJS) +$(SLIB): $(OBJS) $(ASM_OBJS) + rm -f $@ + $(CC) -shared -o $@ $(OBJS) $(ASM_OBJS) + ln -sf $@ libffmpeg.so dsputil.o: dsputil.c dsputil.h %.o: %.c @@ -63,7 +70,7 @@ depend: $(CC) -MM $(CFLAGS) $(SRCS) 1>.depend clean: - rm -f *.o *~ *.a i386/*.o i386/*~ \ + rm -f *.o *~ $(LIB) $(SLIB) *.so i386/*.o i386/*~ \ armv4l/*.o armv4l/*~ \ mlib/*.o mlib/*~ \ libac3/*.o libac3/*~ \ @@ -92,6 +99,13 @@ dct-test: dct-test.o jfdctfst.o i386/fdct_mmx.o \ motion-test: motion_test.o $(LIB) $(CC) -o $@ $^ +install: all +# install -s -m 644 $(LIB) $(prefix)/lib +ifeq ($(BUILD_SHARED),yes) + install -s -m 755 $(SLIB) $(prefix)/lib + ln -sf $(prefix)/lib/$(SLIB) $(prefix)/lib/libffmpeg.so + ldconfig +endif # # include dependency files if they exist # |