2008-04-25 22:16:16 +00:00
|
|
|
BASE=../../../..
|
|
|
|
LOCAL_CFLAGS=-Ilua
|
|
|
|
LIBLUA_A=lua/liblua.a
|
|
|
|
LOCAL_LIBADD=$(LIBLUA_A)
|
|
|
|
LOCAL_LDFLAGS=-lm
|
2008-04-29 23:34:26 +00:00
|
|
|
LOCAL_OBJS=freeswitch_lua.o mod_lua_wrap.o
|
2008-04-25 22:16:16 +00:00
|
|
|
VERBOSE=1
|
|
|
|
|
|
|
|
include $(BASE)/build/modmake.rules
|
|
|
|
|
2008-04-29 23:34:26 +00:00
|
|
|
local_depend: $(LOCAL_OBJS)
|
2008-04-25 22:16:16 +00:00
|
|
|
|
|
|
|
$(LIBLUA_A):
|
2009-11-18 20:45:22 +00:00
|
|
|
cd lua && $(MAKE) CC="$(CC)" AR="$(AR) rcu" CFLAGS="$(ALL_CFLAGS) -DLUA_USE_LINUX -w" liblua.a
|
2008-04-25 22:16:16 +00:00
|
|
|
|
2008-07-16 21:06:14 +00:00
|
|
|
reswig: swigclean mod_lua_wrap.cpp
|
|
|
|
|
2008-04-28 17:35:11 +00:00
|
|
|
luaclean:
|
2008-04-25 22:16:16 +00:00
|
|
|
cd lua && $(MAKE) clean
|
2008-04-28 17:35:11 +00:00
|
|
|
|
2008-04-29 23:34:26 +00:00
|
|
|
freeswitch_lua.o: freeswitch_lua.h
|
|
|
|
|
2008-04-28 17:35:11 +00:00
|
|
|
allclean: clean luaclean
|
2008-04-25 22:16:16 +00:00
|
|
|
rm -f mod_lua_wrap.* freeswitch_lua.$(DYNAMIC_LIB_EXTEN)
|
|
|
|
|
2008-04-30 19:42:26 +00:00
|
|
|
swigclean: clean
|
|
|
|
rm -f mod_lua_wrap.*
|
2008-04-25 22:16:16 +00:00
|
|
|
|
2008-04-29 23:34:26 +00:00
|
|
|
mod_lua_wrap.cpp: mod_lua_extra.c
|
2008-04-25 22:16:16 +00:00
|
|
|
swig -lua -c++ -I../../../../src/include -oh mod_lua_wrap.h -o mod_lua_wrap.cpp freeswitch.i
|
2008-04-29 23:34:26 +00:00
|
|
|
echo "#include \"mod_lua_extra.c\"" >> mod_lua_wrap.cpp
|
|
|
|
patch -s -p0 -i hack.diff
|
2008-04-25 22:16:16 +00:00
|
|
|
|
|
|
|
freeswitch_lua.$(DYNAMIC_LIB_EXTEN): $(LOCAL_OBJS) $(LOCAL_LIBADD)
|
|
|
|
$(LINK) $(SOLINK) -o freeswitch_lua.$(DYNAMIC_LIB_EXTEN) $(LOCAL_OBJS) $(LOCAL_LIBADD) $(LDFLAGS)
|