1 SRC_DIR
:= $(SRC_PATH_BARE
)/lib
$(NAME
)
3 include $(SUBDIR
)..
/common.mak
5 LIBVERSION
:= $(lib
$(NAME
)_VERSION
)
6 LIBMAJOR
:= $(lib
$(NAME
)_VERSION_MAJOR
)
8 ifeq ($(BUILD_STATIC
),yes
)
9 all: $(SUBDIR
)$(LIBNAME
)
11 install-libs
: install-lib
$(NAME
)-static
13 $(SUBDIR
)$(LIBNAME
): $(OBJS
)
15 $(AR
) rc
$@
$^
$(EXTRAOBJS
)
19 INCINSTDIR
:= $(INCDIR
)/lib
$(NAME
)
23 all: $(SUBDIR
)$(SLIBNAME
)
25 install-libs
: install-lib
$(NAME
)-shared
27 $(SUBDIR
)$(SLIBNAME
): $(SUBDIR
)$(SLIBNAME_WITH_MAJOR
)
28 cd .
/$(SUBDIR
) && $(LN_S
) $(SLIBNAME_WITH_MAJOR
) $(SLIBNAME
)
30 $(SUBDIR
)$(SLIBNAME_WITH_MAJOR
): $(OBJS
)
31 $(SLIB_CREATE_DEF_CMD
)
32 $(CC
) $(SHFLAGS
) $(FFLDFLAGS
) -o
$$@
$$^
$(FFEXTRALIBS
) $(EXTRAOBJS
)
36 $(SUBDIR
)$(SLIBNAME_WITH_MAJOR
): $(DEP_LIBS
)
40 install-lib
$(NAME
)-shared
: $(SUBDIR
)$(SLIBNAME
)
41 install -d
"$(SHLIBDIR)"
42 install -m
755 $(SUBDIR
)$(SLIBNAME
) "$(SHLIBDIR)/$(SLIBNAME_WITH_VERSION)"
43 $(STRIP
) "$(SHLIBDIR)/$(SLIBNAME_WITH_VERSION)"
45 $(LN_S
) $(SLIBNAME_WITH_VERSION
) $(SLIBNAME_WITH_MAJOR
)
47 $(LN_S
) $(SLIBNAME_WITH_VERSION
) $(SLIBNAME
)
48 $(SLIB_INSTALL_EXTRA_CMD
)
50 install-lib
$(NAME
)-static
: $(SUBDIR
)$(LIBNAME
)
51 install -d
"$(LIBDIR)"
52 install -m
644 $(SUBDIR
)$(LIBNAME
) "$(LIBDIR)"
53 $(LIB_INSTALL_EXTRA_CMD
)
56 install -d
"$(INCINSTDIR)"
57 install -d
"$(LIBDIR)/pkgconfig"
58 install -m
644 $(addprefix "$(SRC_DIR)"/,$(HEADERS
)) "$(INCINSTDIR)"
59 install -m
644 $(BUILD_ROOT
)/lib
$(NAME
)/lib
$(NAME
).
pc "$(LIBDIR)/pkgconfig"
62 -rm -f
"$(SHLIBDIR)/$(SLIBNAME_WITH_MAJOR)" \
63 "$(SHLIBDIR)/$(SLIBNAME)" \
64 "$(SHLIBDIR)/$(SLIBNAME_WITH_VERSION)"
65 -$(SLIB_UNINSTALL_EXTRA_CMD
)
66 -rm -f
"$(LIBDIR)/$(LIBNAME)"
69 rm -f
$(addprefix "$(INCINSTDIR)/",$(HEADERS
))
70 rm -f
"$(LIBDIR)/pkgconfig/lib$(NAME).pc"