Skip to content

Instantly share code, notes, and snippets.

@dpo
Created July 17, 2014 17:33
Show Gist options
  • Select an option

  • Save dpo/e48ce85975937f9a3b6d to your computer and use it in GitHub Desktop.

Select an option

Save dpo/e48ce85975937f9a3b6d to your computer and use it in GitHub Desktop.
prefix = $(shell brew --prefix mumps)
libdir = $(prefix)/lib
incdir = $(prefix)/include # parallel MUMPS
mpiincdir = $(shell brew --prefix open-mpi)/include
#incdir = $(prefix)/libexec/include # sequential MUMPS
seqlib = #-lmpiseq
SRC = mumps_cmplx_p.f90 mumps_p.f90 call_mumps_cmplx_p.f90 call_mumps_p.f90
LIB = -L$(libdir) $(seqlib) -ldmumps -lzmumps -lmumps_common -lpord
%.o: %.f90
gfortran -I$(incdir) -I$(mpiincdir) -fPIC -fcray-pointer -c $<
all: ${SRC:.f90=.o}
libtool -dynamic -undefined dynamic_lookup ${SRC:.f90=.o} -o ../lib/MUMPS $(LIB)
clean:
rm *.o
veryclean:
rm ../lib/MUMPS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment