[weston,v2,16/17] libweston: version the libweston .so's and the weston include and lib paths

Submitted by Giulio Camuffo on Dec. 4, 2014, 9:01 p.m.

Details

Message ID 1417726883-8305-17-git-send-email-giuliocamuffo@gmail.com
State Superseded
Headers show

Not browsing as part of any series.

Commit Message

Giulio Camuffo Dec. 4, 2014, 9:01 p.m.
To be able to install many libweston versions at the same time add a '-1'
to the .so's name, such as libweston-1.so. Additionally, add it also to the
weston sdk include directory and the lib/weston directory.
---
 Makefile.am | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

Patch hide | download patch | download mbox

diff --git a/Makefile.am b/Makefile.am
index 4ddfe34..5ca8179 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,9 +1,11 @@ 
 ACLOCAL_AMFLAGS = -I m4
 
+abi_version = 1
+
 bin_PROGRAMS =
 noinst_PROGRAMS =
 libexec_PROGRAMS =
-moduledir = $(libdir)/weston
+moduledir = $(libdir)/weston-$(abi_version)
 module_LTLIBRARIES =
 noinst_LTLIBRARIES =
 BUILT_SOURCES =
@@ -50,6 +52,7 @@  libweston_la_CPPFLAGS = $(AM_CPPFLAGS) -DIN_WESTON
 libweston_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS) $(LIBUNWIND_CFLAGS)
 libweston_la_LIBADD = $(COMPOSITOR_LIBS) $(LIBUNWIND_LIBS) \
 	$(DLOPEN_LIBS) -lm libshared.la
+libweston_la_LDFLAGS = -release $(abi_version)
 
 libweston_la_SOURCES =           			\
 	src/git-version.h				\
@@ -144,6 +147,7 @@  if BUILD_WESTON_LAUNCH
 lib_LTLIBRARIES += libweston-launcher.la
 libweston_launcher_la_CPPFLAGS = $(AM_CPPFLAGS)
 libweston_launcher_la_LIBADD = $(PAM_LIBS) $(SYSTEMD_LOGIN_LIBS) $(LIBDRM_LIBS)
+libweston_launcher_la_LDFLAGS = -release $(abi_version)
 libweston_launcher_la_CFLAGS =			\
 	$(GCC_CFLAGS)				\
 	$(PAM_CFLAGS)				\
@@ -172,7 +176,7 @@  endif # BUILD_WESTON_LAUNCH
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = src/weston.pc
 
-westonincludedir = $(includedir)/weston
+westonincludedir = $(includedir)/weston-$(abi_version)
 westoninclude_HEADERS =				\
 	src/version.h				\
 	src/compositor.h			\
@@ -881,6 +885,8 @@  libweston_xwayland_la_CFLAGS =			\
 	$(COMPOSITOR_CFLAGS)			\
 	$(PIXMAN_CFLAGS)			\
 	$(CAIRO_CFLAGS)
+libweston_xwayland_la_LDFLAGS = 		\
+	-release $(abi_version)
 libweston_xwayland_la_SOURCES =			\
 	xwayland/xwayland.h			\
 	xwayland/window-manager.c		\