Solved

"make debug" in command line

Posted on 2004-08-24
6
261 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
Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

 
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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Strange date stored 22 156
ODBC Connection Logging, ADO.NET 6 69
while loop over for loop 7 115
sumHeights  challenge 17 75
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
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.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

821 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