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

UALIB=../UA/ua

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

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) -oatps atps.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) -orh 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)

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

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

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

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)

clean:
	rm -f asc2fits astro atps fits2asc fitsxy fsort listim rh rhh smoothfits xplot xpu.o xyfits showfits qalplot

