Dear all,
I hope you're having a nice day.
I met a problem on makefile of PETSc. Original PETSc has the makefile in
the same directory of the .c files. However, I want to put all .c files to
another directory. I changed the makefile also; however it always has a
error saying the PETSc
On Thu, Aug 25, 2011 at 6:56 PM, Alan Wei zhenglun.wei at gmail.com wrote:
Dear all,
I hope you're having a nice day.
I met a problem on makefile of PETSc. Original PETSc has the makefile
in the same directory of the .c files. However, I want to put all .c files
to another directory.
ComputeRHS.o: Programs/ComputeRHS.c Programs/ComputeRHS.h Programs/def.h chkopts
-${CLINKER} -o ComputerRHS.o Programs/ComputeRHS.c ${PETSC_SNES_LIB}
Don't use the CLINKER to compile code. That is only for linking the
executable. So for example you should be able to us
myprogram:
PETSc makefiles don't support multiple source dirs properly.
As an alternative - you can try using gnumake's vpath feature [thats
lets you treat multiple sourcedirs as a single source dir].
Attaching makefile with this change..
Satish
On Thu, 25 Aug 2011, Alan Wei wrote:
Dear all,
I
Thanks a lot for the explanation. I will simply leave the makefile in the
same directory of codes to avoid making mistakes.
best,
Alan
On Thu, Aug 25, 2011 at 2:01 PM, Barry Smith bsmith at mcs.anl.gov wrote:
ComputeRHS.o: Programs/ComputeRHS.c Programs/ComputeRHS.h Programs/def.h
chkopts