build: make libtsm build separately
authorDavid Herrmann <dh.herrmann@googlemail.com>
Tue, 18 Sep 2012 15:58:35 +0000 (17:58 +0200)
committerDavid Herrmann <dh.herrmann@googlemail.com>
Tue, 18 Sep 2012 15:58:35 +0000 (17:58 +0200)
This builds libtsm as separate library so we can use it in other projects,
too.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
.gitignore
Makefile.am
configure.ac
libtsm.pc.in [new file with mode: 0644]

index 1cbe09e..71a7acb 100644 (file)
@@ -19,6 +19,7 @@ configure
 *.tar.bz2
 libtool
 libeloop.pc
+libtsm.pc
 libuterm.pc
 m4/
 stamp-*
index 68bdb94..ad97647 100644 (file)
@@ -131,6 +131,42 @@ include_HEADERS += \
 pkgconfig_DATA += libeloop.pc
 
 #
+# libtsm
+# The Terminal-emulator State Machine is a library that implements the whole VTE
+# layer and everything related to it. It has no external dependencies so it can
+# be used to implement any kind of terminal emulator or debugger.
+#
+
+lib_LTLIBRARIES += \
+       libtsm.la
+
+libtsm_la_SOURCES = \
+       $(SHL_LLOG) \
+       $(SHL_TIMER) \
+       $(SHL_ARRAY) \
+       $(SHL_HASHTABLE) \
+       src/tsm_screen.h \
+       src/tsm_screen.c \
+       src/tsm_unicode.h \
+       src/tsm_unicode.c \
+       src/tsm_vte.h \
+       src/tsm_vte.c \
+       src/tsm_vte_charsets.c
+
+libtsm_la_CPPFLAGS = \
+       $(AM_CPPFLAGS)
+libtsm_la_LDFLAGS = \
+       -version-info 1:0:0
+
+include_HEADERS += \
+       src/tsm_screen.h \
+       src/tsm_unicode.h \
+       src/tsm_vte.h
+
+pkgconfig_DATA += \
+       libtsm.pc
+
+#
 # libuterm
 # The uterm library provides helpers to create terminals in user-space. They
 # are not limited to text-based terminals but rather provide graphics contexts
@@ -274,10 +310,6 @@ libkmscon_core_la_SOURCES = \
        src/main.h \
        src/conf.c src/conf.h \
        src/ui.c src/ui.h \
-       src/tsm_screen.c src/tsm_screen.h \
-       src/tsm_unicode.c src/tsm_unicode.h \
-       src/tsm_vte.c src/tsm_vte.h \
-       src/tsm_vte_charsets.c \
        src/log.c src/log.h \
        src/terminal.c src/terminal.h \
        src/pty.c src/pty.h \
@@ -339,6 +371,7 @@ libkmscon_core_la_LIBADD = \
        $(FREETYPE2_LIBS) \
        -lpthread \
        libeloop.la \
+       libtsm.la \
        libuterm.la
 
 #
index 5a585da..301ee90 100644 (file)
@@ -547,7 +547,7 @@ AC_SUBST(FREETYPE2_LIBS)
 AC_SUBST(PANGO_CFLAGS)
 AC_SUBST(PANGO_LIBS)
 
-AC_CONFIG_FILES([Makefile libeloop.pc libuterm.pc])
+AC_CONFIG_FILES([Makefile libeloop.pc libtsm.pc libuterm.pc])
 AC_OUTPUT
 
 #
diff --git a/libtsm.pc.in b/libtsm.pc.in
new file mode 100644 (file)
index 0000000..c113e64
--- /dev/null
@@ -0,0 +1,11 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: tsm
+Description: Terminal-emulator State Machine
+URL: @PACKAGE_URL@
+Version: @PACKAGE_VERSION@
+Libs: -L${libdir} -ltsm
+Cflags: -I${includedir}