Thread: compiling using gprof

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Mar 2007
    Posts
    65

    compiling using gprof

    i am trying to modifying my makefile so that I can use the gprof profiler. Hwowever the following file doesn,t generate the .o executable.

    Code:
    supersonic = Impinging_jet_21
    
    OBJECTS = supersonic_ob.o flow_field.o matrix_col.o matrix_square.o matrix_functions.o matrix_derivative.o function_declarations.o output.o explicit.o Time_Step.o  Boundary.o
    
    HEADERS = Constants.h flow_field.h function_declarations.h matrix_col.h  
    
    ARCH = Linux
    CPP = g++
    CPPFLAGS = -D$(ARCH) -Wall -Wno-deprecated -pg
    LIBRARIES = -lm -lg2c
    
    supersonic: $(OBJECTS) $(HEADERS)
    	$(CPP) $(CPPFLAGS) -o $(supersonic) $(OBJECTS) $(LIBRARIES)
    
    clean:
    	rm *.o $(supersonic)
    
    .c.o:
    	gcc  -Wall -pg $<
    Last edited by Salem; 05-25-2008 at 10:33 PM. Reason: fix code tags - please review before submit

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Can gprof go into each self-defined function?
    By lehe in forum C Programming
    Replies: 3
    Last Post: 03-26-2009, 10:30 PM
  2. Newbie Compiling Problem
    By Deronius in forum C++ Programming
    Replies: 3
    Last Post: 06-15-2008, 11:23 AM
  3. Screwy Linker Error - VC2005
    By Tonto in forum C++ Programming
    Replies: 5
    Last Post: 06-19-2007, 02:39 PM
  4. Problem Compiling
    By Flakster in forum C++ Programming
    Replies: 4
    Last Post: 06-13-2006, 01:09 AM
  5. Compiling
    By Dae in forum C++ Programming
    Replies: 7
    Last Post: 06-15-2005, 01:08 AM