summaryrefslogtreecommitdiffstats
path: root/resources/example1
diff options
context:
space:
mode:
Diffstat (limited to 'resources/example1')
-rw-r--r--resources/example1/OpenCL.cfg5
-rw-r--r--resources/example1/function.c3
-rw-r--r--resources/example1/function.h1
-rw-r--r--resources/example1/gen.sh17
4 files changed, 26 insertions, 0 deletions
diff --git a/resources/example1/OpenCL.cfg b/resources/example1/OpenCL.cfg
new file mode 100644
index 00000000..24b7cd54
--- /dev/null
+++ b/resources/example1/OpenCL.cfg
@@ -0,0 +1,5 @@
+Package com.mbien.opencl
+Style AllStatic
+JavaClass CL
+JavaOutputDir gensrc/java
+NativeOutputDir gensrc/native
diff --git a/resources/example1/function.c b/resources/example1/function.c
new file mode 100644
index 00000000..9a84189b
--- /dev/null
+++ b/resources/example1/function.c
@@ -0,0 +1,3 @@
+int one_plus(int a) {
+ return 1 + a;
+}
diff --git a/resources/example1/function.h b/resources/example1/function.h
new file mode 100644
index 00000000..58976c1f
--- /dev/null
+++ b/resources/example1/function.h
@@ -0,0 +1 @@
+int one_plus(int a);
diff --git a/resources/example1/gen.sh b/resources/example1/gen.sh
new file mode 100644
index 00000000..6fb971e2
--- /dev/null
+++ b/resources/example1/gen.sh
@@ -0,0 +1,17 @@
+#!/bin/ksh
+
+JAVA=java
+GLUEGEN_JAR=../../../build/gluegen.jar
+ANTLR_JAR=../../../../../ANTLR/antlr-2.7.4/antlr.jar
+
+NAME=`uname`
+
+if [ $NAME="Windows*" ] ; then
+ SEP=\;
+elif [ $NAME="CYGWIN*" ] ; then
+ SEP=\;
+else
+ SEP=:
+fi
+
+java -cp $GLUEGEN_JAR$SEP$ANTLR_JAR com.sun.gluegen.GlueGen -I. -Ecom.sun.gluegen.JavaEmitter -Cfunction.cfg function.h