# This Makefile.in created by simplemake.  Do not edit

# @configure_input@

# --------------------------------------------------------------------------
all: all-redirect

SHELL           = @SHELL@
AR              = @AR@
RANLIB          = @RANLIB@
LIBTOOL         = @LIBTOOL@
CREATESHLIB     = @CREATESHLIB@
C_LINK_SHL      = @C_LINK_SHL@
INSTALL         = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA    = @INSTALL_DATA@
MKDIR_P         = @MKDIR_P@
master_top_srcdir  = @master_top_srcdir@
top_builddir    = @master_top_builddir@
abs_builddir    = @abs_builddir@
srcdir          = @srcdir@
abs_srcdir      = @abs_srcdir@
top_srcdir      = @top_srcdir@
libdir          = @libdir@
exec_prefix     = @exec_prefix@
prefix          = @prefix@
DEFS            = @DEFS@ -I. -I${srcdir}
CPPFLAGS        = @CPPFLAGS@
LIBS            = @LIBS@
MAKE            = @MAKE@
MPILIBNAME      = @MPILIBNAME@
PMPILIBNAME     = @PMPILIBNAME@

CC              = @CC@
CFLAGS          = @CFLAGS@
C_COMPILE       = $(CC) $(DEFS) $(INCLUDES) $(CFLAGS) $(CPPFLAGS)
C_LINK         = $(CC)
CC_SHL          = @CC_SHL@
C_COMPILE_SHL   = $(CC_SHL) $(DEFS) $(INCLUDES) $(CFLAGS) $(CPPFLAGS)
LDFLAGS     =  @LDFLAGS@ 

VPATH = .:@srcdir@
mpi_sources = 
INCLUDES = -I../../include -I${top_srcdir}/src/include

.SUFFIXES:
.SUFFIXES: .o .lo .c 
.c.o:
	$(C_COMPILE) -c $<
.c.lo:
	$(C_COMPILE_SHL) -c $< -o _s$*.o
	@mv -f _s$*.o $*.lo
.c:
	$(C_COMPILE) -o $* $< $(LDFLAGS) $(LIBS)
apply: 
	$(ACTION) $(ACTION_INPUT)
clean: 
	-@rm -f *.o ${srcdir}/*.o qdemo tvtest
	-@rm -f .libstamp0 .libstamp1 .libstamp2 .libstamp3 
	-@rm -f qdemo.exe tvtest.exe
	-@rm -f core core.[0-9]*
	-@rm -f *.lo ${srcdir}/*.lo
	-@rm -f *.irlog*
distclean:  clean distclean-xxx remove-makefile
distclean-xxx:
	-@rm -f Makefile
	-@rm -rf autom4te*.cache
	-@rm -rf $(DEPS_DIR)
	-@rm -f TAGS
remove-makefile:
	rm -f Makefile
remove-genmakefiles:
	rm -f  Makefile
all-redirect: .libstamp0 ../../../lib/lib${MPILIBNAME}.a
	@if [ -n "@NO_WEAK_SYM@" ] ; then \
	    ${MAKE} .libstamp2 ; \
	fi
	@if [ "@ENABLE_SHLIB@" != "none" ] ; then \
	    ${MAKE} .libstamp1 ; \
	    ${MAKE} libtvmpich2.@SHLIB_EXT@ ; \
	    if [ -n "@NO_WEAK_SYM@" ] ; then \
	        ${MAKE} .libstamp3 ; \
	    fi ; \
	fi

.libstamp0 ../../../lib/lib${MPILIBNAME}.a: dbginit.o 
	${AR} cr ../../../lib/lib${MPILIBNAME}.a $?
	${RANLIB} ../../../lib/lib${MPILIBNAME}.a
	date > .libstamp0
.libstamp1 ../../../lib/lib${MPILIBNAME}.la: dbginit.lo 
	${AR} cr ../../../lib/lib${MPILIBNAME}.la $?
	date > .libstamp1
libtvmpich2.la: dll_mpich2.lo 
	${AR} cr libtvmpich2.la $?

# --------------------------------------------------------------------------
.libstamp2: _dbginit.o 
	${AR} cr ../../../lib/lib${PMPILIBNAME}.a $?
	${RANLIB} ../../../lib/lib${PMPILIBNAME}.a
	date > .libstamp2
.libstamp3: _dbginit.lo 
	${AR} cr ../../../lib/lib${PMPILIBNAME}.la $?
	date > .libstamp3
_dbginit.o: dbginit.c
	$(C_COMPILE) -c @PROFILE_DEF_MPI@ $(srcdir)/dbginit.c -o _dbginit.o
_dbginit.lo: dbginit.c
	$(C_COMPILE_SHL) -c @PROFILE_DEF_MPI@ $(srcdir)/dbginit.c -o _dbginit.lo
# --------------------------------------------------------------------------
qdemo: qdemo.o   
	$(C_LINK) $(CFLAGS) $(LDFLAGS) -o qdemo qdemo.o  ${LIBS}
tvtest: tvtest.o dll_mpich2.o dbgstub.o  ../../../lib/libpmpich.a  
	$(C_LINK) $(CFLAGS) $(LDFLAGS) -o tvtest tvtest.o dll_mpich2.o \
	dbgstub.o  -L../../../lib -lpmpich -lmpich  ${LIBS} 
# --------------------------------------------------------------------------
# Install target
install:  FORCE_TARGET 
	if [ ! -d ${DESTDIR}${libdir} ] ; then $(MKDIR_P) ${DESTDIR}${libdir} ; fi
	if [ -s libtvmpich2.@SHLIB_EXT@ ] ; then $(CREATESHLIB) --mode=install libtvmpich2.@SHLIB_EXT@ ${DESTDIR}${libdir}/libtvmpich2.@SHLIB_EXT@ ; fi

install-strip:
	$(MAKE) INSTALL_STRIP_FLAG=-s install
uninstall: 
	-rm -f ${DESTDIR}${libdir}/libtvmpich2.@SHLIB_EXT@
installcheck: 
# --------------------------------------------------------------------------
# --------------------------------------------------------------------------
SOURCES         =  tvtest.c dll_mpich2.c dbgstub.c qdemo.c dbginit.c \
	dll_mpich2.c 
ETAGS           = @ETAGS@ @ETAGSADD@
HEADERFILES     = $(HEADERS)
SOURCEFILES     = $(SOURCES)
tags: TAGS
TAGS: Makefile${HEADERFILES} ${SOURCEFILES}
	here=`cd ../../.. && pwd` ; cd ${srcdir} && $(ETAGS) -o $$here/TAGS --append ${HEADERFILES} ${SOURCEFILES}
# --------------------------------------------------------------------------
# All of these routines are internal

# tvtest builds a main program that uses the routines in dll_mpich2 to 
# access the internal structure of an MPICH2 program.  This is only a partial
# test, but it allows a developer to check out the basic functioning of 
# dll_mpich2.

# There is no static debugger interface library
# Force a custom target
./libtvmpich2.@SHLIB_EXT@: ./libtvmpich2.la
	(cd . && $(CREATESHLIB) --mode=link -cc="@CC_SHL_DBG@" -clink="@C_LINK_SHL_DBG@" -o libtvmpich2.la  -rpath $(libdir) )

#
# We need to make sure that dbginit is compiled with -g, so
# we use an explicit target.  Note that there are no PMPI functions in
# this directory)
dbginit.o: $(srcdir)/dbginit.c
	$(C_COMPILE) -g -c @PROFILE_DEF_MPI@ $<

#
# We require special steps to compile the debugger interface library.
dll_mpich2.lo: $(srcdir)/dll_mpich2.c $(srcdir)/mpich2_dll_defs.h
	@CC_SHL_DBG@ $(DEFS) $(INCLUDES) $(CFLAGS) $(CPPFLAGS) -g -c $(srcdir)/dll_mpich2.c -o _sdll_mpich2.o
	@mv -f _sdll_mpich2.o dll_mpich2.lo
#
# We may want to add some documentation on using the various debugger
# interfaces by adding the appropriate files to the doc lists



FORCE_TARGET:

