[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mingw-users
Subject:    Re: [Mingw-users] Makefile question
From:       Greg Chicares <gchicares () sbcglobal ! net>
Date:       2011-02-24 22:01:47
Message-ID: 4D66D54B.2030105 () sbcglobal ! net
[Download RAW message or body]

On 2011-02-24 20:36Z, Alessandro Antonello wrote:
[...]
> root/
> +-> Makefile
> +-> source/
> +-> bin/
> 
> *root* is the root directory of the project structure. Source files are in
> *source* directory and the object and binary files should be written in the
> *bin* directory. The *makefile* will be invoked in the *root* directory.
> My problem is exatly here. I don't know how to build a Makefile that looks for
> the source files in the *source* directory and write the binary files in the
> *bin* directory.

The easiest way IMO is to build in the bin/ directory, and use
VPATH or vpath to find the source in the source/ directory.
See this page:
  http://mad-scientist.net/make/rules.html#rule3
and the white papers on that site (the author is the gnu 'make'
maintainer).

------------------------------------------------------------------------------
Free Software Download: Index, Search & Analyze Logs and other IT data in 
Real-Time with Splunk. Collect, index and harness all the fast moving IT data 
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business 
insights. http://p.sf.net/sfu/splunk-dev2dev 
_______________________________________________
MinGW-users mailing list
MinGW-users@lists.sourceforge.net

This list observes the Etiquette found at 
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may \
cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:mingw-users-request@lists.sourceforge.net?subject=unsubscribe


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic