From 76c9333a32d8b50c06582a976c56fd7559b26223 Mon Sep 17 00:00:00 2001 From: Janos Kovacs Date: Tue, 23 Oct 2012 04:05:15 +0300 Subject: [PATCH] building: make the lua-utils library --- configure.ac | 6 ++++++ src/Makefile.am | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 59 insertions(+) diff --git a/configure.ac b/configure.ac index 9772daf..cc19e0b 100644 --- a/configure.ac +++ b/configure.ac @@ -106,6 +106,11 @@ fi AC_SUBST(WARNING_CFLAGS) +# check for LUA +PKG_CHECK_MODULES(LUA, lua >= 1.5.1) +AC_SUBST(LUA_CFLAGS) +AC_SUBST(LUA_LIBS) + # Check if potentially GPL bits are allowed to be enabled. AC_ARG_ENABLE(gpl, [ --enable-gpl enable linking against GPL code], @@ -445,6 +450,7 @@ AC_CONFIG_FILES([build-aux/shave src/common/murphy-ecore.pc src/common/murphy-glib.pc src/core/murphy-core.pc + src/core/lua-utils/murphy-lua-utils.pc src/murphy-db/Makefile src/murphy-db/mdb/Makefile src/murphy-db/mqi/Makefile diff --git a/src/Makefile.am b/src/Makefile.am index e68ff2d..b9e621a 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -507,6 +507,59 @@ clean-linker-script:: ################################### +# murphy lua utilities +# + +lib_LTLIBRARIES += libmurphy-lua-utils.la +EXTRA_DIST += core/lua-utils/murphy-lua-utils.pc +pkgconfig_DATA += core/lua-utils/murphy-lua-utils.pc + +libmurphy_lua_utils_ladir = \ + $(includedir)/murphy/core/lua-utils + +libmurphy_lua_utils_la_HEADERS = \ + core/lua-utils/strarray.h \ + core/lua-utils/funcbridge.h \ + core/lua-utils/object.h + +libmurphy_lua_utils_la_REGULAR_SOURCES = \ + core/lua-utils/strarray.c \ + core/lua-utils/funcbridge.c \ + core/lua-utils/object.c + +libmurphy_lua_utils_la_SOURCES = \ + $(libmurphy_lua_utils_la_REGULAR_SOURCES) \ + lua-utils-func-info.c + +libmurphy_lua_utils_la_CFLAGS = \ + $(AM_CFLAGS) \ + $(LUA_CFLAGS) + +libmurphy_lua_utils_la_LDFLAGS = \ + -Wl,-version-script=linker-script.lua-utils \ + -version-info @MURPHY_VERSION_INFO@ + +libmurphy_lua_utils_la_LIBADD = \ + $(LUA_LIBS) + +libmurphy_lua_utils_la_DEPENDENCIES = linker-script.lua-utils + +# debug file:line-function mapping generation +lua-utils-func-info.c: $(libmurphy_lua_utils_la_REGULAR_SOURCES) + $(QUIET_GEN)$(top_builddir)/build-aux/gen-debug-table -o $@ $^ + +clean-func-infos:: + -rm lua-utils-func-info.c + +# lua-utils linker script generation +linker-script.lua-utils: $(libmurphy_lua_utils_la_HEADERS) + $(QUIET_GEN)$(top_builddir)/build-aux/gen-linker-script -q -o $@ $^ + +clean-linker-script:: + -rm -f linker-script.lua-utils + + +################################### # murphy plugins # -- 2.7.4