diff options
author | Sven Gothel <[email protected]> | 2010-03-28 01:27:01 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2010-03-28 01:27:01 +0100 |
commit | a41f4d504d2f8cf58114d570d23f757ab2659cfc (patch) | |
tree | ebe021734de27004c1424130b0150f0b3cc2b5bb /make/build-junit.xml | |
parent | 2b61964060ffb79a313030d795ad069fbbe97b88 (diff) |
http://www.jogamp.org/bugzilla/show_bug.cgi?id=389
Mixed types in generated code are functioning now,
even though not all permutations are generated - still.
However, this patch merges the indirect object passing,
wheather it is a primitive array or an indirect NIO buffer,
incl. PointerBuffer.
This allows the usage of only one JNI functions for all combinations.
Only in case of NIODirectOnly, the simplified direct only '0'
variation is created - otherwise the parametrized '1' variant.
The junit tests proves the implementation and
almost completes the gluegen junit tests coverage
for JavaEmitter and ProcAddressEmitter.
Impact/Result:
- Working mixed array types
- JOGL GL2 native library shrunk around 30%
- Simplified gluegen code
- Almost complete gluegen junit tests
TODO: Complete permutations of array/NIO arguments,
if desired.
++++
Misc changes:
- NativeLibrary implements DynamicLookupHelper:
lookupFunction() -> dynamicLookupFunction()
Diffstat (limited to 'make/build-junit.xml')
-rw-r--r-- | make/build-junit.xml | 46 |
1 files changed, 40 insertions, 6 deletions
diff --git a/make/build-junit.xml b/make/build-junit.xml index dd87cdd..86292a2 100644 --- a/make/build-junit.xml +++ b/make/build-junit.xml @@ -193,6 +193,8 @@ <junit forkmode="once" showoutput="true" fork="true" haltonerror="true"> <jvmarg value="-Djava.library.path=${gluegen.lib}:${build_t.lib}"/> <jvmarg value="-Drootrel.build=${rootrel.build}"/> + <!--jvmarg value="-Dgluegen.debug.NativeLibrary=true"/--> + <!--jvmarg value="-Dgluegen.debug.ProcAddressHelper=true"/--> <formatter usefile="false" type="plain"/> <formatter usefile="true" type="xml"/> <classpath refid="junit.run.classpath"/> @@ -223,6 +225,7 @@ --> + <target name="junit.test1.java.generate"> <echo message=" - - - junit.test1.java.generate" /> @@ -234,19 +237,50 @@ literalInclude="${test.junit.dir}" includeRefid="stub.includes.fileset.test" emitter="com.sun.gluegen.JavaEmitter"> - <!-- emitter="com.sun.gluegen.procaddress.ProcAddressEmitter" --> <classpath refid="gluegen.classpath" /> </gluegen> + + <gluegen src="${test.junit.dir}/test1-gluegen.c" + outputRootDir="${build_t.gen}" + config="${test.junit.dir}/test1p1-gluegen.cfg" + literalInclude="${test.junit.dir}" + includeRefid="stub.includes.fileset.test" + emitter="com.sun.gluegen.JavaEmitter"> + <classpath refid="gluegen.classpath" /> + </gluegen> + + <gluegen src="${test.junit.dir}/test1-gluegen.c" + outputRootDir="${build_t.gen}" + config="${test.junit.dir}/test1p2-gluegen.cfg" + literalInclude="${test.junit.dir}" + includeRefid="stub.includes.fileset.test" + emitter="com.sun.gluegen.procaddress.ProcAddressEmitter"> + <classpath refid="gluegen.classpath" /> + </gluegen> + </target> + + <target name="junit.test1.c.build" depends="junit.test1p1.c.build, junit.test1p2.c.build" unless="build.javaonly" /> + + <target name="junit.test1p1.c.build"> + <patternset id="junit.test1p1.c.src.files"> + <include name="${test.junit.rootrel}/test1.c"/> + <include name="${build_t.gen.rootrel}/native/BindingTest1p1Impl_JNI.c"/> + </patternset> + + <c.build c.compiler.src.files="junit.test1p1.c.src.files" + output.lib.name="test1p1" + compiler.cfg.id="${compiler.cfg.id}" + linker.cfg.id="${linker.cfg.id}"/> </target> - <target name="junit.test1.c.build" unless="build.javaonly" > - <patternset id="junit.test1.c.src.files"> + <target name="junit.test1p2.c.build"> + <patternset id="junit.test1p2.c.src.files"> <include name="${test.junit.rootrel}/test1.c"/> - <include name="${build_t.gen.rootrel}/native/BindingTest1Impl_JNI.c"/> + <include name="${build_t.gen.rootrel}/native/BindingTest1p2Impl_JNI.c"/> </patternset> - <c.build c.compiler.src.files="junit.test1.c.src.files" - output.lib.name="test1" + <c.build c.compiler.src.files="junit.test1p2.c.src.files" + output.lib.name="test1p2" compiler.cfg.id="${compiler.cfg.id}" linker.cfg.id="${linker.cfg.id}"/> </target> |