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

Giulio Camuffo giuliocamuffo at gmail.com
Thu Dec 4 13:01:12 PST 2014


---
 Makefile.am | 30 +++++++++++++++++++-----------
 src/input.c |  2 +-
 2 files changed, 20 insertions(+), 12 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index acb7d1f..d6bd6aa 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -45,17 +45,14 @@ AM_CPPFLAGS = 					\
 
 CLEANFILES = weston.ini ivi-shell/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					\
@@ -69,13 +66,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	\
@@ -91,7 +87,19 @@ nodist_weston_SOURCES =					\
 	protocol/scaler-protocol.c			\
 	protocol/scaler-server-protocol.h
 
-BUILT_SOURCES += $(nodist_weston_SOURCES)
+BUILT_SOURCES += $(nodist_libweston_la_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
diff --git a/src/input.c b/src/input.c
index 59943fe..4ab82e1 100644
--- a/src/input.c
+++ b/src/input.c
@@ -1887,7 +1887,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