From 3a8d3f2e988c023769ebbdaa78574f07fecab625 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristian=20H=C3=B8gsberg?= Date: Fri, 7 Dec 2012 15:00:32 -0500 Subject: [PATCH] Link matrix.c into weston again We want to make sure that the matrix symbols are exported from weston and that modules get them from there. To do that, we pull matrix.[ch] out of libshared and back into weston. calibrator now also links to matrix.[ch] and we add a IN_WESTON define to enable the WL_EXPORT macro when compiled inside weston. --- clients/Makefile.am | 2 +- shared/Makefile.am | 4 +--- shared/matrix.c | 5 +++++ src/Makefile.am | 5 ++++- 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/clients/Makefile.am b/clients/Makefile.am index f2f90a83e..a4d09f91c 100644 --- a/clients/Makefile.am +++ b/clients/Makefile.am @@ -123,7 +123,7 @@ clickdot_LDADD = $(toolkit_libs) transformed_SOURCES = transformed.c transformed_LDADD = $(toolkit_libs) -calibrator_SOURCES = calibrator.c +calibrator_SOURCES = calibrator.c ../shared/matrix.c ../shared/matrix.h calibrator_LDADD = $(toolkit_libs) editor_SOURCES = \ diff --git a/shared/Makefile.am b/shared/Makefile.am index faf073dbe..b38cb95d9 100644 --- a/shared/Makefile.am +++ b/shared/Makefile.am @@ -7,9 +7,7 @@ libshared_la_SOURCES = \ option-parser.c \ config-parser.h \ os-compatibility.c \ - os-compatibility.h \ - matrix.c \ - matrix.h + os-compatibility.h libshared_cairo_la_CFLAGS = \ $(GCC_CFLAGS) \ diff --git a/shared/matrix.c b/shared/matrix.c index 91acdd3de..11b5b959a 100644 --- a/shared/matrix.c +++ b/shared/matrix.c @@ -24,7 +24,12 @@ #include #include #include + +#ifdef IN_WESTON #include +#else +#define WL_EXPORT +#endif #include "matrix.h" diff --git a/src/Makefile.am b/src/Makefile.am index 0d92194da..2eade1d38 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -4,7 +4,8 @@ bin_PROGRAMS = weston \ AM_CPPFLAGS = \ -DDATADIR='"$(datadir)"' \ -DMODULEDIR='"$(moduledir)"' \ - -DLIBEXECDIR='"$(libexecdir)"' + -DLIBEXECDIR='"$(libexecdir)"' \ + -DIN_WESTON weston_LDFLAGS = -export-dynamic weston_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS) @@ -35,6 +36,8 @@ weston_SOURCES = \ gl-renderer.h \ gl-renderer.c \ noop-renderer.c \ + ../shared/matrix.c \ + ../shared/matrix.h \ weston-launch.h \ weston-egl-ext.h