<?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[Wie hat eine Makefile für alle Files auszusehen?]]></title><description><![CDATA[<p>Ich möchte eine makefile haben, die alle .cpps im aktuellen Ordner kompiliert (wenn sie älter als die .exes sind).</p>
<p>Miene bisherige sieht so aus:</p>
<pre><code># 	    == Compiler settings ==
# To change the compiler, just edit the following
# lines to your specific compiler commands.
COMPILER = gcc
OUTPUT_COMMAND = -o 
.SUFFIXES: .exe .cpp

#Build rule from .cpp to .exe
.cpp.exe:
	$COMPILER $&lt; OUTPUT_COMMAND

all: Const.exe
</code></pre>
<p>Und so rufe ich es auf:<br />
<strong>g++ make makefile</strong><br />
aber ich bekomme immer nur<br />
<strong>makefile: no such file or directory</strong> ausgegeben, obwohl ich im richtigen Verzeichnis bin und die Datei auch einfach nur makefile heißt, ohne Endung.</p>
<p>In der makefile würde ich jetzt hinter <em>all</em> all die Files eingeben, die kompiliert werden sollten.</p>
<p>Was mache ich in der makefile alles falsch, bzw. gibt es irgendeine makefile, die gnadenlos jede (zu alte) File kompiliert, ohne, dass man alles eintragen muss? <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /></p>
<p>PS: <a href="http://i36.tinypic.com/14jvy8h.jpg" rel="nofollow">http://i36.tinypic.com/14jvy8h.jpg</a> =O</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/252432/wie-hat-eine-makefile-für-alle-files-auszusehen</link><generator>RSS for Node</generator><lastBuildDate>Mon, 14 Sep 2026 11:27:40 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/252432.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 19 Oct 2009 18:25:59 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Wie hat eine Makefile für alle Files auszusehen? on Mon, 19 Oct 2009 18:25:59 GMT]]></title><description><![CDATA[<p>Ich möchte eine makefile haben, die alle .cpps im aktuellen Ordner kompiliert (wenn sie älter als die .exes sind).</p>
<p>Miene bisherige sieht so aus:</p>
<pre><code># 	    == Compiler settings ==
# To change the compiler, just edit the following
# lines to your specific compiler commands.
COMPILER = gcc
OUTPUT_COMMAND = -o 
.SUFFIXES: .exe .cpp

#Build rule from .cpp to .exe
.cpp.exe:
	$COMPILER $&lt; OUTPUT_COMMAND

all: Const.exe
</code></pre>
<p>Und so rufe ich es auf:<br />
<strong>g++ make makefile</strong><br />
aber ich bekomme immer nur<br />
<strong>makefile: no such file or directory</strong> ausgegeben, obwohl ich im richtigen Verzeichnis bin und die Datei auch einfach nur makefile heißt, ohne Endung.</p>
<p>In der makefile würde ich jetzt hinter <em>all</em> all die Files eingeben, die kompiliert werden sollten.</p>
<p>Was mache ich in der makefile alles falsch, bzw. gibt es irgendeine makefile, die gnadenlos jede (zu alte) File kompiliert, ohne, dass man alles eintragen muss? <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /></p>
<p>PS: <a href="http://i36.tinypic.com/14jvy8h.jpg" rel="nofollow">http://i36.tinypic.com/14jvy8h.jpg</a> =O</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1794990</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1794990</guid><dc:creator><![CDATA[C-reator]]></dc:creator><pubDate>Mon, 19 Oct 2009 18:25:59 GMT</pubDate></item><item><title><![CDATA[Reply to Wie hat eine Makefile für alle Files auszusehen? on Mon, 19 Oct 2009 18:36:04 GMT]]></title><description><![CDATA[<p>Da ist sehr viel falsch, du solltest dich nochmal mit den Grundlagen von Makefiles beschäftigen. Die gröbsten Fehler:</p>
<ol>
<li>Dein Makefile ist intern inkonsistent und selbst wenn es funktionieren würde, wären die Kommandos Blödsinn</li>
<li>Make ist ein eigenständiges Programm und hat mit dem Compiler nix zu tun. Man ruft es gewöhnlich einfach mittels 'make' auf und es wird dann das Makefile im aktuellen Verzeichnis verarbeitet.</li>
<li>Du willst die cpp kompilieren, wenn sie <strong>älter</strong> als die exes sind? Wozu soll das gut sein? Ich bin nichtmal sicher, ob make das überhaupt kann.</li>
</ol>
]]></description><link>https://www.c-plusplus.net/forum/post/1794998</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1794998</guid><dc:creator><![CDATA[SeppJ]]></dc:creator><pubDate>Mon, 19 Oct 2009 18:36:04 GMT</pubDate></item><item><title><![CDATA[Reply to Wie hat eine Makefile für alle Files auszusehen? on Mon, 19 Oct 2009 19:59:33 GMT]]></title><description><![CDATA[<p>SeppJ schrieb:</p>
<blockquote>
<p>Da ist sehr viel falsch, du solltest dich nochmal mit den Grundlagen von Makefiles beschäftigen. Die gröbsten Fehler:</p>
<ol>
<li>Dein Makefile ist intern inkonsistent und selbst wenn es funktionieren würde, wären die Kommandos Blödsinn</li>
<li>Make ist ein eigenständiges Programm und hat mit dem Compiler nix zu tun. Man ruft es gewöhnlich einfach mittels 'make' auf und es wird dann das Makefile im aktuellen Verzeichnis verarbeitet.</li>
<li>Du willst die cpp kompilieren, wenn sie <strong>älter</strong> als die exes sind? Wozu soll das gut sein? Ich bin nichtmal sicher, ob make das überhaupt kann.</li>
</ol>
</blockquote>
<ol start="3">
<li>Ich meinte natürlich umgekehrt.</li>
</ol>
<p>Und wie hätte nun ein makefile auszusehen, das einfach alle Dateien in einem Ordner kompiliert? Das ist erst einmal das einzige Anwendungsgebiet, das ich brauche, deswegen habe ich mich auch dagegen entschieden, mich länger mit makefiles auseinanderzusetzen - sondern erst dann, wenn ich wirklich einen anderen Verwendungszweck finden sollte.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1795036</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1795036</guid><dc:creator><![CDATA[C-reator]]></dc:creator><pubDate>Mon, 19 Oct 2009 19:59:33 GMT</pubDate></item><item><title><![CDATA[Reply to Wie hat eine Makefile für alle Files auszusehen? on Mon, 19 Oct 2009 20:12:36 GMT]]></title><description><![CDATA[<p>Dann guck dir mal das <a href="http://c-plusplus.net/forum/viewtopic-var-t-is-88418.html" rel="nofollow">ultimative Makefile</a> an. Das ist für die meisten einfachen Zwecke gut geeignet.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1795044</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1795044</guid><dc:creator><![CDATA[SeppJ]]></dc:creator><pubDate>Mon, 19 Oct 2009 20:12:36 GMT</pubDate></item></channel></rss>