jni/scripts/find_macos_jnih

18 lines
522 B
Plaintext
Raw Normal View History

#!/bin/bash
JAVA_HOME=`/usr/libexec/java_home`
echo // +build darwin > jni_darwin.tmp
echo //Generated by scripts/find_macos_jnih >> jni_darwin.tmp
echo >> jni_darwin.tmp
echo package jni >> jni_darwin.tmp
echo >> jni_darwin.tmp
echo /\* >> jni_darwin.tmp
echo \#cgo CFLAGS: -I$JAVA_HOME/include -I$JAVA_HOME/include/darwin >> jni_darwin.tmp
echo \#cgo LDFLAGS: -ljvm >> jni_darwin.tmp
echo \*/ >> jni_darwin.tmp
echo import \"C\" >> jni_darwin.tmp
mv -f jni_darwin.go jni_darwin.go-old
mv jni_darwin.tmp jni_darwin.go