[FE training-materials-updates] slides/autotools-advanced: slides about library versioning

Boris Brezillon boris.brezillon at free-electrons.com
Fri May 22 17:13:07 CEST 2015


Repository : git://git.free-electrons.com/training-materials.git

On branch  : mtd-rework-WIP
Link       : http://git.free-electrons.com/training-materials/commit/?id=2bfa7606abde1c44b2ea9af7a9fac61e0d33a851

>---------------------------------------------------------------

commit 2bfa7606abde1c44b2ea9af7a9fac61e0d33a851
Author: Thomas Petazzoni <thomas.petazzoni at free-electrons.com>
Date:   Wed May 20 15:35:37 2015 +0200

    slides/autotools-advanced: slides about library versioning
    
    Signed-off-by: Thomas Petazzoni <thomas.petazzoni at free-electrons.com>


>---------------------------------------------------------------

2bfa7606abde1c44b2ea9af7a9fac61e0d33a851
 slides/autotools-advanced/autotools-advanced.tex | 48 ++++++++++++++++++++++++
 1 file changed, 48 insertions(+)

diff --git a/slides/autotools-advanced/autotools-advanced.tex b/slides/autotools-advanced/autotools-advanced.tex
index d57c692..b4fa21e 100644
--- a/slides/autotools-advanced/autotools-advanced.tex
+++ b/slides/autotools-advanced/autotools-advanced.tex
@@ -818,6 +818,54 @@ $ find /tmp/test
 
 \end{frame}
 
+\begin{frame}{Libtool versioning}
+  \begin{itemize}
+  \item Needed to support changes in the library interface
+  \item Each system handles library versioning differently
+  \item \code{libtool} does not use the traditional
+    <major>.<minor>.<revision>
+  \item It uses a more abstract representation, converted differently
+    depending on the system on which you're building.
+  \item \code{libtool} representation is
+    \code{<current>:<revision>:<age>}
+    \begin{itemize}
+    \item \code{current} is the interface number, incremented whenever
+      the public interface changes
+    \item \code{revision} is incremented whenever the library source
+      code is changed
+    \item \code{age} is incremented when new functions are added,
+      reset to 0 when functions are removed
+    \end{itemize}
+  \item Defined using \code{-version-info <current>:<revision>:<age>}
+    in \code{<product>_LDFLAGS}
+  \end{itemize}
+\end{frame}
+
+\begin{frame}[fragile]{Libtool versioning: example}
+
+\begin{block}{Makefile.am}
+\begin{minted}{make}
+lib_LTLIBRARIES = libmyhello.la
+libmyhello_la_SOURCES = lib/core.c
+libmyhello_la_LDFLAGS = -version-info 3:4:2
+\end{minted}
+\end{block}
+
+\begin{block}{Installation}
+\begin{minted}[fontsize=\tiny]{console}
+$ make DESTDIR=/tmp/p install
+[...]
+$ ls -l /tmp/p/usr/local/lib
+-rw-r--r-- 1 thomas thomas  6224 mai   20 15:28 libmyhello.a
+-rwxr-xr-x 1 thomas thomas   963 mai   20 15:28 libmyhello.la
+lrwxrwxrwx 1 thomas thomas    19 mai   20 15:28 libmyhello.so -> libmyhello.so.1.2.4
+lrwxrwxrwx 1 thomas thomas    19 mai   20 15:28 libmyhello.so.1 -> libmyhello.so.1.2.4
+-rwxr-xr-x 1 thomas thomas 10608 mai   20 15:28 libmyhello.so.1.2.4
+\end{minted}
+\end{block}
+
+\end{frame}
+
 \subsection{Misc}
 
 \begin{frame}[fragile]{Global {\em automake} variables}



More information about the training-materials-updates mailing list