#     The MB-system:	Makefile.template  6/23/95
#	$Id: Makefile.template 1770 2009-10-19 17:16:39Z caress $
#
#     Copyright (c) 2000-2009 by 
#     David W. Caress (caress@mbari.org)
#       Monterey Bay Aquarium Research Institute
#       Moss Landing, CA 95039
#     and Dale N. Chayes (dale@ldeo.columbia.edu)
#       Lamont-Doherty Earth Observatory
#       Palisades, NY  10964
#
#     See README file for copying and redistribution conditions.
#
# Makefile template for MB-system at the src/mbnavadjust directory level
# Author:	D. W. Caress
# Date:		September 7, 2000
#
# $Log: Makefile.template,v $
# Revision 5.8  2009/03/13 07:05:58  caress
# Release 5.1.2beta02
#
# Revision 5.7  2006/11/10 22:36:05  caress
# Working towards release 5.1.0
#
# Revision 5.6  2006/06/16 19:30:58  caress
# Check in after the Santa Monica Basin Mapping AUV Expedition.
#
# Revision 5.5  2006/03/06 21:38:15  caress
# Changed libproj and libgsf to libmbproj and libmbgsf.
#
# Revision 5.4  2003/07/27 20:49:38  caress
# Release 5.0.0
#
# Revision 5.3  2003/03/10 20:01:31  caress
# Added mr1pr library.
#
# Revision 5.2  2002/07/20 20:45:56  caress
# Release 5.0.beta20
#
# Revision 5.1  2001/06/30 17:40:46  caress
# Release 5.0.beta02
#
# Revision 5.0  2001/03/22  21:08:55  caress
# Trying to make release 5.0.beta0
#
# Revision 1.1  2000/09/30  07:21:32  caress
# Initial revision
#
#
#

### sets locations of vital objects
BINDIR = ../../bin
LIBDIR = ../../lib
INCDIR = ../../include

# *** CHANGE THESE TO FIT YOUR LOCAL ENVIRONMENT ***
#
# Locations of Motif include files:
MOTIFINCDIR = /usr/include/Xm
MOTIFLIBS = -lXm -lXt -lX11
#
# Compilers 
CC = cc
#
# Compile and load flags:
CFLAGS = -g -DIRIX
LFLAGS =  -lmalloc -lm -lsun -g

### set gsflib - could be version supplied with MB-System or other installation
GSFLIB  = $(LIBDIR)/libmbgsf.a

### set projlib - could be version supplied with MB-System or other installation
PROJLIB  = $(LIBDIR)/libmbproj.a
#
# *** LEAVE EVERYTHING ELSE BELOW ALONE ***

### make all makes the executable and man page
all: $(BINDIR)/mbnavadjust

### link the executable
$(BINDIR)/mbnavadjust: mbnavadjust.o \
		mbnavadjust_creation.o \
		mbnavadjust_callbacks.o \
		mbnavadjust_util.o \
		mbnavadjust_prog.o \
		$(LIBDIR)/libmbio.a \
		$(PROJLIB) \
		$(GSFLIB) \
		$(LIBDIR)/libmr1pr.a  \
		$(LIBDIR)/libsapi.a \
		$(LIBDIR)/libmbaux.a \
		$(LIBDIR)/libmbps.a \
		$(LIBDIR)/libmbxgr.a
	$(CC) $(CFLAGS) mbnavadjust.o \
		mbnavadjust_creation.o \
		mbnavadjust_callbacks.o \
		mbnavadjust_util.o \
		mbnavadjust_prog.o \
		$(LIBDIR)/libmbio.a \
		$(PROJLIB) \
		$(GSFLIB) \
		$(LIBDIR)/libmr1pr.a  \
		$(LIBDIR)/libsapi.a \
		$(LIBDIR)/libmbaux.a \
		$(LIBDIR)/libmbps.a \
		$(LIBDIR)/libmbxgr.a \
		$(MOTIFLIBS) $(LFLAGS) \
		-o $(BINDIR)/mbnavadjust

### compile the source files
mbnavadjust.o: mbnavadjust.c mbnavadjust_creation.h mbnavadjust.h \
	mbnavadjust_extrawidgets.h
	$(CC) $(CFLAGS) -I$(INCDIR) -I$(MOTIFINCDIR) -c mbnavadjust.c
mbnavadjust_creation.o: mbnavadjust_creation.c mbnavadjust_creation.h
	$(CC) $(CFLAGS) -I$(INCDIR) -I$(MOTIFINCDIR) -c mbnavadjust_creation.c
mbnavadjust_callbacks.o: mbnavadjust_callbacks.c mbnavadjust.h mbnavadjust_creation.h \
	mbnavadjust_extrawidgets.h $(INCDIR)/mb_xgraphics.h
	$(CC) $(CFLAGS) -I$(INCDIR) -I$(MOTIFINCDIR) -c mbnavadjust_callbacks.c
mbnavadjust_util.o: mbnavadjust_util.c mbnavadjust_creation.h
	$(CC) $(CFLAGS) -I$(INCDIR) -I$(MOTIFINCDIR) -c mbnavadjust_util.c
mbnavadjust_prog.o: mbnavadjust_prog.c mbnavadjust.h  $(INCDIR)/mb_format.h \
		$(INCDIR)/mb_io.h $(INCDIR)/mb_status.h $(INCDIR)/mb_define.h $(INCDIR)/mb_aux.h $(INCDIR)/mb_xgraphics.h
	$(CC) $(CFLAGS) -I$(INCDIR) -c mbnavadjust_prog.c

clean: 
	rm -f core *.o


