diff --git a/.gitignore b/.gitignore index 1cbe09e..71a7acb 100644 --- a/.gitignore +++ b/.gitignore @@ -19,6 +19,7 @@ configure *.tar.bz2 libtool libeloop.pc +libtsm.pc libuterm.pc m4/ stamp-* diff --git a/Makefile.am b/Makefile.am index 68bdb94..ad97647 100644 --- a/Makefile.am +++ b/Makefile.am @@ -130,6 +130,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 @@ -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 # diff --git a/configure.ac b/configure.ac index 5a585da..301ee90 100644 --- a/configure.ac +++ b/configure.ac @@ -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 index 0000000..c113e64 --- /dev/null +++ b/libtsm.pc.in @@ -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}