# Compiler and flags
F77    = g77
FFLAGS = -L/usr/X/lib/ -lg2c -lX11 /usr/lib64/libpgplot.so.5#-L/usr/X/lib/ -lX11 /usr/lib64/libpgplot.so.5 -std=legacy

# Targets
all: discriminant freq_student harmplot_student pdm plotdata scargle

discriminant: discriminant.f
	$(F77) -o discriminant $(FFLAGS) discriminant.f

freq_student: freq_student.f
	$(F77) -o freq_student $(FFLAGS) freq_student.f

harmplot_student: harmplot_student.f
	$(F77) -o harmplot_student $(FFLAGS) harmplot_student.f

pdm: pdm.f
	$(F77) -o pdm $(FFLAGS) pdm.f

plotdata: plotdata.f
	$(F77) -o plotdata $(FFLAGS) plotdata.f

scargle: scargle.f
	$(F77) -o scargle $(FFLAGS) scargle.f

# Cleanup
clean:
	rm -f discriminant freq_student harmplot_student pdm plotdata scargle

.PHONY: clean

