Solved

"make debug" in command line

Posted on 2004-08-24
6
251 Views
Last Modified: 2013-12-26
I have makefile like (by name "makefile"),

my_program: processing.o gui.o
      c++ processing.o gui.o -o my_program

- If I give a command "make debug" in command line the above pgm should compile in debug mode. How to achieve this?

-thanks
0
Comment
Question by:princyrajan
  • 5
6 Comments
 
LVL 38

Expert Comment

by:yuzh
ID: 11889356
Try to run:
make -dD

instead of  "make debug"

man make
to learn more deatails
0
 
LVL 38

Expert Comment

by:yuzh
ID: 11889394
or
make -dDD
0
 

Author Comment

by:princyrajan
ID: 11889515
No my friends, If I give like "make debug", the pgm inside i.e
"c++ processing.o gui.o  -o my_program" should compile in debug mode like,
"c++ processing.o gui.o -g -o my_program"

-thanks

0
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 
LVL 38

Expert Comment

by:yuzh
ID: 11889678
Add the followings in your Makefile

debug:
            make -dDD


then try
make debug
0
 
LVL 38

Expert Comment

by:yuzh
ID: 11889705
In most of the case "make debug" is for debug the C codes, but you want to do it for Makefile.
0
 
LVL 38

Accepted Solution

by:
yuzh earned 250 total points
ID: 11889730
Sorry, I did read your comment in (http:#11889515), you mean use -g with the complier.

Here's the example:
http://vergil.chemistry.gatech.edu/resources/programming/c-tutorial/make.html
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now