Skip to content

Commit

Permalink
Create proper .dll's for csharp interface and add proper make install
Browse files Browse the repository at this point in the history
targets for java and c# installing into /usr/lib/jni /usr/lib/cil/shogun
respectively
  • Loading branch information
Soeren Sonnenburg committed Oct 11, 2011
1 parent 01b75c8 commit 9b38b33
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
8 changes: 6 additions & 2 deletions examples/undocumented/csharp_modular/check.sh
Expand Up @@ -9,6 +9,10 @@ then
fi

export LD_LIBRARY_PATH=../../../src/shogun:../../../src/interfaces/csharp_modular
export MONO_PATH=../../../src/interfaces/csharp_modular

MONOFLAGS="Load.cs /lib:../../../src/interfaces/csharp_modular /r:modshogun"


FILES=$@

Expand All @@ -17,7 +21,7 @@ test -z "$FILES" && FILES=$(ls *.cs | grep -v Load.cs )
for e in $FILES
do
echo -n "running $e .."
if ${MONOC} $e ../../../src/interfaces/csharp_modular/*.cs Load.cs >/dev/null 2>&1 && \
if ${MONOC} $e $MONOFLAGS >/dev/null 2>&1 && \
${MONO} ${e%.cs}.exe >/dev/null 2>&1
then
echo " OK"
Expand All @@ -26,7 +30,7 @@ do
echo "================================================================================" >>error.log
echo " error in $e ">>error.log
echo "================================================================================" >>error.log
${MONOC} $e ../../../src/interfaces/csharp_modular/*.cs Load.cs >>error.log 2>&1 && \
${MONOC} $e $MONOFLAGS >>error.log 2>&1 && \
${MONO} ${e%.cs}.exe >>error.log 2>&1
echo "================================================================================" >>error.log
echo >>error.log
Expand Down
9 changes: 7 additions & 2 deletions src/Makefile.template
Expand Up @@ -294,7 +294,7 @@ install-octave_modular: $(TEMPLATE_TARGET)
install-java_modular: $(TEMPLATE_TARGET)
install -d -m755 "$(DESTDIR)/$(PREFIX)/share/java"
install -m755 shogun.jar "$(DESTDIR)/$(PREFIX)/share/java"
install -m755 $(SWIGLIBFILES) $(DESTDIR)$(LIBDIR)
install -m755 $(SWIGLIBFILES) "$(DESTDIR)$(LIBDIR)/jni"

install-ruby_modular: $(TEMPLATE_TARGET)
install -d -m755 "$(RUBY_EXTENSIONS_INSTALL_DIR)"
Expand All @@ -305,7 +305,9 @@ install-lua_modular: $(TEMPLATE_TARGET)
install -m755 modshogun.$(EXT_LIB) "$(DESTDIR)/$(LUA_EXTENSIONS_INSTALL_DIR)"

install-csharp_modular: $(TEMPLATE_TARGET)
#TODO
install -d -m755 "$(DESTDIR)/$(LIBDIR)/cli/shogun"
install -m755 modshogun.dll "$(DESTDIR)/$(LIBDIR)/cli/shogun"
install -m755 $(SWIGLIBFILES) "$(DESTDIR)$(LIBDIR)/cli/shogun"

run-testsuite: run-testsuite-template
check-examples: check-examples-template
Expand Down Expand Up @@ -502,6 +504,9 @@ $(TEMPLATE_TARGET): .depend $(OBJFILES) $(SRCFILES) $(HEADERFILES) $(OTHERDEPS)
ifeq (java_modular,$(TEMPLATE_TARGET))
CLASSPATH=$(CLASSPATH) ant dist
endif
ifeq (csharp_modular,$(TEMPLATE_TARGET))
gmcs /t:library *.cs /out:modshogun.dll
endif
else
$(TEMPLATE_TARGET): .depend $(OBJFILES) $(SRCFILES) $(HEADERFILES) $(OTHERDEPS)
$(LINK) $(PRELINKFLAGS) $(shell find $(SRCDIR) -name "*.$(EXT_OBJ_CPP)" -o \
Expand Down

0 comments on commit 9b38b33

Please sign in to comment.