Skip to content

Commit

Permalink
configure: add an option to allow building only the libraries
Browse files Browse the repository at this point in the history
the --enable/disable-weston-binaries enables or disables the creation
of 'weston', 'weston-launch' and all the binaries that are
installed in $prefix/lib/libexec. This allows, together with
--enable-clients, to only build the libraries, making possible to
build and install different libweston versions at the same time.
  • Loading branch information
giucam committed Jul 9, 2015
1 parent 92eb96e commit d5e737d
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
15 changes: 15 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ nodist_libweston_@ABI_VERSION@_la_SOURCES = \

BUILT_SOURCES += $(nodist_libweston_@ABI_VERSION@_la_SOURCES)


if BUILD_WESTON_BINARIES
bin_PROGRAMS += weston

weston_LDFLAGS = -export-dynamic
Expand Down Expand Up @@ -135,6 +137,7 @@ nodist_weston_SOURCES = \
protocol/text-server-protocol.h \
protocol/input-method-protocol.c \
protocol/input-method-server-protocol.h
endif

BUILT_SOURCES += $(nodist_weston_SOURCES)

Expand Down Expand Up @@ -178,6 +181,7 @@ endif
.FORCE :

if BUILD_WESTON_LAUNCH
if BUILD_WESTON_BINARIES
bin_PROGRAMS += weston-launch
weston_launch_SOURCES = src/weston-launch.c src/weston-launch.h
weston_launch_CPPFLAGS = -DBINDIR='"$(bindir)"'
Expand All @@ -200,6 +204,7 @@ install-exec-hook:
false; \
fi
endif
endif # BUILD_WESTON_BINARIES

endif # BUILD_WESTON_LAUNCH

Expand Down Expand Up @@ -450,6 +455,7 @@ if BUILD_CLIENTS

bin_PROGRAMS += weston-terminal weston-info

if BUILD_WESTON_BINARIES
libexec_PROGRAMS += \
weston-desktop-shell \
weston-screenshooter \
Expand All @@ -460,6 +466,7 @@ if ENABLE_IVI_SHELL
libexec_PROGRAMS += \
weston-ivi-shell-user-interface
endif
endif

demo_clients = \
weston-flower \
Expand Down Expand Up @@ -579,13 +586,15 @@ weston_flower_SOURCES = clients/flower.c
weston_flower_LDADD = libtoytoolkit.la
weston_flower_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)

if BUILD_WESTON_BINARIES
weston_screenshooter_SOURCES = \
clients/screenshot.c
nodist_weston_screenshooter_SOURCES = \
protocol/screenshooter-protocol.c \
protocol/screenshooter-client-protocol.h
weston_screenshooter_LDADD = $(CLIENT_LIBS) libshared.la
weston_screenshooter_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
endif

weston_terminal_SOURCES = \
clients/terminal.c \
Expand Down Expand Up @@ -697,6 +706,7 @@ weston_editor_LDADD = libtoytoolkit.la $(PANGO_LIBS)
weston_editor_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS) $(PANGO_CFLAGS)
endif

if BUILD_WESTON_BINARIES
weston_keyboard_SOURCES = clients/keyboard.c
nodist_weston_keyboard_SOURCES = \
protocol/desktop-shell-client-protocol.h \
Expand All @@ -712,6 +722,7 @@ nodist_weston_simple_im_SOURCES = \
protocol/input-method-client-protocol.h
weston_simple_im_LDADD = $(CLIENT_LIBS)
weston_simple_im_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
endif

weston_info_SOURCES = \
clients/weston-info.c \
Expand All @@ -722,6 +733,7 @@ nodist_weston_info_SOURCES = \
weston_info_LDADD = $(WESTON_INFO_LIBS) libshared.la
weston_info_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)

if BUILD_WESTON_BINARIES
weston_desktop_shell_SOURCES = \
clients/desktop-shell.c \
shared/helpers.h
Expand All @@ -730,7 +742,9 @@ nodist_weston_desktop_shell_SOURCES = \
protocol/desktop-shell-protocol.c
weston_desktop_shell_LDADD = libtoytoolkit.la
weston_desktop_shell_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
endif

if BUILD_WESTON_BINARIES
if ENABLE_IVI_SHELL
weston_ivi_shell_user_interface_SOURCES = \
clients/ivi-shell-user-interface.c \
Expand All @@ -743,6 +757,7 @@ nodist_weston_ivi_shell_user_interface_SOURCES = \
weston_ivi_shell_user_interface_LDADD = libtoytoolkit.la
weston_ivi_shell_user_interface_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
endif
endif

if BUILD_FULL_GL_CLIENTS
demo_clients += weston-gears
Expand Down
8 changes: 8 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,12 @@ PKG_CHECK_MODULES(SYSTEMD_LOGIN_209, [libsystemd-login >= 209],
AS_IF([test "x$have_systemd_login_209" = "xyes"],
[AC_DEFINE([HAVE_SYSTEMD_LOGIN_209], [1], [Have systemd-login >= 209])])

AC_ARG_ENABLE(weston-binaries,
AS_HELP_STRING([--enable-weston-binaries],
[build the weston binaries]),,
enable_weston_binaries=yes)
AM_CONDITIONAL(BUILD_WESTON_BINARIES, test x$enable_weston_binaries == xyes)

AC_ARG_ENABLE(weston-launch, [ --enable-weston-launch],, enable_weston_launch=yes)
AM_CONDITIONAL(BUILD_WESTON_LAUNCH, test x$enable_weston_launch == xyes)
if test x$enable_weston_launch == xyes; then
Expand Down Expand Up @@ -517,6 +523,8 @@ AC_MSG_RESULT([
Native Backend ${WESTON_NATIVE_BACKEND}
setuid Install ${enable_setuid_install}
Buld the weston binaries ${enable_weston_binaries}
Cairo Renderer ${with_cairo}
EGL ${enable_egl}
libxkbcommon ${enable_xkbcommon}
Expand Down

0 comments on commit d5e737d

Please sign in to comment.