XCOMM  Copyright (c) 2008 Sandia Corporation.  Under the terms of Contract
XCOMM  DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
XCOMM  certain rights in this software
XCOMM  
XCOMM  Redistribution and use in source and binary forms, with or without
XCOMM  modification, are permitted provided that the following conditions are
XCOMM  met:
XCOMM  
XCOMM      * Redistributions of source code must retain the above copyright
XCOMM        notice, this list of conditions and the following disclaimer.
XCOMM  
XCOMM      * Redistributions in binary form must reproduce the above
XCOMM        copyright notice, this list of conditions and the following
XCOMM        disclaimer in the documentation and/or other materials provided
XCOMM        with the distribution.
XCOMM  
XCOMM      * Neither the name of Sandia Corporation nor the names of its
XCOMM        contributors may be used to endorse or promote products derived
XCOMM        from this software without specific prior written permission.
XCOMM  
XCOMM  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
XCOMM  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
XCOMM  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
XCOMM  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
XCOMM  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
XCOMM  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
XCOMM  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
XCOMM  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
XCOMM  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
XCOMM  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
XCOMM  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
XCOMM  

CODE = gjoin

#if NeedsDoubleEscape
DEFINES = -DNeedsDoubleEscape
#endif

#if defined(AlphaArchitecture)
F77DEBUGFLAGS = -g
#endif

SRCS1 = gjoin.f \
	gj_chgint.f gj_dbmirr.f gj_expxyz.f gj_initin.f gj_matxyz.f gj_movrea.f \
	gj_munnps.f gj_ordix.f  gj_rdgen.f  gj_rotxyz.f gj_wrgen.f  gj_zmmap.f  \
	gj_comand.f gj_dbpini.f gj_fixmap.f gj_intcnt.f gj_mirss.f  gj_munelb.f  \
	gj_munxyz.f gj_ordstr.f gj_renelb.f gj_setitl.f gj_zmess.f  gj_zmnps.f  \
	gj_dbmir1.f gj_dorot.f  gj_getall.f gj_inigen.f gj_irennp.f gj_movint.f \
	gj_muness.f gj_offset.f gj_outlog.f gj_renix.f  gj_setsta.f gj_zmfixd.f \
	gj_zmxyz.f

SRCSF = gj_prtelb.F gj_prtess.F gj_prtnps.F

SRCSf = ${SRCSF:.F=.f}
OBJS1 = ${SRCS1:.f=.o}
OBJSF = ${SRCSF:.F=.o}

SRCS = $(SRCS1) $(SRCSF)
OBJS = $(OBJS1) $(OBJSF)
LIBS = $(EXOIIV2FOR) $(EXOIIV2C) $(NETCDF) $(SUPLIB) $(SUPES)

NormalFortranTarget($(CODE),$(OBJS),NullParameter,NullParameter,$(LIBS))

InstallProgram($(CODE),$(BINDIR))
InstallProgram(gjoin2,$(BINDIR))

gjoin2: gjoin
	$(CP) gjoin gjoin2

CleanupCapF($(SRCSf))
ExtraStuffToClean(gjoin2)
DependTarget()

