[petsc-users] make file issues

Gideon Simpson gideon.simpson at gmail.com
Wed Feb 22 22:24:16 CST 2017


Ok, it should be:

myprog1: prog1.o ${OBJS}
	${CLINKER} -o myprog1 prog1.o ${OBJS} ${PETSC_LIB}


where the application should be called mprog1, and there’s this collection of objects, prog1.o (from prog1.c), along with other object files.

-gideon

> On Feb 22, 2017, at 10:28 PM, Satish Balay <balay at mcs.anl.gov> wrote:
> 
> On Wed, 22 Feb 2017, Gideon Simpson wrote:
> 
>> I’ve been trying to use some code that was originally developed under petsc 3.6.x with my new 3.7.5 installation. I’m having an issue in that the way the code is written, it’s spread across several .c files.  Here are the essential features of the makefile:
>> 
>> all: myprog1
>> 
>> OBJS = functions.o \
>> 	utils.o
>> 
>> include ${PETSC_DIR}/lib/petsc/conf/variables 
>> include ${PETSC_DIR}/lib/petsc/conf/rules
>> 
>> myprog1: prog1.o ${OBJS}
>> 	${CLINKER} -o myprog1 myprog1.o ${OBJS} ${PETSC_LIB}
> 
> Hm - you have prog1.o listed first - and myprog1.o listed later. What is the name of this sourcefile?
> 
> Satish
>> 
>> 
>> make all  yields:
>> 
>> make: *** No rule to make target `myprog1.o', needed by `myprog1'.  Stop
>> 
>> -gideon

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20170222/4791c795/attachment-0001.html>


More information about the petsc-users mailing list