Solved

"make debug" in command line

Posted on 2004-08-24
6
268 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

MongoDB Through a MySQL Lens

This article looks at MongoDB and MySQL, and covers high-level MongoDB strengths, weaknesses, features, and uses from the perspective of an SQL user.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
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.
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…

623 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