include ../../makefile.dep

LIBDIR= ../../lib/$(HOST)
BINDIR= ../../bin/$(HOST)

INCLUDES      =  -I../../include

TARGETS =   atg bvfreq depth grav press \
	    sal78 svan svel theta

all:	$(TARGETS)

LIBS1	      = $(LIBDIR)/ocean$(LIB) \
		$(LIBDIR)/ioserv$(LIB)

atg   : $(BINDIR)/atg$(EXE)
atgOBJECTS = atg$(OBJ)
$(BINDIR)/atg$(EXE): $(atgOBJECTS)
	$(CCLINK) -o $@ $(atgOBJECTS) $(LIBS1) $(LDLIBS)
	$(CHMOD) $(BIN_PERMISSION) $@

bvfreq	 : $(BINDIR)/bvfreq$(EXE)
bvfreqOBJECTS = bvfreq$(OBJ)
$(BINDIR)/bvfreq$(EXE): $(bvfreqOBJECTS)
	$(CCLINK) -o $@ $(bvfreqOBJECTS) $(LIBS1) $(LDLIBS)
	$(CHMOD) $(BIN_PERMISSION) $@

depth	: $(BINDIR)/depth$(EXE)
depthOBJECTS = depth$(OBJ)
$(BINDIR)/depth$(EXE): $(depthOBJECTS)
	$(CCLINK) -o $@ $(depthOBJECTS) $(LIBS1) $(LDLIBS)
	$(CHMOD) $(BIN_PERMISSION) $@

grav   : $(BINDIR)/grav$(EXE)
gravOBJECTS = grav$(OBJ)
$(BINDIR)/grav$(EXE): $(gravOBJECTS)
	$(CCLINK) -o $@ $(gravOBJECTS) $(LIBS1) $(LDLIBS)
	$(CHMOD) $(BIN_PERMISSION) $@

press	: $(BINDIR)/press$(EXE)
pressOBJECTS = press$(OBJ)
$(BINDIR)/press$(EXE): $(pressOBJECTS)
	$(CCLINK) -o $@ $(pressOBJECTS) $(LIBS1) $(LDLIBS)
	$(CHMOD) $(BIN_PERMISSION) $@

sal78	: $(BINDIR)/sal78$(EXE)
sal78OBJECTS = sal78$(OBJ)
$(BINDIR)/sal78$(EXE): $(sal78OBJECTS)
	$(CCLINK) -o $@ $(sal78OBJECTS) $(LIBS1) $(LDLIBS)
	$(CHMOD) $(BIN_PERMISSION) $@

svan   : $(BINDIR)/svan$(EXE)
svanOBJECTS = svan$(OBJ)
$(BINDIR)/svan$(EXE): $(svanOBJECTS)
	$(CCLINK) -o $@ $(svanOBJECTS) $(LIBS1) $(LDLIBS)
	$(CHMOD) $(BIN_PERMISSION) $@

svel   : $(BINDIR)/svel$(EXE)
svelOBJECTS = svel$(OBJ)
$(BINDIR)/svel$(EXE): $(svelOBJECTS)
	$(CCLINK) -o $@ $(svelOBJECTS) $(LIBS1) $(LDLIBS)
	$(CHMOD) $(BIN_PERMISSION) $@

theta	: $(BINDIR)/theta$(EXE)
thetaOBJECTS = theta$(OBJ)
$(BINDIR)/theta$(EXE): $(thetaOBJECTS)
	$(CCLINK) -o $@ $(thetaOBJECTS) $(LIBS1) $(LDLIBS)
	$(CHMOD) $(BIN_PERMISSION) $@


clean:
	$(RM) $(DIRT)
#
