#----------------------------------------------------------#
#   Makefile for Various Programs             tab Nov 97   #
#----------------------------------------------------------#
#
include ../Options

UALIB=../UA/ua

all: asc2fits astro atps clcalc DNtoErg column_edit fits2asc fitsxy fsort cpgim rh rhh smoothfits xplot xpu.o xyfits showfits qalplot

clean:
	rm -f *.o asc2fits astro atps column_edit clcalc fits2asc fitsxy fsort rh rhh smoothfits xplot xyfits showfits qalplot cpgim DNtoErg


asc2fits: asc2fits.f $(UALIB)
	$(G77) $(G77FLAGS) -o asc2fits asc2fits.f $(UALIB)

astro: astro.f $(UALIB)
	$(G77) $(G77FLAGS) -o astro astro.f $(UALIB)

atps: atps.c $(UALIB)
	$(GCC) $(GCCFLAGS) -o atps atps.c $(UALIB) $(GCCLIBS)

clcalc: clcalc.c $(UALIB)
	$(GCC) $(GCCFLAGS) -o clcalc clcalc.c $(UALIB) $(GCCLIBS)

DNtoErg: DNtoErg.c $(UALIB)
	$(GCC) $(GCCFLAGS) -o DNtoErg DNtoErg.c $(UALIB) $(GCCLIBS)

cpgim: cpgim.c $(UALIB)
	$(GCC) $(GCCFLAGS) -c cpgim.c
	$(G77) $(G77FLAGS) -o cpgim cpgim.o $(UALIB) $(PGLIB)

rh: rh.c $(UALIB)
	$(GCC) $(GCCFLAGS) -o rh rh.c $(UALIB) $(GCCLIBS)

fits2asc: fits2asc.f $(UALIB)
	$(G77) $(G77FLAGS) -o fits2asc fits2asc.f $(UALIB)

fitsxy: fitsxy.f $(UALIB)
	$(G77) $(G77FLAGS) -o fitsxy fitsxy.f $(UALIB)

fsort: fsort.f $(UALIB)
	$(G77) $(G77FLAGS) -o fsort fsort.f $(UALIB)

rhh: rhh.f $(UALIB)
	$(G77) $(G77FLAGS) -o rhh rhh.f $(UALIB)

column_edit: column_edit.f $(UALIB)
	$(G77) $(G77FLAGS) -o column_edit column_edit.f $(UALIB)

smoothfits: smoothfits.f $(UALIB)
	$(G77) $(G77FLAGS) -o smoothfits smoothfits.f $(UALIB)

xyfits: xyfits.f $(UALIB)
	$(G77) $(G77FLAGS) -o xyfits xyfits.f $(UALIB)

xpu.o: xpu.f xplot.inc
	$(G77) $(G77FLAGS) -c xpu.f

xplot: xplot.f xpu.o xplot.inc $(UALIB)
	$(G77) $(G77FLAGS) -o xplot xplot.f xpu.o $(UALIB) $(PGLIB)

qalplot: qalplot.f $(UALIB)
	$(G77) $(G77FLAGS) -o qalplot qalplot.f $(UALIB) $(PGLIB)

showfits: showfits.f $(UALIB)
	$(G77) $(G77FLAGS) -o showfits showfits.f $(UALIB) $(PGLIB)

