summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2017-05-25 15:47:19 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2017-06-02 12:21:35 +1000
commit12a364a858ee602fdfa02f35f8396d29ae8f058d (patch)
treea2e5ca3ffa0d6f4eae769cfb07c6f7737c50cc2d /tools
parent319db5b7df63de27d84697415fc5b07045c93d86 (diff)
tools: Reinstate libshared.la and add it to meson.build too
Removed with commit 863fd1f0ebf145dc2b3a59e2a3e57dbc4ce77eaf but now that we exec each subcommand, the previous per-target compilation flags aren't needed anymore. Build a static library to avoid rebuilding the source files for each target. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'tools')
-rw-r--r--tools/Makefile.am22
1 files changed, 12 insertions, 10 deletions
diff --git a/tools/Makefile.am b/tools/Makefile.am
index 85fe700..3f69d56 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -3,6 +3,7 @@ bin_PROGRAMS = libinput
toolsdir = $(libexecdir)/libinput
tools_PROGRAMS =
bin_SCRIPTS = libinput-list-devices.compat libinput-debug-events.compat
+noinst_LTLIBRARIES = libshared.la
AM_CPPFLAGS = -I$(top_srcdir)/include \
-I$(top_srcdir)/src \
@@ -10,9 +11,11 @@ AM_CPPFLAGS = -I$(top_srcdir)/include \
AM_CFLAGS = $(GCC_CFLAGS)
AM_CXXFLAGS = $(GCC_CXXFLAGS)
-shared_sources = \
- shared.c \
- shared.h
+libshared_la_SOURCES = \
+ shared.c \
+ shared.h
+libshared_la_CFLAGS = $(AM_CFLAGS) $(LIBEVDEV_CFLAGS)
+libshared_la_LIBADD = $(LIBEVDEV_LIBS)
ptraccel_debug_SOURCES = ptraccel-debug.c
ptraccel_debug_LDADD = ../src/libfilter.la ../src/libinput.la
@@ -20,29 +23,28 @@ ptraccel_debug_LDFLAGS = -no-install
libinput_SOURCES = \
libinput-tool.c \
- libinput-tool.h \
- $(shared_sources)
-libinput_LDADD = ../src/libinput.la $(LIBUDEV_LIBS) $(LIBEVDEV_LIBS)
+ libinput-tool.h
+libinput_LDADD = ../src/libinput.la libshared.la $(LIBUDEV_LIBS) $(LIBEVDEV_LIBS)
libinput_CFLAGS = $(AM_CFLAGS) $(LIBUDEV_CFLAGS) $(LIBEVDEV_CFLAGS) \
-DLIBINPUT_TOOL_PATH="\"@libexecdir@/libinput\""
dist_man1_MANS = libinput.1
tools_PROGRAMS += libinput-list-devices
libinput_list_devices_SOURCES = libinput-list-devices.c $(shared_sources)
-libinput_list_devices_LDADD = ../src/libinput.la $(LIBUDEV_LIBS) $(LIBEVDEV_LIBS)
+libinput_list_devices_LDADD = ../src/libinput.la libshared.la $(LIBUDEV_LIBS) $(LIBEVDEV_LIBS)
libinput_list_devices_CFLAGS = $(AM_CFLAGS) $(LIBUDEV_CFLAGS) $(LIBEVDEV_CFLAGS)
dist_man1_MANS += libinput-list-devices.1
tools_PROGRAMS += libinput-debug-events
libinput_debug_events_SOURCES = libinput-debug-events.c $(shared_sources)
-libinput_debug_events_LDADD = ../src/libinput.la $(LIBUDEV_LIBS) $(LIBEVDEV_LIBS)
+libinput_debug_events_LDADD = ../src/libinput.la libshared.la $(LIBUDEV_LIBS) $(LIBEVDEV_LIBS)
libinput_debug_events_CFLAGS = $(AM_CFLAGS) $(LIBUDEV_CFLAGS) $(LIBEVDEV_CFLAGS)
dist_man1_MANS += libinput-debug-events.1
if BUILD_DEBUG_GUI
tools_PROGRAMS += libinput-debug-gui
-libinput_debug_gui_SOURCES = libinput-debug-gui.c $(shared_sources)
-libinput_debug_gui_LDADD = ../src/libinput.la $(CAIRO_LIBS) $(GTK_LIBS) $(LIBEVDEV_LIBS)
+libinput_debug_gui_SOURCES = libinput-debug-gui.c
+libinput_debug_gui_LDADD = ../src/libinput.la libshared.la $(CAIRO_LIBS) $(GTK_LIBS) $(LIBEVDEV_LIBS)
libinput_debug_gui_CFLAGS = $(AM_CFLAGS) $(CAIRO_CFLAGS) $(GTK_CFLAGS) $(LIBEVDEV_CFLAGS)
dist_man1_MANS += libinput-debug-gui.1
endif