swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

CFLAGS, CPPFLAGS, etc. (was Re: profiling: why does it not work anymore


From: Paul Johnson
Subject: CFLAGS, CPPFLAGS, etc. (was Re: profiling: why does it not work anymore
Date: Mon, 27 Sep 1999 13:22:19 -0500

"Marcus G. Daniels" wrote:
> 
> >>>>> "PJ" == Paul Johnson <address@hidden> writes:
> 
> PJ> Then I try to access that with "gprof mousetrap" and look at the
> PJ> abuse I get:
> 
> PJ> $ gprof mousetrap gprof: mousetrap: not in a.out format
> 
> Use "gprof .libs/mousetrap gmon.out".
> 
It may be that I need Makefile re-education in Swarm-2.0.  WHen I ran
this command, 

$ gprof .libs/mousetrap gmon.out
gprof: gmon.out file is missing call-graph data

Recall I had in my Makefile 

override CFLAGS+= -pg

Then I studied the compile output and I saw the -pg flag was in the
linking commands but it did not appear in any of the compiles of the
individual object files.
So, in /usr/etc/swarm/Makefile.common, I added -pg to the OBJCFLAGS and
that made the profiling compile in the individual files.

Anyway, since I've been through this first with CPPFLAGS and now
CFLAGS/OBJCFLAGS, I figured I'd better check to see if I've got this
correct.  My conclusions are:


1. We should no longer do command line Flag-Setting with make, as in 

make CPPFLAGS=-DMYSETTING

because it obliterates the CPPFLAGS now set in the Swarm Makefile.common
file.  Rather, the right thing is to add a line toward the end of the
Makefile

override CPPFLAGS += -DMYSETTING 

2. If one wants to add profiling information, for example, the Makefile
must include provision for both CFLAGS and OBJCFLAGS. 

-- 
Paul E. Johnson                       email: address@hidden
Dept. of Political Science            http://lark.cc.ukans.edu/~pauljohn
University of Kansas                  Office: (785) 864-9086
Lawrence, Kansas 66045                FAX: (785) 864-5700

                  ==================================
   Swarm-Support is for discussion of the technical details of the day
   to day usage of Swarm.  For list administration needs (esp.
   [un]subscribing), please send a message to <address@hidden>
   with "help" in the body of the message.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]