help-make
[Top][All Lists]
Advanced

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

Re: Change makefile for profiling ?


From: Greg Chicares
Subject: Re: Change makefile for profiling ?
Date: Wed, 16 Sep 2009 11:13:35 +0000
User-agent: Thunderbird 2.0.0.21 (Windows/20090302)

On 2009-09-16 09:21Z, Axel Etzold wrote:
> 
> I have doenloaded a (quite large GNU-licensed) software package that
> implements a script language for some very specific calculations.
> This software makes use of all sorts of libraries written in C for 
> arbitrary precision calculations, export to Gnuplot etc.
> 
> It is installed using the usual make-make install process on Linux.
> 
> Is there a way I could change the Makefile such that profiling 
> (http://en.wikipedia.org/wiki/Profiling_(computer_programming))
> can be enabled ?

This isn't really a gnu make question, but, assuming your compiler is
gcc, add '-pg' to CFLAGS and LDFLAGS and rebuild from scratch, e.g.:
  CFLAGS='-pg' LDFLAGS='-pg' ./configure && make
then use the profiler 'gprof', which is part of gnu binutils.




reply via email to

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