3 # useful build script for purpose of testing
5 f="-O -Wall -DCONFIGPATH=\"meta\" -fPIC"
7 e() { echo error: "$@" >&2; exit 1; }
8 d() { echo running: "$@" >&2; "$@" || e "$@"; }
10 [ -f meta ] || e no file meta
12 d gcc $f -o toolbox toolbox.c parser.c buffer.c foreign.c sha256sum.c
13 d ./toolbox h > tzplatform_variables.h
14 d ./toolbox c > hash.inc
15 d ./toolbox signup > signup.inc
17 d ld -shared --version-script=tzplatform_config.sym -o libtzplatform-shared.so buffer.o foreign.o heap.o parser.o scratch.o context.o hashing.o init.o passwd.o shared-api.o
18 d ar cr libtzplatform-static.a static-api.o isadmin.o
19 d gcc -o get tzplatform_get.o static-api.o -L. -ltzplatform-static -ltzplatform-shared