# @(#)makefile	19.1 (ESO-IPG) 02/25/03 14:17:24
# .COPYRIGHT:	Copyright (c) 1988 European Southern Observatory,
#						all rights reserved
# .TYPE		make file
# .NAME		$MIDASHOME/$MIDVERS/stdred/ccd/src/makefile 
# .LANGUAGE	makefile syntax
# .ENVIRONMENT	Unix Systems. 
# .COMMENT	Compiles source files and generates "general" commands
#
# .REMARKS	
# .AUTHOR	
# .VERSION 1.1	880831:		Implementation
# .VERSION 1.2	890104:		Generating makefile.com for VMS systems
# .VERSION 1.3	890705:		KB, add more modules
# .VERSION 1.7	891213:		KB, change ygrow.for to genyy1.for
# .VERSION 2.1  901102:         new directory structure CG.
# .VERSION 2.2  920326:		KB, averag.for => averag.c
# .VERSION 2.3  920521:         Removing MLIB CG
# .VERSION 3.0  930308:		Using default.mk file

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

M = ../../exec

LIBS1 =	$(LLIBDIR)/libccd.a  \
	$(LIBDIR)/libsubplot.a \
	$(LIBDIR)/libftab.a  \
	$(LIBDIR)/libgen.a  \
	$(LIBDIR)/libsubmid.a  \
	$(LIBDIR)/libgmidas.a  \
	$(LIBDIR)/libmidas.a 

LIBS2 =	$(LLIBDIR)/libccd.a \
	$(LIBDIR)/libgen.a \
	$(LIBDIR)/libmidas.a 

LLIB1 = -L$(LLIBDIR) -lccd -L$(LIBDIR) -lsubplot -lftab -lgen -lsubmid -lgmidas -lmidas
LLIB2 = -L$(LLIBDIR) -lccd -L$(LIBDIR) -lgen -lmidmath -lmidas

OUT =	$(M)/ccdrebin.exe   $(M)/ccdhotpix.exe


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

$(MAKEFILE_VMS): makefile
	$(MAKE_VMS)

$(M)/ccdhotpix.exe: ccdhotpix.o $(LIBS1)
	$(LD77) ccdhotpix.o $(LLIB1) $(MLIB) $(SLIB) -o $@
	$(STRIP) $@
$(M)/ccdrebin.exe: ccdrebin.o $(LIBS2)
	$(LDCC) ccdrebin.o $(LLIB2) $(MLIB) $(SLIB) -o $@
	$(STRIP) $@

clean_exec:
	rm -f $(OUT)

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

