[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-chat] Makefile question
From: |
David Kelly |
Subject: |
Re: [avr-chat] Makefile question |
Date: |
Sun, 12 Feb 2006 23:03:19 -0600 |
On Feb 12, 2006, at 9:06 PM, Rick Mann wrote:
Hi guys, sorry if this isn't the right place for this question.
I have a Makefile in a directory. I'd like all my .c files to live
in "src" directory under that, and I'd like all intermediate files
to go to an "obj" directory next to "src". What's the best way to
do that? Should I have a separate Makefile inside the "src" dir?
How do I change a Makefile that finds everything at the top level
to find it (and put it) in the right places? Just add relative
paths to things?
BSD Make will automatically put the object files in obj/ if the
directory exists. Apparently GNU Make will not. Usually just moving
to obj/ is plenty to cut down on transient files polluting one's
working directory rather than to also move the source files into a
separate directory.
If you have so many source files that src/ is necessary then it
probably would be best to put a Makefile in each src/, and another in
src1/ .... etc.
Probably ought to have an include/ directory as well.
--
David Kelly N4HHE, address@hidden
========================================================================
Whom computers would destroy, they must first drive mad.