#		$Id: makefile.in,v 1.2 2001/04/11 19:58:09 pwessel Exp $
#
#	Makefile for xgrid directory
#	X Windows application xgridedit
#	Contributed by Hugh Fisher, 1992
#
#	Brought under autoconf by Lloyd Parkes, May-2000.

include ../makegmt.macros

CDF	= -L$(NETCDF)/lib -lnetcdf

OBJS= 	xgrid_utility.o xgrid_Xutility.o xgrid_Canvas.o \
	xgrid_Panner.o xgrid_GMTgrid.o xgrid_controls.o \
	xgrid_messages.o

EDITOBJS= xgrid_view.o xgrid_textView.o xgrid_textInput.o

#	Location of GMT and CDF header files

CFLAGS=	$(CC_OPT) $(WIN32) -I$(srcdir) -I$(NETCDF)/include @X_CFLAGS@ @CFLAGS@
XLIBS=@X_PRE_LIBS@ @X_LIBS@ -lXt -lXaw -lXmu -lXext -lX11 @X_EXTRA_LIBS@ -L.. -L$(libdir) -lgmt -lpsl -lnetcdf

all:		@buildtarget@

install:	@installtarget@

xgridedit-install:
		$(INSTALL) xgridedit$(EXE) $(bindir)

uninstall:
		\rm -f $(bindir)/xgridedit$(EXE)

spotless:	clean
		\rm -f makefile config.cache config.log config.status

clean:
		rm -f *.o xgridedit$(EXE) .gmt*

xgridedit:	$(OBJS) $(EDITOBJS) xgridedit.o
		$(CC) $(CFLAGS) xgridedit.o -o xgridedit $(OBJS) \
			$(EDITOBJS) $(CDF) $(XLIBS) $(LIBS) $(LDFLAGS)

xgridedit.o:	xGridEdit.c xgrid_utility.h xgrid_controls.h \
			xgrid_messages.h xgrid_view.h xgrid_textInput.h
		$(CC) $(CFLAGS) -c xGridEdit.c -o xgridedit.o

xgrid_utility.o:	xgrid_utility.h

xgrid_Xutility.o:	xgrid_utility.h xgrid_Xutility.h

xgrid_Canvas.o:		xgrid_Canvas.h xgrid_CanvasP.h

xgrid_Panner.o:		xgrid_Canvas.h xgrid_Panner.h xgrid_PannerP.h

xgrid_GMTgrid.o:	xgrid_utility.h xgrid_GMTgrid.h

xgrid_controls.o:	xgrid_utility.h xgrid_Xutility.h xgrid_controls.h

xgrid_messages.o:	xgrid_utility.h xgrid_Xutility.h xgrid_messages.h

#	xGridEdit

xgrid_textView.o:	xgrid_utility.h xgrid_Xutility.h xgrid_GMTgrid.h \
			xgrid_Canvas.h xgrid_Panner.h xgrid_textView.h

xgrid_textInput.o:	xgrid_utility.h xgrid_Xutility.h xgrid_GMTgrid.h \
			xgrid_textInput.h

xgrid_view.o:		xgrid_utility.h xgrid_Xutility.h xgrid_GMTgrid.h \
			xgrid_view.h
