Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Ok here is what I do:</p> <p>I use one Makefile at the root and wildcard patterns to collect <strong>all</strong> files in a directory. Note that I assume that foo/*.c will make up foo.so for example. This makes the maintaining the Makefile minimal, since just adding a file to the directory automatically adds it to the build.</p> <p>Since it is make you are using I am assuming (I do that for my projects) that a compiler is used that uses gcc (cc) compatible command line syntax. So MSC is out of order; but don't get frustrated, I do most of my development (unfortunately) on Windows and use MinGW with MSys; works like a charm. Produces native binaries, but was built with a Posix compliant build environment.</p> <p>Dependency checking is done with the somewhat standard <code>-MD</code> switch. I then include all the *.d files into the Makefile. I build the patterns out of the automatically collected source files.</p> <p>Finally unit tests are implemented with the "standard" <code>check</code> target. The check target is like the all target, except it depends on the unit test and executes that once everything is built. I do it this way so that you can just build the project or build the unit tests (and the rest of the project) separably. When I am not developing the project I want to just build it and be done with it.</p> <p>Here is an example of how I do it: <a href="https://github.com/rioki/c9y/blob/master/Makefile" rel="nofollow">https://github.com/rioki/c9y/blob/master/Makefile</a> It also has the <code>install</code>, <code>uninstall</code> and <code>dist</code> targets.</p> <p>As you can see everything is plain make, no recursive make calls and all is relatively simple. I used automake and autoconf and I will never do that again; also other build tools are out of the question, if I need to install foojam or barmake to build something, I normally ditch that project immediately. </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload