[PATCH weston 06/15] build a libweston.so used by the weston binary

Giulio Camuffo giuliocamuffo at gmail.com
Thu Nov 6 12:41:25 PST 2014


---
 Makefile.am | 28 ++++++++++++++++++----------
 src/input.c |  2 +-
 2 files changed, 19 insertions(+), 11 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 6dbb4c3..0e5e88d 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -38,17 +38,14 @@ AM_CPPFLAGS = 					\
 
 CLEANFILES = weston.ini $(BUILT_SOURCES)
 
-bin_PROGRAMS += weston
-
-weston_LDFLAGS = -export-dynamic
-weston_CPPFLAGS = $(AM_CPPFLAGS) -DIN_WESTON
-weston_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS) $(LIBUNWIND_CFLAGS)
-weston_LDADD = $(COMPOSITOR_LIBS) $(LIBUNWIND_LIBS) \
+lib_LTLIBRARIES = libweston.la
+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
 
-weston_SOURCES =					\
+libweston_la_SOURCES =           			\
 	src/git-version.h				\
-	src/log.c					\
 	src/compositor.c				\
 	src/compositor.h				\
 	src/input.c					\
@@ -62,13 +59,12 @@ weston_SOURCES =					\
 	src/noop-renderer.c				\
 	src/pixman-renderer.c				\
 	src/pixman-renderer.h				\
-	src/weston.c					\
 	shared/matrix.c					\
 	shared/matrix.h					\
 	shared/zalloc.h					\
 	src/weston-egl-ext.h
 
-nodist_weston_SOURCES =					\
+nodist_libweston_la_SOURCES =					\
 	protocol/screenshooter-protocol.c		\
 	protocol/screenshooter-server-protocol.h	\
 	protocol/text-cursor-position-protocol.c	\
@@ -86,6 +82,18 @@ nodist_weston_SOURCES =					\
 
 BUILT_SOURCES += $(nodist_weston_SOURCES)
 
+bin_PROGRAMS += weston
+
+weston_LDFLAGS = -export-dynamic
+weston_CPPFLAGS = $(AM_CPPFLAGS) -DIN_WESTON
+weston_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS) $(LIBUNWIND_CFLAGS)
+weston_LDADD = $(COMPOSITOR_LIBS) $(LIBUNWIND_LIBS) \
+	$(DLOPEN_LIBS) -lm libshared.la libweston.la
+
+weston_SOURCES =					\
+	src/weston.c					\
+	src/log.c
+
 # Track this dependency explicitly instead of using BUILT_SOURCES.  We
 # add BUILT_SOURCES to CLEANFILES, but we want to keep git-version.h
 # in case we're building from tarballs.
diff --git a/src/input.c b/src/input.c
index b504d06..c9d698c 100644
--- a/src/input.c
+++ b/src/input.c
@@ -1892,7 +1892,7 @@ bind_seat(struct wl_client *client, void *data, uint32_t version, uint32_t id)
 }
 
 #ifdef ENABLE_XKBCOMMON
-int
+WL_EXPORT int
 weston_compositor_xkb_init(struct weston_compositor *ec,
 			   struct xkb_rule_names *names)
 {
-- 
2.1.3



More information about the wayland-devel mailing list