moon phase calculator from JPL ephems
make to build binary
make ephem to download ephemeris data (quite large 2.5GB)
make all to do both
then with the binary and the ephems, make run, or execute build/src/newmoon to calculate your new moons approximately