<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.0.2" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>LeafLabs Garden &#187; Topic: Seriously though, how really to make our own Makefiles for larger projects?</title>
		<link>http://forums.leaflabs.com/topic.php?id=1008</link>
		<description>A place to share, learn, and grow...</description>
		<language>en-US</language>
		<pubDate>Fri, 22 Jan 2016 00:13:07 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.0.2</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>http://forums.leaflabs.com/search.php</link>
		</textInput>
		<atom:link href="http://forums.leaflabs.com/rss.php?topic=1008" rel="self" type="application/rss+xml" />

		<item>
			<title>tdc218 on "Seriously though, how really to make our own Makefiles for larger projects?"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1008&amp;page=3#post-24309</link>
			<pubDate>Sun, 07 Apr 2013 19:21:07 +0000</pubDate>
			<dc:creator>tdc218</dc:creator>
			<guid isPermaLink="false">24309@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Got it!  My Makefile and rules.mk are here for anyone who wants them for reference: &#60;a href=&#34;http://pastebin.com/bQndR95C&#34; rel=&#34;nofollow&#34;&#62;http://pastebin.com/bQndR95C&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;Thanks for all of the assistance.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>tdc218 on "Seriously though, how really to make our own Makefiles for larger projects?"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1008&amp;page=3#post-24002</link>
			<pubDate>Sun, 31 Mar 2013 08:42:08 +0000</pubDate>
			<dc:creator>tdc218</dc:creator>
			<guid isPermaLink="false">24002@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Nailed it.  Sort of.  I did know about that and I did copy the blank main.cpp from the example test into ~/libmaple and I thought I'd double checked it.  I think what happened was a permissions mismatch, the copy failed, and I missed it.  Now that is corrected the example project will compile and so will mine using makefiles derived from said example project.&#60;/p&#62;
&#60;p&#62;However, it still compiles everything every time.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>ventosus on "Seriously though, how really to make our own Makefiles for larger projects?"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1008&amp;page=3#post-24001</link>
			<pubDate>Sun, 31 Mar 2013 04:07:40 +0000</pubDate>
			<dc:creator>ventosus</dc:creator>
			<guid isPermaLink="false">24001@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;This sounds like you miss the empty main.cpp as stated in the README.txt&#60;br /&#62;
&#60;a href=&#34;https://github.com/mbolivar/example-libmaple-project&#34; rel=&#34;nofollow&#34;&#62;https://github.com/mbolivar/example-libmaple-project&#60;/a&#62;
&#60;/p&#62;</description>
		</item>
		<item>
			<title>tdc218 on "Seriously though, how really to make our own Makefiles for larger projects?"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1008&amp;page=3#post-24000</link>
			<pubDate>Sat, 30 Mar 2013 20:57:52 +0000</pubDate>
			<dc:creator>tdc218</dc:creator>
			<guid isPermaLink="false">24000@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Ok, reloaded all of libmaple, ran make on the example project - it failed with&#60;br /&#62;
&#60;code&#62;make[1]: *** No rule to make target&#60;/code&#62;/home/tdc/libmaple/main.cpp', needed by `build/main.o'.  Stop.&#60;br /&#62;
make[1]: Leaving directory `/home/tdc/maple/test'&#60;br /&#62;
make: *** [sketch] Error 2&#60;/p&#62;
&#60;p&#62;Same result in my own project.&#60;/p&#62;
&#60;p&#62;Blew away those makefiles, copied Makefile and build-target.mk from ~/libmaple, edited it as billw described a year ago.  This fails with&#60;br /&#62;
&#60;code&#62;make: *** No rule to make target&#60;/code&#62;build/main.o', needed by `build/maple_mini.elf'.  Stop.&#60;/p&#62;
&#60;p&#62;This really shouldn't be this hard.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>tdc218 on "Seriously though, how really to make our own Makefiles for larger projects?"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1008&amp;page=3#post-23999</link>
			<pubDate>Sat, 30 Mar 2013 19:04:30 +0000</pubDate>
			<dc:creator>tdc218</dc:creator>
			<guid isPermaLink="false">23999@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Sigh.  No joy.  I downloaded the example project - it compiles fine.  I changed one file and it did the right thing - compiled just that one file, linked, and was happy.&#60;/p&#62;
&#60;p&#62;So I copy Makefile and rules.mk to my project directory, make the minimal changes needed to get it to work and everything compiles fine, but:&#60;/p&#62;
&#60;p&#62;&#60;code&#62;make[1]: *** No rule to make target&#60;/code&#62;build/main.o', needed by `build/maple_mini.elf'.  Stop.&#60;br /&#62;
make[1]: Leaving directory `/home/tdc/maple/et218'&#60;br /&#62;
make: *** [sketch] Error 2`&#60;/p&#62;
&#60;p&#62;And also, if I run make again it compiles everything again.  *smiley of head beating against a brick wall*&#60;/p&#62;
&#60;p&#62;I think at this point my next step is to blow away the whole install and reload it all.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>ventosus on "Seriously though, how really to make our own Makefiles for larger projects?"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1008&amp;page=3#post-23968</link>
			<pubDate>Thu, 28 Mar 2013 12:24:44 +0000</pubDate>
			<dc:creator>ventosus</dc:creator>
			<guid isPermaLink="false">23968@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;I'd take the following approach to debug:&#60;/p&#62;
&#60;p&#62;Start from a clean clone of &#60;a href=&#34;https://github.com/mbolivar/example-libmaple-project&#34; rel=&#34;nofollow&#34;&#62;https://github.com/mbolivar/example-libmaple-project&#60;/a&#62; (check whether this works as intended to exclude the possibility of a damaged make).&#60;/p&#62;
&#60;p&#62;Strip everything in the example project tree that you don't need (check again...)&#60;br /&#62;
Add your project files one at a time (check again...)
&#60;/p&#62;</description>
		</item>
		<item>
			<title>tdc218 on "Seriously though, how really to make our own Makefiles for larger projects?"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1008&amp;page=3#post-23947</link>
			<pubDate>Wed, 27 Mar 2013 21:28:26 +0000</pubDate>
			<dc:creator>tdc218</dc:creator>
			<guid isPermaLink="false">23947@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Here are the results of the test:  &#60;a href=&#34;http://pastebin.com/1TmzEU4c&#34; rel=&#34;nofollow&#34;&#62;http://pastebin.com/1TmzEU4c&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;The maple stuff is located at ~/libmaple&#60;br /&#62;
My project is at ~/maple/et218&#60;br /&#62;
There are 10 .cpp and 10 .h files.&#60;/p&#62;
&#60;p&#62;Per above I did:&#60;br /&#62;
make clean&#60;br /&#62;
make &#38;gt;make_output_1  # contents of make_output_1 at the pastebin link above&#60;br /&#62;
then I edited loop.cpp&#60;br /&#62;
make &#38;gt;make_output_2&#60;/p&#62;
&#60;p&#62;I didn't bother to post the contents of make_output_2 because it was identical with make_output_1 (confirmed with diff).&#60;/p&#62;
&#60;p&#62;In case anyone wonders why the output isn't complete, the compile fails on an error I introduced while making some changes that I haven't gotten back to fixing yet.  For the purposes of fixing the makefile, it doesn't matter - even when the program compiles properly it still recompiles all of libmaple et al every time.&#60;/p&#62;
&#60;p&#62;The whole project is not posted anywhere public.  I would have no objection to doing so if necessary.  It's highly specialized and would probably not be of much interest to anyone unless you happen to be building a large scale miniature locomotive with a Sevcon traction controller in it.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>ventosus on "Seriously though, how really to make our own Makefiles for larger projects?"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1008&amp;page=3#post-23895</link>
			<pubDate>Tue, 26 Mar 2013 03:14:50 +0000</pubDate>
			<dc:creator>ventosus</dc:creator>
			<guid isPermaLink="false">23895@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;@tdc218, ccache is useful if you do a 'make clean' alot (e.g. when building for different targets).&#60;/p&#62;
&#60;p&#62;In my case, make recompiles only the changed sources, so works as intended. However, all object files have to be linked in every time, maybe it's that what you're referring to?&#60;/p&#62;
&#60;p&#62;Maybe it'd help if you'd post the console outputs of your build process somewhere to shed some light on what where make may go wrong on your side. (or a link to your project if it should be open source...)&#60;/p&#62;
&#60;p&#62;&#60;code&#62;&#60;br /&#62;
make clean&#60;br /&#62;
make&#60;br /&#62;
-&#38;gt; console output 1&#60;br /&#62;
-&#38;gt; change a file&#60;br /&#62;
make&#60;br /&#62;
-&#38;gt; console output 2&#60;br /&#62;
&#60;/code&#62;
&#60;/p&#62;</description>
		</item>
		<item>
			<title>tdc218 on "Seriously though, how really to make our own Makefiles for larger projects?"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1008&amp;page=3#post-23893</link>
			<pubDate>Mon, 25 Mar 2013 21:19:43 +0000</pubDate>
			<dc:creator>tdc218</dc:creator>
			<guid isPermaLink="false">23893@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Thank you for the suggestion.  It works, but no differently than the previous Makefile and built-targets.mk that I had.  It still recompiles all of libmaple et al every time.&#60;/p&#62;
&#60;p&#62;I don't see why ccache should be necessary.  It seems to me that it just treats a symptom.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>ventosus on "Seriously though, how really to make our own Makefiles for larger projects?"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1008&amp;page=3#post-23765</link>
			<pubDate>Mon, 25 Mar 2013 04:28:15 +0000</pubDate>
			<dc:creator>ventosus</dc:creator>
			<guid isPermaLink="false">23765@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Obviously libmaples directory tree and build system has changed somewhere in between and those 1year old fixes don't apply anymore...&#60;/p&#62;
&#60;p&#62;I also use mbolivars example project (in conjunction with ccache), I think this does exactly what you're looking after.&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;https://github.com/mbolivar/example-libmaple-project&#34; rel=&#34;nofollow&#34;&#62;https://github.com/mbolivar/example-libmaple-project&#60;/a&#62;
&#60;/p&#62;</description>
		</item>
		<item>
			<title>tdc218 on "Seriously though, how really to make our own Makefiles for larger projects?"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1008&amp;page=3#post-23488</link>
			<pubDate>Sun, 24 Mar 2013 10:57:29 +0000</pubDate>
			<dc:creator>tdc218</dc:creator>
			<guid isPermaLink="false">23488@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Thank you, that is certainly worth investigating, but what I have is a broken makefile, pure and simple.  Before I did the libmaple upgrade as stated a few posts back, it would compile all of the libmaple stuff once the first time, then after that it wold only compile any files that had changed (usually just my project files), at least until I did a make clean.  This is how makefiles are supposed to work.&#60;/p&#62;
&#60;p&#62;Post upgrade, once I finally got the Makefile to compile all of my files and not just main.cpp, it compiles all of libmaple every time.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>ventosus on "Seriously though, how really to make our own Makefiles for larger projects?"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1008&amp;page=3#post-23112</link>
			<pubDate>Sat, 23 Mar 2013 05:08:36 +0000</pubDate>
			<dc:creator>ventosus</dc:creator>
			<guid isPermaLink="false">23112@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Use ccache to speed things up as described here: &#60;a href=&#34;http://leaflabs.com/2012/08/2549&#34; rel=&#34;nofollow&#34;&#62;http://leaflabs.com/2012/08/2549&#60;/a&#62;
&#60;/p&#62;</description>
		</item>
		<item>
			<title>tdc218 on "Seriously though, how really to make our own Makefiles for larger projects?"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1008&amp;page=3#post-23046</link>
			<pubDate>Fri, 22 Mar 2013 20:59:20 +0000</pubDate>
			<dc:creator>tdc218</dc:creator>
			<guid isPermaLink="false">23046@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Got it working, sort of.  I copied Makefile from ~/libmaple to my project directory and edited it as per billw's instructions from a year ago.  I had to keep my old build-targets.mk to get it to work.&#60;/p&#62;
&#60;p&#62;So, it's now finding all of my project files like it should.  Only problem is it recompiles all of libmaple every time.  Can anyone shed some light on a fix for this?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>feurig on "Seriously though, how really to make our own Makefiles for larger projects?"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1008&amp;page=3#post-22978</link>
			<pubDate>Tue, 19 Mar 2013 14:05:59 +0000</pubDate>
			<dc:creator>feurig</dc:creator>
			<guid isPermaLink="false">22978@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Have any of you guys checked out mbolivars example project stuff&#60;br /&#62;
&#60;a href=&#34;https://github.com/mbolivar/example-libmaple-project&#34; rel=&#34;nofollow&#34;&#62;https://github.com/mbolivar/example-libmaple-project&#60;/a&#62; I have been using a derivative of it with xcode happily for a while now.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>tdc218 on "Seriously though, how really to make our own Makefiles for larger projects?"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1008&amp;page=2#post-22974</link>
			<pubDate>Mon, 18 Mar 2013 21:43:53 +0000</pubDate>
			<dc:creator>tdc218</dc:creator>
			<guid isPermaLink="false">22974@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Bump.  Ok, getting back to this a year later.  Had it all working back when so tonight I fired up the Linux box, cd to my project, did a make, and it built fine.&#60;/p&#62;
&#60;p&#62;  Figuring that in a year plus there had probably been some updates I followed the instructions here &#60;a href=&#34;http://leaflabs.com/docs/unix-toolchain.html#getting-updates&#34; rel=&#34;nofollow&#34;&#62;http://leaflabs.com/docs/unix-toolchain.html#getting-updates&#60;/a&#62; and now when I do a make I get:&#60;/p&#62;
&#60;p&#62;&#60;code&#62;blockquote&#60;/code&#62;&#60;br /&#62;
/home/tdc/libmaple/support/make/target-config.mk:23: /maple_mini.mk: No such file or directory&#60;br /&#62;
make: *** No rule to make target `/maple_mini.mk'.  Stop.&#60;br /&#62;
&#60;code&#62;blockquote&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;I've confirmed that maple_nini.mk exists at ~/libmaple/support/make/board-includes/ but obviously it's not finding it.  How do I fix this please and thank you?&#60;/p&#62;
&#60;p&#62;ps - I apologize if bumping a year old thread is a breach of netiquette in these parts.  It seemed the most logical place and the guidelines are silent on this issue.
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
