From 9b8392bc163626fbbeb3f0de8b7ffa2d0400c6b3 Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Sun, 17 Jan 2010 06:57:35 +0000 Subject: [PATCH] move lua to automake git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16334 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- configure.in | 1 + .../mod_lua/{Makefile => Makefile.am} | 24 +++++++++---------- 2 files changed, 12 insertions(+), 13 deletions(-) rename src/mod/languages/mod_lua/{Makefile => Makefile.am} (51%) diff --git a/configure.in b/configure.in index a22072063f..e764f700e8 100644 --- a/configure.in +++ b/configure.in @@ -869,6 +869,7 @@ AC_CONFIG_FILES([Makefile src/mod/formats/mod_portaudio_stream/Makefile src/mod/asr_tts/mod_unimrcp/Makefile src/mod/languages/mod_java/Makefile + src/mod/languages/mod_lua/Makefile src/mod/languages/mod_python/Makefile src/mod/languages/mod_spidermonkey/Makefile src/mod/event_handlers/mod_erlang_event/Makefile diff --git a/src/mod/languages/mod_lua/Makefile b/src/mod/languages/mod_lua/Makefile.am similarity index 51% rename from src/mod/languages/mod_lua/Makefile rename to src/mod/languages/mod_lua/Makefile.am index 71e9f3da43..c62e64b2fd 100644 --- a/src/mod/languages/mod_lua/Makefile +++ b/src/mod/languages/mod_lua/Makefile.am @@ -1,14 +1,17 @@ -BASE=../../../.. -LOCAL_CFLAGS=-Ilua +include $(top_srcdir)/build/modmake.rulesam + +MODNAME=mod_lua + LIBLUA_A=lua/liblua.a -LOCAL_LIBADD=$(LIBLUA_A) -LOCAL_LDFLAGS=-lm -LOCAL_OBJS=freeswitch_lua.o mod_lua_wrap.o -VERBOSE=1 -include $(BASE)/build/modmake.rules +mod_LTLIBRARIES = mod_lua.la +mod_lua_la_SOURCES = mod_lua.cpp freeswitch_lua.cpp mod_lua_wrap.cpp +mod_lua_la_CXXFLAGS = -Ilua $(AM_CPPFLAGS) +mod_lua_la_LIBADD = $(switch_builddir)/libfreeswitch.la +mod_lua_la_LDFLAGS = -avoid-version -module -no-undefined -shared -lm $(LIBLUA_A) -local_depend: $(LOCAL_OBJS) +BUILT_SOURCES = $(LIBLUA_A) +$(mod_lua_la_SOURCES) : $(BUILT_SOURCES) $(LIBLUA_A): cd lua && $(MAKE) CC="$(CC)" AR="$(AR) rcu" CFLAGS="$(ALL_CFLAGS) -DLUA_USE_LINUX -w" liblua.a @@ -18,10 +21,7 @@ reswig: swigclean mod_lua_wrap.cpp luaclean: cd lua && $(MAKE) clean -freeswitch_lua.o: freeswitch_lua.h - allclean: clean luaclean - rm -f mod_lua_wrap.* freeswitch_lua.$(DYNAMIC_LIB_EXTEN) swigclean: clean rm -f mod_lua_wrap.* @@ -31,5 +31,3 @@ mod_lua_wrap.cpp: mod_lua_extra.c echo "#include \"mod_lua_extra.c\"" >> mod_lua_wrap.cpp patch -s -p0 -i hack.diff -freeswitch_lua.$(DYNAMIC_LIB_EXTEN): $(LOCAL_OBJS) $(LOCAL_LIBADD) - $(LINK) $(SOLINK) -o freeswitch_lua.$(DYNAMIC_LIB_EXTEN) $(LOCAL_OBJS) $(LOCAL_LIBADD) $(LDFLAGS)