summary refs log tree commit diff stats
path: root/examples/cross_calculator/android/scripts/jnibuild.sh
blob: 8b61f20f7c38323ca0fe48c55bc3ffcb512a2ff4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/sh

# Force errors to fail script.
set -e

# If we are running from inside the scripts subdir, get out.
if [ ! -d src ]
then
	cd ..
fi

# Ok, are we out now?
if [ -d src ]
then
	javah -classpath bin/classes \
		-o jni/backend-jni.h \
		com.github.nimrod.crosscalculator.CrossCalculator
else
	echo "Uh oh, bin/classes directory not found?"
	echo "Try compiling your java code, or opening in eclipse."
	exit 1
fi