Files
astronomy/demo/c/lrbuild
Don Cross b779a6aeca Added linux_riseset.c, a variation of riseset.c.
This new demo shows how to calculate rise and set times
of the Sun and Moon in local time, using Linux functions.
It also sorts the events in chronological order.
2020-09-08 21:40:05 -04:00

23 lines
451 B
Bash
Executable File

#!/bin/bash
Fail()
{
echo "FATAL($0): $1"
exit 1
}
if [[ "$1" == "debug" ]]; then
BUILDOPT='-g -O0'
elif [[ -z "$1" ]]; then
BUILDOPT='-O3'
else
Fail "unrecognized command line option"
fi
for name in linux_riseset ; do
echo "Compiling ${name}.c"
gcc ${BUILDOPT} -Wall -Werror -o ${name} -I../../source/c ../../source/c/astronomy.c astro_demo_common.c ${name}.c -lm ||
Fail "Error building ${name}.c"
done
exit 0