Have a typemap for uint8_t*

This commit is contained in:
Dan Hirsch 2013-12-16 15:52:24 +01:00
parent cbdff5fbc0
commit a219ffc45d
2 changed files with 39 additions and 7 deletions

View file

@ -12,7 +12,8 @@ dotnetenv.Append(CCFLAGS=["-fpic", '-DSWIG', '-Wno-all',
LIBPATH=["../.."],
SWIGFLAGS=["-DHAMMER_INTERNAL__NO_STDARG_H",
"-Isrc/", "-csharp",
"-dllimport","hammer_dotnet"])
"-dllimport","hammer_dotnet",
"-namespace", "Hammer.Internal"])
import os
swig = ['hammer.i']
@ -25,23 +26,25 @@ csfiles = os.path.join(thisdir, "*.cs")
# This also generates a bunch of .cs files, which we'll just use this
# target to stand in for.
hammer_wrap = AlwaysBuild(dotnetenv.Command(['hammer_wrap.c'], swig,
["rm %s/*.cs" % (thisdir,),
["rm %s/*.cs || true" % (thisdir,),
"swig $SWIGFLAGS $SOURCE"]))
libhammer_dotnet = dotnetenv.SharedLibrary(['hammer_dotnet'], hammer_wrap)
hammer_dll = AlwaysBuild(dotnetenv.Command(['hammer.dll'], hammer_wrap,
'$CSC -t:library -out:$TARGET %s/*.cs' %(thisdir,)))
Depends(hammer_dll, hammer_wrap)
#hammer_dll = dotnetenv.CLILibrary('hammer.dll', dotnetenv.Glob('*.cs'))
hammer_dll = AlwaysBuild(dotnetenv.Command(['hammer.dll'], Glob('ext/*.cs'),
'$CSC -t:library -unsafe -out:$TARGET %s/*.cs $SOURCE' %(thisdir,)))
Depends(hammer_dll, hammer_wrap)
#hammer_dll = dotnetenv.CLILibrary('hammer.dll', hammer.cs)
Default(libhammer_dotnet, hammer_dll)
dotnettestenv = dotnetenv.Clone()
#dotnettestenv['ENV']['LD_LIBRARY_PATH'] = os.path.dirname(str(libhammer_shared[0]))
#dotnettests = ['t/hammer.t']
dotnettestenv.Append(CILLIBS=['/usr/lib/cli/nunit.core-2.6/nunit.core.dll','/usr/lib/cli/nunit.util-2.6/nunit.util.dll','/usr/lib/cli/nunit.framework-2.6/nunit.framework.dll','/usr/lib/cli/nunit.core.interfaces-2.6/nunit.core.interfaces.dll',str(hammer_dll[0])])
dotnettestlib = dotnettestenv.CLILibrary('hammer_test.dll', Glob('test/*.cs'))
#dotnettestexec = dotnettestenv.Command(None, dotnettests + libhammer_dotnet + libhammer_shared, "make test -C " + targetdir)
#dotnettest = Alias("testdotnet", [dotnettestexec], dotnettestexec)
#AlwaysBuild(dotnettestexec)
#testruns.append(dotnettest)
testruns.append(dotnettestlib)
#dotnetinstallexec = dotnetenv.Command(None, libhammer_dotnet, "make install -C " + targetdir)
#dotnetinstall = Alias("installdotnet", [dotnetinstallexec], dotnetinstallexec)