# @(#)makefile	19.1 (ESO-IPG) 02/25/03 13:24:47
# .COPYRIGHT:	Copyright (c) 1988 European Southern Observatory,
#						all rights reserved
# .TYPE		make file
# .NAME		$MIDASHOME/$MIDVERS/contrib/geotest/src/makefile 
# .LANGUAGE	makefile syntax
# .ENVIRONMENT	Unix Systems. 
# .COMMENT	Compiles source files and generates "geotest" commands
#
# .REMARKS	
# .AUTHOR	
# .VERSION 1.1	880831:		Implementation
# .VERSION 1.2	890104:		Generating makefile.com for VMS systems
# .VERSION 2.1  901102:         new directory structure CG.
# .VERSION 3.0  930308:		Using default.mk file

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

M = ../../exec

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

LIBS =	$(LIBDIR)/libmidas.a 

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

OUT = $(M)/chaos.exe $(M)/spec1.exe \
	$(M)/spec2.exe $(M)/spec3b.exe $(M)/spec3g.exe \
	$(M)/waves.exe $(M)/sdp.exe $(M)/ramp.exe


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

$(MAKEFILE_VMS): makefile
	$(MAKE_VMS)

$(M)/sdp.exe: sdp.o $(LIBS)
	$(LD77) sdp.o $(LLIB) $(SLIB) -o $@
	$(STRIP) $@
$(M)/chaos.exe: chaos.o $(LIBS1)
	$(LD77) chaos.o $(LLIB1) $(SLIB) -o $@
	$(STRIP) $@
$(M)/ramp.exe: ramp.o $(LIBS)
	$(LD77) ramp.o $(LLIB) $(SLIB) -o $@
	$(STRIP) $@
$(M)/spec1.exe: spec1.o $(LIBS)
	$(LD77) spec1.o $(LLIB) $(SLIB) -o $@
	$(STRIP) $@
$(M)/spec2.exe: spec2.o $(LIBS)
	$(LD77) spec2.o $(LLIB) $(SLIB) -o $@
	$(STRIP) $@
$(M)/spec3b.exe: spec3b.o $(LIBS)
	$(LD77) spec3b.o $(LLIB) $(SLIB) -o $@
	$(STRIP) $@
$(M)/spec3g.exe: spec3g.o $(LIBS)
	$(LD77) spec3g.o $(LLIB) $(SLIB) -o $@
	$(STRIP) $@
$(M)/waves.exe: waves.o $(LIBS)
	$(LD77) waves.o $(LLIB) $(SLIB) -o $@
	$(STRIP) $@

clean_exec:
	rm -f $(OUT)

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