1
0
forked from gmp/jni
jni/scripts/find_macos_jnih

19 lines
586 B
Bash
Executable File

#!/bin/bash
JAVA_HOME=`/usr/libexec/java_home`
echo // +build darwin > jni_darwin.tmp
echo //go:generate ./find_jnih jni_darwin.go2 >> 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