<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META content="MSHTML 5.50.4522.1800" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face="Trebuchet MS" color=#0000ff size=2><SPAN
class=431341416-25042001>What about </SPAN></FONT><FONT face="Trebuchet MS"
color=#0000ff size=2><SPAN class=431341416-25042001>about setting an environment
variable, say "DEBUG_OPTS", based on "alldebug" or "allnodebug"?
If you pass in "allnodebug" then you set DEBUG_OPTS to null, but if
you pass in "alldebug" then you set DEBUG_OPTS=-g, or whatever options you
need.</SPAN></FONT></DIV>
<DIV><FONT face="Trebuchet MS" color=#0000ff size=2><SPAN
class=431341416-25042001></SPAN></FONT> </DIV>
<DIV><FONT face="Trebuchet MS" color=#0000ff size=2><SPAN
class=431341416-25042001>Then you can modify your CC/CXX lines to include
${DEBUG_OPTS}. If it's null, it won't affect anything. If it's got
an option in it, then it will modify the CC or CXX lines appropriately.
Obviously you could have a DEBUG_CC_OPTS and DEBUG_CXX_OPTS if that's
necessary.</SPAN></FONT></DIV>
<DIV><FONT face="Trebuchet MS" color=#0000ff size=2><SPAN
class=431341416-25042001></SPAN></FONT> </DIV>
<DIV><FONT face="Trebuchet MS" color=#0000ff size=2><SPAN
class=431341416-25042001>Greg</SPAN></FONT></DIV>
<BLOCKQUOTE
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid">
<DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma
size=2>-----Original Message-----<BR><B>From:</B> don
[mailto:tx.saluki@verizon.net]<BR><B>Sent:</B> Tuesday, April 24, 2001 5:05
PM<BR><B>To:</B> discuss@ntlug.org<BR><B>Subject:</B> Re: [NTLUG:Discuss]
makefile guidance..<BR><BR></FONT></DIV>No, but I have thought of that.
We have one part of the project that has to be compiled with gcc and another
part that has to be compiled with g++. It has to be this way for reasons
I can't go into. That's why everything has to be contained within the
the makefiles and specified with a "make tgt=<platform>
<all/alldebug/allnodebug> ". <BR><BR>Don<BR><BR>George E. Lass
wrote:<BR>
<BLOCKQUOTE cite="mid:3AE5DCB2.EFDA8B9@osc.com" type="cite"><PRE wrap="">I *think* you can just pass the compiler into the makefile:<BR><BR>make CC=gcc -g -Wall (and don't forget -Werror)<BR><BR>--or--<BR><BR>make CC=g++ -g .......<BR><BR><BR>This *should* override the the CC= whatever that is contained in the <BR>makefile itself. Is this what you want to do?<BR><BR><BR>george<BR><BR>don wrote:<BR></PRE>
<BLOCKQUOTE type="cite"><PRE wrap="">Any one have any insight of how to structure a makefile to produce a<BR>non-debug executable and a debug executable ? I could do this in a<BR>brute force option, but I was wondering if anyone has any tricks up<BR>his/her sleeve they'd like to share. Using -d on the command line<BR>isn't really an option due to the size and existing setup of the project.<BR><BR>Currently, we have to do "make tgt=xxx all" to build all the<BR>executables. I'd like to modify it so that the target "all" is<BR>unchanged, and add a "alldebug" and "allnodebug" option. We currently<BR>have to define the compilers as such :<BR><BR>$CC = gcc -g -Wall ...<BR>$CXX = g++ -g -Wall....<BR><BR>and cannot change this either.<BR><BR>Any suggestions ? I have a few ideas, but would be interested in what<BR>y'all have to say.<BR><BR>Thanks in advance,<BR>Don<BR></PRE></BLOCKQUOTE><PRE wrap=""><!---->_______________________________________________<BR><A class=moz-txt-link-freetext href="http://www.ntlug.org/mailman/listinfo/discuss">http://www.ntlug.org/mailman/listinfo/discuss</A><BR><BR><BR></PRE></BLOCKQUOTE><BR></BLOCKQUOTE></BODY></HTML>