Drop some bogus Doxygen documentation.
[libav.git] / library.mak
CommitLineData
57b4a3dd 1include $(SRC_PATH)/common.mak
71c61f62
MR
2
3LIBVERSION := $(lib$(NAME)_VERSION)
4LIBMAJOR := $(lib$(NAME)_VERSION_MAJOR)
304b806c 5LIBMINOR := $(lib$(NAME)_VERSION_MINOR)
477b3382 6INCINSTDIR := $(INCDIR)/lib$(NAME)
71c61f62 7
b3fab1f2
JG
8INSTHEADERS := $(INSTHEADERS) $(HEADERS:%=$(SUBDIR)%)
9
451db983
MR
10all-$(CONFIG_STATIC): $(SUBDIR)$(LIBNAME)
11all-$(CONFIG_SHARED): $(SUBDIR)$(SLIBNAME)
12
c2626492
MR
13LIBOBJS := $(OBJS) $(SUBDIR)%.h.o $(TESTOBJS)
14$(LIBOBJS) $(LIBOBJS:.o=.i): CPPFLAGS += -DHAVE_AV_CONFIG_H
72c2bdeb 15
71c61f62 16$(SUBDIR)$(LIBNAME): $(OBJS)
50e10cbd 17 $(RM) $@
4436f25a 18 $(AR) $(ARFLAGS) $(AR_O) $^
71c61f62 19 $(RANLIB) $@
71c61f62 20
56540673
MR
21install-headers: install-lib$(NAME)-headers install-lib$(NAME)-pkgconfig
22
451db983
MR
23install-libs-$(CONFIG_STATIC): install-lib$(NAME)-static
24install-libs-$(CONFIG_SHARED): install-lib$(NAME)-shared
25
71c61f62 26define RULES
b339182e
DB
27$(TOOLS): THISLIB = $(FULLNAME:%=$(LD_LIB))
28$(TESTPROGS): THISLIB = $(SUBDIR)$(LIBNAME)
4b895cb2 29
b339182e 30$(TESTPROGS) $(TOOLS): %$(EXESUF): %.o $(EXEOBJS)
bb0babd7 31 $$(LD) $(LDFLAGS) $(LDEXEFLAGS) $$(LD_O) $$(filter %.o,$$^) $$(THISLIB) $(FFEXTRALIBS) $$(ELIBS)
3fd422ff 32
c5fd4b50
DB
33$(SUBDIR)lib$(NAME).ver: $(SUBDIR)lib$(NAME).v $(OBJS)
34 $$(M)sed 's/MAJOR/$(lib$(NAME)_VERSION_MAJOR)/' $$< | $(VERSION_SCRIPT_POSTPROCESS_CMD) > $$@
35
71c61f62 36$(SUBDIR)$(SLIBNAME): $(SUBDIR)$(SLIBNAME_WITH_MAJOR)
63611f31 37 $(Q)cd ./$(SUBDIR) && $(LN_S) $(SLIBNAME_WITH_MAJOR) $(SLIBNAME)
71c61f62 38
729f953f 39$(SUBDIR)$(SLIBNAME_WITH_MAJOR): $(OBJS) $(SUBDIR)lib$(NAME).ver $(DEP_LIBS)
71c61f62 40 $(SLIB_CREATE_DEF_CMD)
4436f25a 41 $$(LD) $(SHFLAGS) $(LDFLAGS) $$(LD_O) $$(filter %.o,$$^) $(FFEXTRALIBS)
71c61f62
MR
42 $(SLIB_EXTRA_CMD)
43
0c8cc2c4 44clean::
a6a750c7
DB
45 $(RM) $(addprefix $(SUBDIR),$(CLEANFILES) $(CLEANSUFFIXES) $(LIBSUFFIXES)) \
46 $(CLEANSUFFIXES:%=$(SUBDIR)$(ARCH)/%) $(CLEANSUFFIXES:%=$(SUBDIR)tests/%)
0c8cc2c4
MR
47
48distclean:: clean
a6a750c7
DB
49 $(RM) $(DISTCLEANSUFFIXES:%=$(SUBDIR)%) $(DISTCLEANSUFFIXES:%=$(SUBDIR)$(ARCH)/%) \
50 $(DISTCLEANSUFFIXES:%=$(SUBDIR)tests/%)
0c8cc2c4 51
71c61f62 52install-lib$(NAME)-shared: $(SUBDIR)$(SLIBNAME)
63611f31 53 $(Q)mkdir -p "$(SHLIBDIR)"
2f138f0b
MR
54 $$(INSTALL) -m 755 $$< "$(SHLIBDIR)/$(SLIB_INSTALL_NAME)"
55 $(Q)$(foreach F,$(SLIB_INSTALL_LINKS),cd "$(SHLIBDIR)" && $(LN_S) $(SLIB_INSTALL_NAME) $(F);)
56 $(if $(SLIB_INSTALL_EXTRA_SHLIB),$$(INSTALL) -m 644 $(SLIB_INSTALL_EXTRA_SHLIB:%=$(SUBDIR)%) "$(SHLIBDIR)")
57 $(if $(SLIB_INSTALL_EXTRA_LIB),$(Q)mkdir -p "$(LIBDIR)")
58 $(if $(SLIB_INSTALL_EXTRA_LIB),$$(INSTALL) -m 644 $(SLIB_INSTALL_EXTRA_LIB:%=$(SUBDIR)%) "$(LIBDIR)")
63611f31 59
71c61f62 60install-lib$(NAME)-static: $(SUBDIR)$(LIBNAME)
63611f31 61 $(Q)mkdir -p "$(LIBDIR)"
fd676deb 62 $$(INSTALL) -m 644 $$< "$(LIBDIR)"
6cfac0e9 63 $(LIB_INSTALL_EXTRA_CMD)
71c61f62 64
34512bca 65install-lib$(NAME)-headers: $(addprefix $(SUBDIR),$(HEADERS) $(BUILT_HEADERS))
63611f31 66 $(Q)mkdir -p "$(INCINSTDIR)"
34512bca
MR
67 $$(INSTALL) -m 644 $$^ "$(INCINSTDIR)"
68
69install-lib$(NAME)-pkgconfig: $(SUBDIR)lib$(NAME).pc
63611f31 70 $(Q)mkdir -p "$(LIBDIR)/pkgconfig"
34512bca 71 $$(INSTALL) -m 644 $$^ "$(LIBDIR)/pkgconfig"
d3cb93b3
RP
72
73uninstall-libs::
50e10cbd 74 -$(RM) "$(SHLIBDIR)/$(SLIBNAME_WITH_MAJOR)" \
d3cb93b3
RP
75 "$(SHLIBDIR)/$(SLIBNAME)" \
76 "$(SHLIBDIR)/$(SLIBNAME_WITH_VERSION)"
2f138f0b
MR
77 -$(RM) $(SLIB_INSTALL_EXTRA_SHLIB:%="$(SHLIBDIR)"%)
78 -$(RM) $(SLIB_INSTALL_EXTRA_LIB:%="$(LIBDIR)"%)
50e10cbd 79 -$(RM) "$(LIBDIR)/$(LIBNAME)"
d3cb93b3
RP
80
81uninstall-headers::
a2b4d1df 82 $(RM) $(addprefix "$(INCINSTDIR)/",$(HEADERS) $(BUILT_HEADERS))
50e10cbd 83 $(RM) "$(LIBDIR)/pkgconfig/lib$(NAME).pc"
a2b4d1df 84 -rmdir "$(INCINSTDIR)"
71c61f62
MR
85endef
86
87$(eval $(RULES))
3fd422ff 88
b339182e
DB
89$(TOOLS): $(DEP_LIBS) $(SUBDIR)$($(CONFIG_SHARED:yes=S)LIBNAME)
90$(TESTPROGS): $(DEP_LIBS) $(SUBDIR)$(LIBNAME)
bbba084b 91
3fd422ff 92testprogs: $(TESTPROGS)