mirror of https://github.com/FFmpeg/FFmpeg.git
Originally committed as revision 12760 to svn://svn.ffmpeg.org/ffmpeg/trunkpull/126/head
parent
c09ed33e18
commit
71c61f62a3
10 changed files with 198 additions and 231 deletions
@ -0,0 +1,75 @@ |
||||
SRC_DIR := $(SRC_PATH_BARE)/lib$(NAME)
|
||||
|
||||
include $(SUBDIR)../common.mak |
||||
|
||||
LIBVERSION := $(lib$(NAME)_VERSION)
|
||||
LIBMAJOR := $(lib$(NAME)_VERSION_MAJOR)
|
||||
|
||||
ifeq ($(BUILD_STATIC),yes) |
||||
all: $(SUBDIR)$(LIBNAME) |
||||
|
||||
install-libs: install-lib$(NAME)-static |
||||
|
||||
$(SUBDIR)$(LIBNAME): $(OBJS) |
||||
rm -f $@
|
||||
$(AR) rc $@ $^ $(EXTRAOBJS)
|
||||
$(RANLIB) $@
|
||||
endif |
||||
|
||||
INCINSTDIR := $(INCDIR)/lib$(NAME)
|
||||
|
||||
define RULES |
||||
ifeq ($(BUILD_SHARED),yes) |
||||
all: $(SUBDIR)$(SLIBNAME) |
||||
|
||||
install-libs: install-lib$(NAME)-shared |
||||
|
||||
$(SUBDIR)$(SLIBNAME): $(SUBDIR)$(SLIBNAME_WITH_MAJOR) |
||||
cd ./$(SUBDIR) && $(LN_S) $(SLIBNAME_WITH_MAJOR) $(SLIBNAME)
|
||||
|
||||
$(SUBDIR)$(SLIBNAME_WITH_MAJOR): $(OBJS) |
||||
$(SLIB_CREATE_DEF_CMD)
|
||||
$(CC) $(SHFLAGS) $(FFLDFLAGS) -o $$@ $$^ $(FFEXTRALIBS) $(EXTRAOBJS)
|
||||
$(SLIB_EXTRA_CMD)
|
||||
|
||||
ifneq ($(SUBDIR),) |
||||
$(SUBDIR)$(SLIBNAME_WITH_MAJOR): \
|
||||
$(foreach L,$(FFLIBS),lib$(L)/$(SLIBPREF)$(L)$(SLIBSUF))
|
||||
endif |
||||
endif |
||||
|
||||
install-lib$(NAME)-shared: $(SUBDIR)$(SLIBNAME) |
||||
install -d "$(SHLIBDIR)"
|
||||
install -m 755 $(SUBDIR)$(SLIBNAME) "$(SHLIBDIR)/$(SLIBNAME_WITH_VERSION)"
|
||||
$(STRIP) "$(SHLIBDIR)/$(SLIBNAME_WITH_VERSION)"
|
||||
cd "$(SHLIBDIR)" && \
|
||||
$(LN_S) $(SLIBNAME_WITH_VERSION) $(SLIBNAME_WITH_MAJOR)
|
||||
cd "$(SHLIBDIR)" && \
|
||||
$(LN_S) $(SLIBNAME_WITH_VERSION) $(SLIBNAME)
|
||||
$(SLIB_INSTALL_EXTRA_CMD)
|
||||
|
||||
install-lib$(NAME)-static: $(SUBDIR)$(LIBNAME) |
||||
install -d "$(LIBDIR)"
|
||||
install -m 644 $(SUBDIR)$(LIBNAME) "$(LIBDIR)"
|
||||
$(LIB_INSTALL_EXTRA_CMD)
|
||||
|
||||
install-headers:: |
||||
install -d "$(INCINSTDIR)"
|
||||
install -d "$(LIBDIR)/pkgconfig"
|
||||
install -m 644 $(addprefix "$(SRC_DIR)"/,$(HEADERS)) "$(INCINSTDIR)"
|
||||
install -m 644 $(BUILD_ROOT)/lib$(NAME).pc "$(LIBDIR)/pkgconfig"
|
||||
|
||||
uninstall-libs:: |
||||
-rm -f "$(SHLIBDIR)/$(SLIBNAME_WITH_MAJOR)" \
|
||||
"$(SHLIBDIR)/$(SLIBNAME)" \
|
||||
"$(SHLIBDIR)/$(SLIBNAME_WITH_VERSION)"
|
||||
-$(SLIB_UNINSTALL_EXTRA_CMD)
|
||||
-rm -f "$(LIBDIR)/$(LIBNAME)"
|
||||
|
||||
uninstall-headers:: |
||||
rm -f $(addprefix "$(INCINSTDIR)/",$(HEADERS))
|
||||
rm -f "$(LIBDIR)/pkgconfig/lib$(NAME).pc"
|
||||
-rmdir "$(INCDIR)"
|
||||
endef |
||||
|
||||
$(eval $(RULES)) |
Loading…
Reference in new issue