On Wed, 22 Mar 2017, Jose E. Roman wrote: > > > El 22 mar 2017, a las 19:23, Barry Smith <bsm...@mcs.anl.gov> escribió: > > > > > >> On Mar 22, 2017, at 1:08 PM, Austin Herrema <aherr...@iastate.edu> wrote: > >> > >> Thank you for the suggestion! Seems like a reasonable way to go. Not > >> working for me, however, I suspect because I'm using homebrew > >> installations of PETSc and SLEPc (I don't think all the makefiles are > >> kept). Any other way to do the same thing by chance? Worst case I could > >> use a non-homebrew installation but I'd prefer not to mess with that if I > >> can help it... > > > > How do you link a "regular" SLEPc C program using the home-brew > > libraries? You need basically the same link line for f2py as you need for C > > programs. > > > What Barry may be suggesting is: instead of using a script to invoke f2py, > add a rule to your makefile > > modname.so: outer_driver.f90 > f2py -c -m modname outer_driver.f90 file1.o file2.o file3.o > ${SLEPC_EPS_LIB} > > Then 'make modname.so' will pick the libraries from SLEPc makefiles.
I think you would also need a different compile target [apart from the link target above]. And using a diffent suffix for f2py sourcefiles - say '.F90py' might help.. .SUFFIXES: .f90py .f90py.o: f2py -c ${FC_FLAGS} ${FFLAGS} -o $@ $< Satish