#     The MB-system:	Makefile.template  6/23/95
#	$Id: Makefile.template 1770 2009-10-19 17:16:39Z caress $
#
#     Copyright (c) 1995-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/mbnavedit directory level
# Author:	D. W. Caress
# Date:		June 23, 1995
#
# $Log: Makefile.template,v $
# Revision 5.6  2009/03/13 07:05:58  caress
# Release 5.1.2beta02
#
# Revision 5.5  2006/03/06 21:38:48  caress
# Changed libproj and libgsf to libmbproj and libmbgsf.
#
# Revision 5.4  2003/07/27 20:49:42  caress
# Release 5.0.0
#
# Revision 5.3  2003/03/10 19:58:30  caress
# Added mr1pr library.
#
# Revision 5.2  2002/07/20 20:46:10  caress
# Release 5.0.beta20
#
# Revision 5.1  2001/06/30 17:41:04  caress
# Release 5.0.beta01
#
# Revision 5.0  2001/03/22  21:10:23  caress
# Trying to make release 5.0.beta0.
#
# Revision 4.6  2000/09/30  07:21:43  caress
# Snapshot for Dale.
#
# Revision 4.5  1999/12/11  04:42:03  caress
# Moved xgraphics.c to src/xgraphics
#
# Revision 4.4  1999/04/09  22:34:08  caress
# Added time interval plot.
#
# Revision 4.3  1998/10/05  19:17:39  caress
# MB-System version 4.6beta
#
# Revision 4.2  1997/04/21  17:07:38  caress
# MB-System 4.5 Beta Release.
#
# Revision 4.1  1996/04/22  13:22:24  caress
# Now have DTR and MIN/MAX defines in mb_define.h
#
# Revision 4.1  1996/04/22  13:22:24  caress
# Now have DTR and MIN/MAX defines in mb_define.h
#
# Revision 4.0  1995/08/07  18:33:22  caress
# First cut.
#
#
### 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)/mbnavedit

### link the executable
$(BINDIR)/mbnavedit: mbnavedit.o \
		mbnavedit_creation.o \
		mbnavedit_callbacks.o \
		mbnavedit_util.o \
		mbnavedit_prog.o \
		$(LIBDIR)/libmbaux.a \
		$(LIBDIR)/libmbxgr.a \
		$(LIBDIR)/libmbio.a \
		$(PROJLIB) \
		$(GSFLIB) \
		$(LIBDIR)/libmr1pr.a  \
		$(LIBDIR)/libsapi.a
	$(CC) $(CFLAGS) mbnavedit.o \
		mbnavedit_creation.o \
		mbnavedit_callbacks.o \
		mbnavedit_util.o \
		mbnavedit_prog.o \
		$(LIBDIR)/libmbaux.a \
		$(LIBDIR)/libmbxgr.a \
		$(LIBDIR)/libmbio.a \
		$(PROJLIB) \
		$(GSFLIB) \
		$(LIBDIR)/libmr1pr.a  \
		$(LIBDIR)/libsapi.a \
		$(MOTIFLIBS) $(LFLAGS) \
		-o $(BINDIR)/mbnavedit

### compile the source files
mbnavedit.o: mbnavedit.c mbnavedit_creation.h mbnavedit.h \
	mbnavedit_extrawidgets.h
	$(CC) $(CFLAGS) -I$(INCDIR) -I$(MOTIFINCDIR) -c mbnavedit.c
mbnavedit_creation.o: mbnavedit_creation.c mbnavedit_creation.h
	$(CC) $(CFLAGS) -I$(INCDIR) -I$(MOTIFINCDIR) -c mbnavedit_creation.c
mbnavedit_callbacks.o: mbnavedit_callbacks.c mbnavedit.h mbnavedit_creation.h \
	mbnavedit_extrawidgets.h
	$(CC) $(CFLAGS) -I$(INCDIR) -I$(MOTIFINCDIR) -c mbnavedit_callbacks.c
mbnavedit_util.o: mbnavedit_util.c mbnavedit_creation.h
	$(CC) $(CFLAGS) -I$(INCDIR) -I$(MOTIFINCDIR) -c mbnavedit_util.c
mbnavedit_prog.o: mbnavedit_prog.c mbnavedit.h  $(INCDIR)/mb_format.h \
		$(INCDIR)/mb_io.h $(INCDIR)/mb_status.h $(INCDIR)/mb_define.h
	$(CC) $(CFLAGS) -I$(INCDIR) -I$(MOTIFINCDIR) -c mbnavedit_prog.c

clean: 
	rm -f core *.o


