Added utils from dBitech fork

This commit is contained in:
Alex Farrant
2018-07-05 20:21:06 +01:00
parent e18f6b243e
commit 54e1d0239f
8 changed files with 1397 additions and 0 deletions

59
utils/sdf/build Executable file
View File

@@ -0,0 +1,59 @@
#!/bin/bash
#
# Simple shell script for building SPLAT! and associated utilities.
# Written by John A. Magliacane, KD2BD May 2002. Updated September 2009.
#
build_usgs2sdf()
{
echo -n "Compiling usgs2sdf... "
cc -Wall -O2 -fomit-frame-pointer usgs2sdf.c -o usgs2sdf
if [ -x usgs2sdf ]; then
echo "Done!"
else
echo "Compilation failed!"
fi
}
build_srtm2sdf()
{
echo -n "Compiling srtm2sdf... "
cc -Wall -O2 -fomit-frame-pointer srtm2sdf.c -lbz2 -o srtm2sdf
rm -f srtm2sdf-hd
ln -s srtm2sdf srtm2sdf-hd
if [ -x srtm2sdf ]; then
echo "Done!"
else
echo "Compilation failed!"
fi
}
if [ "$#" = "0" ]; then
echo "Usage: build { srtm2sdf, usgs2sdf, all }"
else
if [ "$1" = "usgs2sdf" ]; then
build_usgs2sdf
fi
if [ "$1" = "srtm2sdf" ]; then
build_srtm2sdf
fi
if [ "$1" = "clean" ]; then
rm -f usgs2sdf srtm2sdf srtm2sdf-hd
fi
if [ "$1" = "all" ]; then
build_usgs2sdf
build_srtm2sdf
fi
if [ "$1" != "citydecoder" ] && [ "$1" != "srtm2sdf" ] && [ "$1" != "usgs2sdf" ] && [ "$1" != "fontdata" ] && [ "$1" != "bearing" ] && [ "$1" != "clean" ] && [ "$1" != "all" ]; then
echo "Usage: build { srtm2sdf, usgs2sdf, all }"
fi
fi