#  (C) 1993 by Argonne National Laboratory and Mississipi State University.
#      All rights reserved.  See COPYRIGHT in top-level directory.
#

##### User configurable options #####

ARCH        = @ARCH@
BOPT        = @BOPT@
MPIR_HOME   = @MPIR_HOME@
CC          = @CC@
CLINKER     = $(CC)
CFLAGS	    = @CFLAGS@
F77         = @F77@
AR          = @AR@
RANLIB      = @RANLIB@
INCLUDE_DIR = @INCLUDE_PATH@ -I$(MPIR_HOME)/include \
	      -I$(MPIR_HOME)/mpe
DEVICE      = @DEVICE@
OPTFLAGS    = @OPTFLAGS@
TOOLS_DIR   = @TOOLS_DIR@

### End User configurable options ###

CFLAGS = $(CFLAGS) $(OPTFLAGS) $(INCLUDE_DIR) -DMPI_$(ARCH)
LIBNAME  = $(TOOLS_DIR)/libs/libs$(BOPT)$(PROFILE)/$(ARCH)/system.a


default: ../wrappergen/wrappergen log_wrappers.c time_wrappers.c visual_mess.c

../wrappergen/wrappergen:
	(cd ../wrappergen; make wrappergen; )

log_wrappers.c: log_wrappers.w
	../wrappergen/wrappergen -w log_wrappers.w -o log_wrappers.c 

time_wrappers.c: time_wrappers.w
	../wrappergen/wrappergen -w time_wrappers.w -o time_wrappers.c 

visual_mess.c: visual_mess.w
	../wrappergen/wrappergen -w visual_mess.w -w message_prof.w \
	-o visual_mess.c 

.c.o:
	$(CC) $(CFLAGS) -c $*.c

clean:
	/bin/rm -rf *.o *.c *~
