#*************************** The MPI Interface ************************* # # Select an MPI interface: mgmpi or mgmpi_stubs. # # If MPI is not needed, one can select mgmpi_stubs, # allowing the creation of an executable without # the need to load the MPI library. However, # all MPI options are completely disabled. # MPI_INTERFACE = mgmpi #MPI_INTERFACE = mgmpi_stubs # # Set the path for MPI include files and libraries. # This is not needed if mgmpi_stubs was selected. # ifeq (${MPI_INTERFACE}, mgmpi) MPI_PATH = /local/mpich2 MPI_INCLUDE = -I${MPI_PATH}/include MPI_LIBRARY = -L${MPI_PATH}/lib -lmpich else MPI_INCLUDE = MPI_LIBRARY = endif # #************************ The X-Windows Interface ********************** # # Select an X-Windows interface: xgui or xgui_stubs. # # If X-Windows is not needed, one can select xgui_stubs, # allowing the creation of an executable without # the need to load the X-Windows libraries. However, # the X-Windows GUI and associated graphics options # are completely disabled. # X11_INTERFACE = xgui #X11_INTERFACE = xgui_stubs # # Set the path for X-Windows include files and libraries. # This is not needed if xgui_stubs was selected. # ifeq (${X11_INTERFACE}, xgui) X11_INCLUDE = -I/local/include -I/usr/X11/include X11_LIBRARY = -L/local/lib -lXm -L/usr/X11/lib -lXt -lX11 else X11_INCLUDE = X11_LIBRARY = endif # #********************* The Socket Graphics Interface ******************* # # Select a Socket Graphics interface: mgvio or mgvio_stubs. # # If SG is not needed, one can select mgvio_stubs, # allowing the creation of an executable without # the need to load the VIO library. However, # the SG and BH graphics options are completely disabled. # # The VIO/SG software package is available on the home page # of Michael Holst: # http://ccom.ucsd.edu/~mholst/ # The package provides both the SG OpenGL display tool and # the maloc library. # VIO_INTERFACE = mgvio #VIO_INTERFACE = mgvio_stubs # # Set the path for VIO include files and libraries. # This is not needed if mgvio_stubs was selected. # ifeq (${VIO_INTERFACE}, mgvio) VIO_INCLUDE = -I/local/include/maloc VIO_LIBRARY = -L/local/lib -lmaloc else VIO_INCLUDE = VIO_LIBRARY = endif # #***************************** C and FORTRAN *************************** # # Define C and Fortran compilers and compile options # ifeq (${MPI_INTERFACE}, mgmpi) CC = ${MPI_PATH}/bin/mpicc -Wall F90 = ${MPI_PATH}/bin/mpif90 else CC = /sw/bin/gcc-4 -O -Wall F90 = /sw/bin/gfortran -O endif # #*********************************************************************** # # The rest of the Makefile is independent of environment # INCS = ${MPI_INCLUDE} ${X11_INCLUDE} ${VIO_INCLUDE} LIBS = ${MPI_LIBRARY} ${X11_LIBRARY} ${VIO_LIBRARY} MG = atest.o pltmg.o mgxdr.o\ ${MPI_INTERFACE}.o ${X11_INTERFACE}.o ${VIO_INTERFACE}.o PROBS = circle.o jcn.o domains.o naca.o square.o ob.o\ mnsurf.o burger.o battery.o ident.o\ control.o message.o usmap.o .f.o: ${F90} ${INCS} -c $< -o $@ .c.o: ${CC} ${INCS} -c $< -o $@ Circle: ${MG} circle.o ${F90} ${MG} circle.o ${LIBS} -o Circle Jcn: ${MG} jcn.o ${F90} ${MG} jcn.o ${LIBS} -o Jcn Domains: ${MG} domains.o ${F90} ${MG} domains.o ${LIBS} -o Domains Naca: ${MG} naca.o ${F90} ${MG} naca.o ${LIBS} -o Naca Square: ${MG} square.o ${F90} ${MG} square.o ${LIBS} -o Square Ob: ${MG} ob.o ${F90} ${MG} ob.o ${LIBS} -o Ob Mnsurf: ${MG} mnsurf.o ${F90} ${MG} mnsurf.o ${LIBS} -o Mnsurf Burger: ${MG} burger.o ${F90} ${MG} burger.o ${LIBS} -o Burger Battery: ${MG} battery.o ${F90} ${MG} battery.o ${LIBS} -o Battery Ident: ${MG} ident.o ${F90} ${MG} ident.o ${LIBS} -o Ident Control: ${MG} control.o ${F90} ${MG} control.o ${LIBS} -o Control Message: ${MG} message.o ${F90} ${MG} message.o ${LIBS} -o Message Usmap: ${MG} usmap.o ${F90} ${MG} usmap.o ${LIBS} -o Usmap ${MG} ${PROBS}: mg0.o clean: rm -f *.o fort.* core* *.rw *.mod journl*.jnl* *.out jnltmp*.jnl* \ Domains* Circle* Mnsurf* Jcn* Naca* Square* Usmap* \ Control* Burger* Ob* Battery* Ident* Message* PI*