forked from gmp/jni
18 lines
566 B
Plaintext
18 lines
566 B
Plaintext
|
#!/bin/bash
|
||
|
|
||
|
JAVA_HOME=$(dirname $(readlink -f $(which java) | sed 's^jre/bin/^^'))
|
||
|
|
||
|
echo // +build linux > jni_linux.tmp
|
||
|
echo //Generated by scripts/find_linux_jnih >> jni_linux.tmp
|
||
|
echo >> jni_linux.tmp
|
||
|
echo package jni >> jni_linux.tmp
|
||
|
echo >> jni_linux.tmp
|
||
|
echo /\* >> jni_linux.tmp
|
||
|
echo \#cgo CFLAGS: -I$JAVA_HOME/include -I$JAVA_HOME/include/linux >> jni_linux.tmp
|
||
|
echo \#cgo LDFLAGS: -L$JAVA_HOME/lib/server -ljvm >> jni_linux.tmp
|
||
|
echo \*/ >> jni_linux.tmp
|
||
|
echo import \"C\" >> jni_linux.tmp
|
||
|
|
||
|
mv -f jni_linux.go jni_linux.go-old
|
||
|
mv jni_linux.tmp jni_linux.go
|