diff --git a/src/mod/languages/mod_managed/Makefile b/src/mod/languages/mod_managed/Makefile index f69d4f9af3..de012f25db 100644 --- a/src/mod/languages/mod_managed/Makefile +++ b/src/mod/languages/mod_managed/Makefile @@ -1,10 +1,9 @@ -#MOD_CFLAGS=`pkg-config --cflags --libs mono` MOD_CFLAGS=-D_REENTRANT -pthread -I/opt/mono-1.9/lib/pkgconfig/../../include/mono-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -lmono -#LDFLAGS=`pkg-config --libs mono` BASE=../../../.. VERBOSE=1 include $(BASE)/build/modmake.rules LOCAL_OBJS=freeswitch_managed.o freeswitch_wrap.o + local_depend: $(LOCAL_OBJS) freeswitch_managed.o: freeswitch_managed.h freeswitch_managed.cpp @@ -16,6 +15,19 @@ freeswitch_wrap.cpp: freeswitch_wrap.cxx reswig: swigclean freeswitch_wrap.cxx +local_depend: + cd managed && $(MAKE) + +local_install: $(MODINSTDIR)/mod_managed.so + cd managed && $(MAKE) MODINSTDIR=$(MODINSTDIR) install + +local_uninstall: + rm -fr $(MODINSTDIR)/mod_managed.so + cd managed && $(MAKE) MODINSTDIR=$(MODINSTDIR) uninstall + +local_clean: + cd managed && $(MAKE) clean + swigclean: clean rm -f freeswitch_wrap.cxx freeswitch_wrap.cpp managed/swig.cs @@ -24,3 +36,6 @@ freeswitch_wrap.cxx: rm -f ./managed/swig.cs cat *.cs > ./managed/swig.cs rm -f *.cs + +depend_install: + mkdir -p $(DESTDIR)$(PREFIX)/mod/managed diff --git a/src/mod/languages/mod_managed/managed/Makefile b/src/mod/languages/mod_managed/managed/Makefile index 0d7e9d1135..a368f5aaa5 100644 --- a/src/mod/languages/mod_managed/managed/Makefile +++ b/src/mod/languages/mod_managed/managed/Makefile @@ -1,13 +1,14 @@ -all: Debug Debug/mod_managed_lib.dll +all: mod_managed_lib.dll clean: - rm -fr Debug + rm -fr mod_managed_lib.dll -Debug: - mkdir Debug +mod_managed_lib.dll: Loader.cs ManagedSession.cs ApiFunction.cs AppFunction.cs Extensions.cs Log.cs Demo.cs swig.cs + gmcs -target:library -out:mod_managed_lib.dll -d:DEBUG Loader.cs ManagedSession.cs ApiFunction.cs AppFunction.cs Extensions.cs Log.cs Demo.cs swig.cs -Debug/mod_managed_lib.dll: Loader.cs ManagedSession.cs ApiFunction.cs AppFunction.cs Extensions.cs Log.cs Demo.cs swig.cs - gmcs -target:library -out:Debug/mod_managed_lib.dll -d:DEBUG Loader.cs ManagedSession.cs ApiFunction.cs AppFunction.cs Extensions.cs Log.cs Demo.cs swig.cs +install: mod_managed_lib.dll + install mod_managed_lib.dll $(MODINSTDIR) + +uninstall: + rm -f $(MODINSTDIR)/mod_managed_lib.dll -install: Debug/mod_managed_lib.dll - install Debug/mod_managed_lib.dll /usr/local/freeswitch/mod diff --git a/src/mod/languages/mod_managed/runswig.sh b/src/mod/languages/mod_managed/runswig.sh deleted file mode 100644 index b6fc48a45f..0000000000 --- a/src/mod/languages/mod_managed/runswig.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash -swig -I../../../include -v -O -c++ -csharp -namespace FreeSWITCH.Native -dllimport mod_managed freeswitch.i -rm -f ./managed/swig.cs -cat *.cs > ./managed/swig.cs -rm -f *.cs