urbit/nix/nixcrpkgs/pkgs/pdcurses/demos_builder.sh
benjamin-tlon edd57d380d
Finish cc-release cross-compilation. (#1202)
- Fixes the IPC bug
- Fixes the terminfo bug
- Moves the OSX SDK out of our nixcrpkgs fork.
- Vendor nixcrpkgs instead of having it be a submodule.
2019-04-23 19:50:38 -07:00

26 lines
482 B
Bash

source $setup
tar -xf $src
mv PDCurses-$version/demos .
rm -r PDCurses-$version
mkdir build
cd build
CFLAGS="-g -O2 -I$pdcurses/include -DPDC_WIDE"
$host-gcc $CFLAGS -c ../demos/tui.c -o tui.o
$host-ar r tui.a tui.o
demos="firework newdemo ptest rain testcurs worm xmas tuidemo"
for name in $demos; do
src=../demos/$name.c
echo "compiling $name"
$host-gcc $CFLAGS -L"$pdcurses/lib" \
"$src" tui.a -lpdcurses -o "$name.exe"
done
mkdir -p $out/bin
mv *.exe $out/bin/