# @(#)makefile	19.1 (ESO-IPG) 02/25/03 14:23:44
# .COPYRIGHT:	Copyright (c) 1988 European Southern Observatory,
#						all rights reserved
# .TYPE		make file
# .NAME		$MIDASHOME/$MIDVERS/stdred/irspec/src/makefile 
# .LANGUAGE	makefile syntax
# .ENVIRONMENT	Unix Systems. 
# .COMMENT	Compiles source files and generates "irspec" commands
#
# .REMARKS	
# .AUTHOR	
# .VERSION 1.1	31-Aug-1988:		Implementation
# .VERSION 1.2	04-Jan-1989:		Generating makefile.com for VMS systems
# .VERSION 3.0  930308:		Using default.mk file

include ../../../local/default.mk

M = ../../exec

LLIB = -L$(LIBDIR) -lgen -lmidas
LLIB1 = -L$(LIBDIR) -lftab -lgen -lmidas

LIBS =  $(LIBDIR)/libgen.a \
	$(LIBDIR)/libmidas.a

LIBS1 = $(LIBDIR)/libftab.a \
	$(LIBDIR)/libgen.a \
	$(LIBDIR)/libmidas.a

OUT =	$(M)/irsbadpix.exe  $(M)/irsbbfit.exe  $(M)/irscontsub.exe  \
	$(M)/irsdefbad.exe  $(M)/irsflat.exe   $(M)/irskysub.exe  \
	$(M)/irsshift.exe   $(M)/irstilt.exe


# DEPENDENCIES:
all: $(MAKEFILE_VMS) $(OUT)

$(MAKEFILE_VMS): makefile
	$(MAKE_VMS)

$(M)/irsbadpix.exe: irsbadpix.o $(LIBS)
	$(LD77) irsbadpix.o $(LLIB) $(SLIB) -o $@
	$(STRIP) $@
$(M)/irsbbfit.exe: irsbbfit.o $(LIBS)
	$(LD77) irsbbfit.o $(LLIB) $(SLIB) -o $@
	$(STRIP) $@
$(M)/irscontsub.exe: irscontsub.o $(LIBS1)
	$(LD77) irscontsub.o $(LLIB1) $(SLIB) -o $@
	$(STRIP) $@
$(M)/irsdefbad.exe: irsdefbad.o $(LIBS)
	$(LD77) irsdefbad.o $(LLIB) $(SLIB) -o $@
	$(STRIP) $@
$(M)/irsflat.exe: irsflat.o $(LIBS)
	$(LD77) irsflat.o $(LLIB) $(SLIB) -o $@
	$(STRIP) $@
$(M)/irskysub.exe: irskysub.o $(LIBS)
	$(LD77) irskysub.o $(LLIB) $(SLIB) -o $@
	$(STRIP) $@
$(M)/irsshift.exe: irsshift.o $(LIBS)
	$(LD77) irsshift.o $(LLIB) $(SLIB) -o $@
	$(STRIP) $@
$(M)/irstilt.exe: irstilt.o $(LIBS)
	$(LD77) irstilt.o $(LLIB) $(SLIB) -o $@
	$(STRIP) $@

clean_exec:
	rm -f $(OUT)

clean:
	rm -f *.o
	rm -f *.f
