libcc.android 811 Bytes
Newer Older
bernd's avatar
bernd committed
1 2
#!/bin/bash

bernd's avatar
bernd committed
3 4
ENGINE=gforth-x32
KERNL=$(gforth-x32 --debug -e bye 2>&1 |grep "Opened image file: "|sed -e 's/Opened image file: //g' -e 's/gforth.fi/kernl*.fi/g')
bernd's avatar
bernd committed
5 6 7 8
VERSION=$($ENGINE --version 2>&1 | tr ' ' '/')
srcdir=.
DESTDIR=/home/bernd/proj/net2o
prefix= 
bernd's avatar
bernd committed
9
ARCH=""
bernd's avatar
bernd committed
10 11
exec_prefix=${prefix}
libexecdir=$package${exec_prefix}/lib
bernd's avatar
bernd committed
12
libccdir=$libexecdir/$VERSION/libcc-named/
bernd's avatar
bernd committed
13
LIBRARY="ed25519-donna.fs libkeccak.fs"
bernd's avatar
bernd committed
14
ANDROID=${ANDROID-~/proj/gforths/gforth-android}
bernd's avatar
bernd committed
15 16 17

for i in $LIBRARY
do
bernd's avatar
bernd committed
18
    echo "generating library $i"
bernd's avatar
bernd committed
19
    $ENGINE -i $KERNL -p ".:~+:$ANDROID" exboot.fs startup.fs -e ": android ;" -e "also c-lib s\" `pwd`/lib/$VERSION/libcc-named/\" >libcc-named-dir libcc-path clear-path libcc-named-dir libcc-path also-path :noname 2drop s\" $DESTDIR$libccdir\" ; is replace-rpath previous" $srcdir/$i -e bye
bernd's avatar
bernd committed
20
done