[petsc-users] about make code with Petsc

Matthew Knepley knepley at gmail.com
Thu Oct 13 08:35:30 CDT 2011


On Thu, Oct 13, 2011 at 8:21 AM, behzad baghapour <
behzad.baghapour at gmail.com> wrote:

> Dear all,
>
> I want to create code objects in different folder like "object" but I
> received "no rule to make target". The makefile is in the source files
> folder.
> Please tell me a hint for it.
>

The PETSc make rules always put the *.o files in the same directory as the
source. If you want then in a different place,
you can put in an explicit 'mv' in your rule for the executable. There is
also an experimental Python system, but I would
not use it unless you have a lot of experience.

  Thanks,

     Matt


> Here is my makefile:
>
> SHELL=/bin/bash
>
> OBJDIR   = object/
> MYOBJ    = # my object files #
>
> include ${PETSC_DIR}/conf/variables
> include ${PETSC_DIR}/conf/rules
>
> OBJLIST = $(addprefix $(OBJDIR), $(MYOBJ))
>
> code: ${OBJLIST} chkopts
>     -${CLINKER} -o code ${OBJLIST} ${INCDIR} ${PETSC_LIB}
>
> Thanks,
>
> --
> ==================================
> Behzad Baghapour
> Ph.D. Candidate, Mechecanical Engineering
> University of Tehran, Tehran, Iran
> https://sites.google.com/site/behzadbaghapour
> Fax: 0098-21-88020741
> ==================================
>
>


-- 
What most experimenters take for granted before they begin their experiments
is infinitely more interesting than any results to which their experiments
lead.
-- Norbert Wiener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20111013/ea2f27c7/attachment.htm>


More information about the petsc-users mailing list