ALL: default
##### User configurable options #####

MPI_CC      = /proj/tpfimos/larour/Libraries/linux/mpich2-1.0.2p1/bin/mpicc
MPI_CLINKER = $(MPI_CC)
#
MPI_INC     = 
MPI_LIBS    = 
CLFGAS      = 
MPE_GRAPH   = @MPE_GRAPHICS@
MPE_INCDIR  = /proj/tpfimos/larour/Libraries/linux/mpich2-1.0.2p1/src/mpe2/include
MPE_LIBDIR  = /proj/tpfimos/larour/Libraries/linux/mpich2-1.0.2p1/src/mpe2/lib
PROF_LIBS   = -L$(MPE_LIBDIR) -lmpe -L/usr/X11R6/lib -lX11 $(MPI_LIBS) -lm
#
INCLUDE_DIR = -I$(MPE_INCDIR) $(MPI_INC)
LDFLAGS     = 

RM          = rm

### End User configurable options ###

VPATH=.:$(srcdir)

srcdir      = /proj/tpfimos/larour/Libraries/linux/mpich2-1.0.2p1/src/mpe2/src/graphics/contrib/mandel

CC_FLAGS   = $(CFLAGS) $(INCLUDE_DIR) $(MPE_COPTS)
CC_LDFLAGS = $(LDFLAGS) $(CFLAGS) $(MPE_LDOPTS)
EXECS      = pmandel

.SUFFIXES: .c .o 

.c.o:
	$(MPI_CC) $(CC_FLAGS) -c $<

default: $(EXECS)

fract_gen.o: fract_gen.h pmandel.h

pm_genproc.o: pmandel.h fract_gen.h

pmandel.o: pmandel.h fract_gen.h lists.h pm_genproc.h

pm_separate_rect.o: pmandel.h pm_genproc.h

pmandel: pmandel.o pm_genproc.o fract_gen.o pm_separate_rect.o lists.o args.o
	$(MPI_CLINKER) $(CC_LDFLAGS) -o $@ $? $(PROF_LIBS)

clean:
	@-$(RM) -f *.o *~ PI* $(EXECS) *.log *.out *.ln

distclean: clean
	@-$(RM) -f Makefile

lint:
	lint -chv $(CFLAGS) $(MPE_GRAPH) $(INCLUDE_DIR) pmandel.c \
	          pm_genproc.c fract_gen.c pm_separate_rect.c lists.c args.c
