ivi-shell: add the shell plugin for In-Vehicle Infotainment system
[profile/ivi/weston-ivi-shell.git] / Makefile.am
index dc50da3..daa29f2 100644 (file)
@@ -1,3 +1,5 @@
+ACLOCAL_AMFLAGS = -I m4
+
 bin_PROGRAMS =
 noinst_PROGRAMS =
 libexec_PROGRAMS =
@@ -6,7 +8,8 @@ module_LTLIBRARIES =
 noinst_LTLIBRARIES =
 BUILT_SOURCES =
 
-DISTCHECK_CONFIGURE_FLAGS = --disable-setuid-install
+# Do not run xwayland test while it is known broken.
+AM_DISTCHECK_CONFIGURE_FLAGS = --disable-setuid-install --disable-xwayland-test
 
 EXTRA_DIST = weston.ini.in
 
@@ -50,8 +53,6 @@ weston_SOURCES =                                      \
        src/compositor.h                                \
        src/input.c                                     \
        src/data-device.c                               \
-       src/filter.c                                    \
-       src/filter.h                                    \
        src/screenshooter.c                             \
        src/clipboard.c                                 \
        src/zoom.c                                      \
@@ -181,12 +182,33 @@ x11_backend_la_CFLAGS =                           \
 x11_backend_la_SOURCES = src/compositor-x11.c
 endif
 
+INPUT_BACKEND_SOURCES = src/udev-input.h
+
+if ENABLE_LIBINPUT_BACKEND
+INPUT_BACKEND_LIBS = $(LIBINPUT_BACKEND_LIBS)
+INPUT_BACKEND_SOURCES +=                       \
+       src/libinput-seat.c                     \
+       src/libinput-seat.h                     \
+       src/libinput-device.c                   \
+       src/libinput-device.h
+else
+INPUT_BACKEND_SOURCES +=                       \
+       src/filter.c                            \
+       src/filter.h                            \
+       src/udev-seat.c                         \
+       src/udev-seat.h                         \
+       src/evdev.c                             \
+       src/evdev.h                             \
+       src/evdev-touchpad.c
+endif
+
 if ENABLE_DRM_COMPOSITOR
 module_LTLIBRARIES += drm-backend.la
 drm_backend_la_LDFLAGS = -module -avoid-version
 drm_backend_la_LIBADD =                                \
        $(COMPOSITOR_LIBS)                      \
        $(DRM_COMPOSITOR_LIBS)                  \
+       $(INPUT_BACKEND_LIBS)                   \
        libshared.la -lrt                       \
        libsession-helper.la
 drm_backend_la_CFLAGS =                                \
@@ -196,11 +218,7 @@ drm_backend_la_CFLAGS =                            \
        $(GCC_CFLAGS)
 drm_backend_la_SOURCES =                       \
        src/compositor-drm.c                    \
-       src/udev-seat.c                         \
-       src/udev-seat.h                         \
-       src/evdev.c                             \
-       src/evdev.h                             \
-       src/evdev-touchpad.c                    \
+       $(INPUT_BACKEND_SOURCES)                \
        src/libbacklight.c                      \
        src/libbacklight.h
 
@@ -226,6 +244,9 @@ wayland_backend_la_CFLAGS =                 \
        $(WAYLAND_COMPOSITOR_CFLAGS)            \
        $(GCC_CFLAGS)
 wayland_backend_la_SOURCES = src/compositor-wayland.c
+nodist_wayland_backend_la_SOURCES =                    \
+       protocol/fullscreen-shell-protocol.c            \
+       protocol/fullscreen-shell-client-protocol.h
 endif
 
 if ENABLE_RPI_COMPOSITOR
@@ -239,6 +260,7 @@ rpi_backend_la_LDFLAGS = -module -avoid-version
 rpi_backend_la_LIBADD = $(COMPOSITOR_LIBS)     \
        $(RPI_COMPOSITOR_LIBS)                  \
        $(RPI_BCM_HOST_LIBS)                    \
+       $(INPUT_BACKEND_LIBS)                   \
        libsession-helper.la                    \
        libshared.la
 rpi_backend_la_CFLAGS =                                \
@@ -251,11 +273,7 @@ rpi_backend_la_SOURCES =                   \
        src/rpi-renderer.c                      \
        src/rpi-renderer.h                      \
        src/rpi-bcm-stubs.h                     \
-       src/udev-seat.c                         \
-       src/udev-seat.h                         \
-       src/evdev.c                             \
-       src/evdev.h                             \
-       src/evdev-touchpad.c
+       $(INPUT_BACKEND_SOURCES)
 
 if ENABLE_EGL
 rpi_backend_la_LIBADD += $(EGL_LIBS)
@@ -267,11 +285,8 @@ endif
 if ENABLE_HEADLESS_COMPOSITOR
 module_LTLIBRARIES += headless-backend.la
 headless_backend_la_LDFLAGS = -module -avoid-version
-headless_backend_la_LIBADD = $(COMPOSITOR_LIBS) \
-       libshared.la
-headless_backend_la_CFLAGS =                   \
-       $(COMPOSITOR_CFLAGS)                    \
-       $(GCC_CFLAGS)
+headless_backend_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
+headless_backend_la_CFLAGS = $(COMPOSITOR_CFLAGS) $(GCC_CFLAGS)
 headless_backend_la_SOURCES = src/compositor-headless.c
 endif
 
@@ -281,6 +296,7 @@ fbdev_backend_la_LDFLAGS = -module -avoid-version
 fbdev_backend_la_LIBADD =                      \
        $(COMPOSITOR_LIBS)                      \
        $(FBDEV_COMPOSITOR_LIBS)                \
+       $(INPUT_BACKEND_LIBS)                   \
        libsession-helper.la                    \
        libshared.la
 fbdev_backend_la_CFLAGS =                      \
@@ -291,11 +307,7 @@ fbdev_backend_la_CFLAGS =                  \
        $(GCC_CFLAGS)
 fbdev_backend_la_SOURCES =                     \
        src/compositor-fbdev.c                  \
-       src/udev-seat.c                         \
-       src/udev-seat.h                         \
-       src/evdev.c                             \
-       src/evdev.h                             \
-       src/evdev-touchpad.c
+       $(INPUT_BACKEND_SOURCES)
 endif
 
 if ENABLE_RDP_COMPOSITOR
@@ -377,37 +389,43 @@ endif
 if BUILD_SIMPLE_CLIENTS
 demo_clients +=                                        \
        weston-simple-shm                       \
+       weston-simple-damage                    \
        weston-simple-touch                     \
        weston-multi-resource
 
-weston_simple_shm_SOURCES =                    \
-       clients/simple-shm.c                    \
+weston_simple_shm_SOURCES = clients/simple-shm.c
+nodist_weston_simple_shm_SOURCES =             \
        protocol/xdg-shell-protocol.c           \
        protocol/xdg-shell-client-protocol.h    \
-       shared/os-compatibility.c               \
-       shared/os-compatibility.h
+       protocol/fullscreen-shell-protocol.c    \
+       protocol/fullscreen-shell-client-protocol.h
 weston_simple_shm_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
-weston_simple_shm_LDADD = $(SIMPLE_CLIENT_LIBS)
+weston_simple_shm_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la
 
-weston_simple_touch_SOURCES =                  \
-       clients/simple-touch.c                  \
-       shared/os-compatibility.c               \
-       shared/os-compatibility.h
+weston_simple_damage_SOURCES = clients/simple-damage.c
+nodist_weston_simple_damage_SOURCES =          \
+       protocol/scaler-protocol.c              \
+       protocol/scaler-client-protocol.h       \
+       protocol/xdg-shell-protocol.c           \
+       protocol/xdg-shell-client-protocol.h    \
+       protocol/fullscreen-shell-protocol.c    \
+       protocol/fullscreen-shell-client-protocol.h
+weston_simple_damage_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
+weston_simple_damage_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la
+
+weston_simple_touch_SOURCES = clients/simple-touch.c
 weston_simple_touch_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
-weston_simple_touch_LDADD = $(SIMPLE_CLIENT_LIBS)
+weston_simple_touch_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la
 
-weston_multi_resource_SOURCES =                        \
-       clients/multi-resource.c                \
-       shared/os-compatibility.c               \
-       shared/os-compatibility.h
+weston_multi_resource_SOURCES = clients/multi-resource.c
 weston_multi_resource_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
-weston_multi_resource_LDADD = $(SIMPLE_CLIENT_LIBS) -lm
+weston_multi_resource_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la -lm
 endif
 
 if BUILD_SIMPLE_EGL_CLIENTS
 demo_clients += weston-simple-egl
-weston_simple_egl_SOURCES =                    \
-       clients/simple-egl.c                    \
+weston_simple_egl_SOURCES = clients/simple-egl.c
+nodist_weston_simple_egl_SOURCES =             \
        protocol/xdg-shell-protocol.c           \
        protocol/xdg-shell-client-protocol.h
 weston_simple_egl_CFLAGS = $(AM_CFLAGS) $(SIMPLE_EGL_CLIENT_CFLAGS)
@@ -428,7 +446,9 @@ nodist_libtoytoolkit_la_SOURCES =                   \
        protocol/workspaces-protocol.c                  \
        protocol/workspaces-client-protocol.h           \
        protocol/xdg-shell-protocol.c                   \
-       protocol/xdg-shell-client-protocol.h
+       protocol/xdg-shell-client-protocol.h            \
+       protocol/ivi-application-protocol.c             \
+       protocol/ivi-application-client-protocol.h
 
 BUILT_SOURCES += $(nodist_libtoytoolkit_la_SOURCES)
 
@@ -444,13 +464,11 @@ weston_flower_LDADD = libtoytoolkit.la
 weston_flower_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
 
 weston_screenshooter_SOURCES =                         \
-       clients/screenshot.c                            \
-       shared/os-compatibility.c                       \
-       shared/os-compatibility.h
+       clients/screenshot.c
 nodist_weston_screenshooter_SOURCES =                  \
        protocol/screenshooter-protocol.c               \
        protocol/screenshooter-client-protocol.h
-weston_screenshooter_LDADD = $(CLIENT_LIBS)
+weston_screenshooter_LDADD = $(CLIENT_LIBS) libshared.la
 weston_screenshooter_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
 
 weston_terminal_SOURCES = clients/terminal.c
@@ -461,7 +479,10 @@ weston_image_SOURCES = clients/image.c
 weston_image_LDADD = libtoytoolkit.la
 weston_image_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
 
-weston_cliptest_SOURCES = clients/cliptest.c
+weston_cliptest_SOURCES =                              \
+       clients/cliptest.c                              \
+       src/vertex-clipping.c                           \
+       src/vertex-clipping.h
 weston_cliptest_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
 weston_cliptest_LDADD = libtoytoolkit.la
 
@@ -506,6 +527,9 @@ weston_transformed_LDADD = libtoytoolkit.la
 weston_transformed_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
 
 weston_fullscreen_SOURCES = clients/fullscreen.c
+nodist_weston_fullscreen_SOURCES =                     \
+       protocol/fullscreen-shell-protocol.c            \
+       protocol/fullscreen-shell-client-protocol.h
 weston_fullscreen_LDADD = libtoytoolkit.la
 weston_fullscreen_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
 
@@ -555,11 +579,8 @@ nodist_weston_simple_im_SOURCES =          \
 weston_simple_im_LDADD = $(CLIENT_LIBS)
 weston_simple_im_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
 
-weston_info_SOURCES =                          \
-       clients/weston-info.c                   \
-       shared/os-compatibility.c               \
-       shared/os-compatibility.h
-weston_info_LDADD = $(WESTON_INFO_LIBS)
+weston_info_SOURCES = clients/weston-info.c
+weston_info_LDADD = $(WESTON_INFO_LIBS) libshared.la
 weston_info_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
 
 weston_desktop_shell_SOURCES = clients/desktop-shell.c
@@ -612,6 +633,8 @@ BUILT_SOURCES +=                                    \
        protocol/scaler-protocol.c                      \
        protocol/workspaces-client-protocol.h           \
        protocol/workspaces-protocol.c                  \
+       protocol/fullscreen-shell-protocol.c            \
+       protocol/fullscreen-shell-client-protocol.h     \
        protocol/xdg-shell-protocol.c                   \
        protocol/xdg-shell-client-protocol.h
 
@@ -658,8 +681,7 @@ desktop_shell_la_CPPFLAGS =                 \
        -DIN_WESTON
 
 desktop_shell_la_LDFLAGS = -module -avoid-version
-desktop_shell_la_LIBADD = $(COMPOSITOR_LIBS)   \
-       libshared.la
+desktop_shell_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
 desktop_shell_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
 desktop_shell_la_SOURCES =                             \
        desktop-shell/shell.h                           \
@@ -675,6 +697,83 @@ nodist_desktop_shell_la_SOURCES =                  \
 BUILT_SOURCES += $(nodist_desktop_shell_la_SOURCES)
 endif
 
+if ENABLE_FULLSCREEN_SHELL
+
+module_LTLIBRARIES += fullscreen-shell.la
+
+fullscreen_shell_la_CPPFLAGS =                 \
+       -I$(top_builddir)/protocol              \
+       -I$(top_srcdir)/shared                  \
+       -I$(top_srcdir)/src                     \
+       -I$(top_builddir)/src                   \
+       -DIN_WESTON
+
+fullscreen_shell_la_LDFLAGS = -module -avoid-version
+fullscreen_shell_la_LIBADD = $(COMPOSITOR_LIBS)
+fullscreen_shell_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
+fullscreen_shell_la_SOURCES =                  \
+       fullscreen-shell/fullscreen-shell.c
+nodist_fullscreen_shell_la_SOURCES =                   \
+       protocol/fullscreen-shell-protocol.c            \
+       protocol/fullscreen-shell-server-protocol.h
+
+BUILT_SOURCES += $(nodist_fullscreen_shell_la_SOURCES)
+endif
+
+if ENABLE_IVI_SHELL
+
+module_LTLIBRARIES +=                          \
+       $(ivi_layout)                           \
+       $(ivi_shell)
+
+ivi_layout = ivi-layout.la
+ivi_layout_la_LDFLAGS = -module -avoid-version
+ivi_layout_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
+ivi_layout_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
+ivi_layout_la_SOURCES =                                \
+       ivi-shell/ivi-layout-export.h           \
+       ivi-shell/ivi-layout-private.h          \
+       ivi-shell/ivi-layout.c                  \
+       ivi-shell/ivi-layout-transition.c
+
+ivi_shell = ivi-shell.la
+ivi_shell_la_LDFLAGS = -module -avoid-version
+ivi_shell_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
+ivi_shell_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
+ivi_shell_la_SOURCES =                         \
+       ivi-shell/ivi-shell.h                   \
+       ivi-shell/ivi-shell.c                   \
+       ivi-shell/ivi-layout-private.h
+nodist_ivi_shell_la_SOURCES =                  \
+       protocol/ivi-application-protocol.c             \
+       protocol/ivi-application-server-protocol.h
+
+BUILT_SOURCES += $(nodist_ivi_shell_la_SOURCES)
+
+endif
+
+
+if ENABLE_SCREEN_SHARING
+
+module_LTLIBRARIES += screen-share.la
+
+screen_share_la_CPPFLAGS = $(AM_CPPFLAGS) -DBINDIR='"$(bindir)"'
+screen_share_la_LDFLAGS = -module -avoid-version
+screen_share_la_LIBADD =                       \
+       $(COMPOSITOR_LIBS)                      \
+       $(SCREEN_SHARE_LIBS)                    \
+       libshared-cairo.la
+screen_share_la_CFLAGS =                       \
+       $(COMPOSITOR_CFLAGS)                    \
+       $(SCREEN_SHARE_CFLAGS)                  \
+       $(GCC_CFLAGS)
+screen_share_la_SOURCES =                      \
+       src/screen-share.c
+nodist_screen_share_la_SOURCES =                       \
+       protocol/fullscreen-shell-protocol.c            \
+       protocol/fullscreen-shell-client-protocol.h
+
+endif
 
 if ENABLE_XWAYLAND
 
@@ -708,11 +807,6 @@ xwayland_la_SOURCES =                              \
        xwayland/launcher.c                     \
        xwayland/hash.c                         \
        xwayland/hash.h
-nodist_xwayland_la_SOURCES =                   \
-       protocol/xserver-protocol.c             \
-       protocol/xserver-server-protocol.h
-
-BUILT_SOURCES += $(nodist_xwayland_la_SOURCES)
 endif
 
 
@@ -728,6 +822,8 @@ libshared_la_SOURCES =                              \
        shared/config-parser.c                  \
        shared/option-parser.c                  \
        shared/config-parser.h                  \
+       shared/str-util.c                       \
+       shared/str-util.h                       \
        shared/os-compatibility.c               \
        shared/os-compatibility.h
 
@@ -764,6 +860,7 @@ TESTS = $(shared_tests) $(module_tests) $(weston_tests)
 
 shared_tests =                                 \
        config-parser.test                      \
+       strutil.test                            \
        vertex-clip.test
 
 module_tests =                                 \
@@ -787,7 +884,7 @@ LA_LOG_COMPILER = $(srcdir)/tests/weston-tests-env
 WESTON_LOG_COMPILER = $(srcdir)/tests/weston-tests-env
 
 clean-local:
-       -rm -rf tests/logs
+       -rm -rf logs
 
 # To remove when automake 1.11 support is dropped
 export abs_builddir
@@ -836,6 +933,9 @@ libtest_runner_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
 config_parser_test_SOURCES = tests/config-parser-test.c
 config_parser_test_LDADD = libshared.la libtest-runner.la $(COMPOSITOR_LIBS)
 
+strutil_test_SOURCES = tests/strutil-test.c
+strutil_test_LDADD = libshared.la libtest-runner.la $(COMPOSITOR_LIBS)
+
 vertex_clip_test_SOURCES =                     \
        tests/vertex-clip-test.c                \
        src/vertex-clipping.c                   \
@@ -886,10 +986,10 @@ buffer_count_weston_LDADD = libtest-client.la $(EGL_TESTS_LIBS)
 endif
 
 if ENABLE_XWAYLAND_TEST
-weston_tests +=        xwayland.weston
-xwayland_weston_SOURCES = tests/xwayland-test.c
-xwayland_weston_CFLAGS = $(GCC_CFLAGS) $(XWAYLAND_TEST_CFLAGS)
-xwayland_weston_LDADD = libtest-client.la $(XWAYLAND_TEST_LIBS)
+weston_tests +=        xwayland-test.weston
+xwayland_test_weston_SOURCES = tests/xwayland-test.c
+xwayland_test_weston_CFLAGS = $(GCC_CFLAGS) $(XWAYLAND_TEST_CFLAGS)
+xwayland_test_weston_LDADD = libtest-client.la $(XWAYLAND_TEST_LIBS)
 endif
 
 matrix_test_SOURCES =                          \
@@ -901,9 +1001,11 @@ matrix_test_LDADD = -lm -lrt
 
 if BUILD_SETBACKLIGHT
 noinst_PROGRAMS += setbacklight
-setbacklight_SOURCES =                         \
-       tests/setbacklight.c                    \
-       src/libbacklight.c                      \
+setbacklight_SOURCES =                 \
+       tests/setbacklight.c            \
+       shared/str-util.c               \
+       shared/str-util.h               \
+       src/libbacklight.c              \
        src/libbacklight.h
 setbacklight_CFLAGS = $(AM_CFLAGS) $(SETBACKLIGHT_CFLAGS)
 setbacklight_LDADD = $(SETBACKLIGHT_LIBS)
@@ -921,14 +1023,15 @@ BUILT_SOURCES +=                         \
 EXTRA_DIST +=                                  \
        protocol/desktop-shell.xml              \
        protocol/screenshooter.xml              \
-       protocol/xserver.xml                    \
        protocol/text.xml                       \
        protocol/input-method.xml               \
        protocol/workspaces.xml                 \
        protocol/text-cursor-position.xml       \
        protocol/wayland-test.xml               \
        protocol/xdg-shell.xml                  \
-       protocol/scaler.xml
+       protocol/fullscreen-shell.xml           \
+       protocol/scaler.xml                     \
+       protocol/ivi-application.xml
 
 man_MANS = weston.1 weston.ini.5