<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[to decide static or dynamic]]></title><description><![CDATA[<p>Dear friends: I am creating a makefile.<br />
Sometimes I can not execute dynamically and sometimes statically. So I want something like following but I do not know how to check in GNU.</p>
<pre><code>#makefile 
     cc = g++
     CFLAGS= -c -g -Wall -O3 -I. -DUNIX 
     if (glibc-static c library exits in operating system), then 
     CFLAGS1= -O3 -I. -DUNIX -static
   else 
     CFLAGS1= -O3 -I. -DUNIX 
    PROG = myprogram
    OBJS = file1.o file2.o 
    $(cc) $(CFLAGS1) -o   $(PROG) $(OBJS)    
  file1.o: file1.cpp file1.h 
		$(cc) $(CFLAGS) file1.cpp file1.h 
  file2.o: file2.cpp file2.h 
		$(cc) $(CFLAGS) file2.cpp file2.h 
PHONY: clean
clean: 	 
		rm $(OBJS)
</code></pre>
<p>I do not know how to check this in GNU make. Can anyone write me the codes for the following macro code for GNU make ?</p>
<pre><code>CFLAGS= -c -g -Wall -O3 -I. -DUNIX
     if (glibc-static c library exits in operating system), then
     CFLAGS1= -O3 -I. -DUNIX -static
else
     CFLAGS1= -O3 -I. -DUNIX
</code></pre>
<p>I would be very thankful</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/315256/to-decide-static-or-dynamic</link><generator>RSS for Node</generator><lastBuildDate>Fri, 31 Jul 2026 01:50:37 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/315256.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 27 Mar 2013 19:42:37 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to to decide static or dynamic on Wed, 27 Mar 2013 19:43:38 GMT]]></title><description><![CDATA[<p>Dear friends: I am creating a makefile.<br />
Sometimes I can not execute dynamically and sometimes statically. So I want something like following but I do not know how to check in GNU.</p>
<pre><code>#makefile 
     cc = g++
     CFLAGS= -c -g -Wall -O3 -I. -DUNIX 
     if (glibc-static c library exits in operating system), then 
     CFLAGS1= -O3 -I. -DUNIX -static
   else 
     CFLAGS1= -O3 -I. -DUNIX 
    PROG = myprogram
    OBJS = file1.o file2.o 
    $(cc) $(CFLAGS1) -o   $(PROG) $(OBJS)    
  file1.o: file1.cpp file1.h 
		$(cc) $(CFLAGS) file1.cpp file1.h 
  file2.o: file2.cpp file2.h 
		$(cc) $(CFLAGS) file2.cpp file2.h 
PHONY: clean
clean: 	 
		rm $(OBJS)
</code></pre>
<p>I do not know how to check this in GNU make. Can anyone write me the codes for the following macro code for GNU make ?</p>
<pre><code>CFLAGS= -c -g -Wall -O3 -I. -DUNIX
     if (glibc-static c library exits in operating system), then
     CFLAGS1= -O3 -I. -DUNIX -static
else
     CFLAGS1= -O3 -I. -DUNIX
</code></pre>
<p>I would be very thankful</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2310404</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2310404</guid><dc:creator><![CDATA[euklid]]></dc:creator><pubDate>Wed, 27 Mar 2013 19:43:38 GMT</pubDate></item><item><title><![CDATA[Reply to to decide static or dynamic on Wed, 27 Mar 2013 19:50:33 GMT]]></title><description><![CDATA[<p>perhaps(?) compile and link a test.cpp with static lib, show if it worked, and call your makefile recursively with the new information.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2310407</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2310407</guid><dc:creator><![CDATA[volkard]]></dc:creator><pubDate>Wed, 27 Mar 2013 19:50:33 GMT</pubDate></item></channel></rss>