all: clear distance_to_ts_elevation day_or_night_in_greenbank clean

distance_to_ts_elevation: distance_to_ts_elevation.o novas.o novascon.o nutation.o solsys3.o readeph0.o
	gcc -Wall -o distance_to_ts_elevation distance_to_ts_elevation.o novas.o novascon.o nutation.o solsys3.o readeph0.o -lm

day_or_night_in_greenbank: day_or_night_in_greenbank.o novas.o novascon.o nutation.o solsys3.o readeph0.o
	gcc -Wall -o day_or_night_in_greenbank day_or_night_in_greenbank.o novas.o novascon.o nutation.o solsys3.o readeph0.o -lm

distance_to_ts_elevation.o: distance_to_ts_elevation.c
	gcc -Wall -c distance_to_ts_elevation.c

day_or_night_in_greenbank.o: day_or_night_in_greenbank.c
	gcc -Wall -c day_or_night_in_greenbank.c

novas.o: novas.c
	gcc -c novas.c

novascon.o: novascon.c
	gcc -c novascon.c

nutation.o: nutation.c
	gcc -c nutation.c

solsys3.o: solsys3.c
	gcc -c solsys3.c

readeph0.o: readeph0.c
	gcc -c readeph0.c

clear:
	rm -f distance_to_ts_elevation *.o *~

clean:
	rm -f *.o
