ch03s04.html 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>GNU Makefiles on Linux</title><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><meta name="keywords" content="Intellon, Atheros, Qualcomm, HomePlug, powerline, communications, INT6000, INT6300, INT6400, AR7400, AR7420"><link rel="home" href="index.html" title="Qualcomm Atheros Open Powerline Toolkit"><link rel="up" href="ch03.html" title="Chapter 3.  Software"><link rel="prev" href="ch03s03.html" title="Platform Options"><link rel="next" href="ch03s05.html" title="Stand-alone Compiling on GNU/Linux"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">
  2. GNU Makefiles on Linux
  3. </th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch03s03.html">Prev</a> </td><th width="60%" align="center">Chapter 3. 
  4. Software
  5. </th><td width="20%" align="right"> <a accesskey="n" href="ch03s05.html">Next</a></td></tr></table><hr></div><div class="section" title="GNU Makefiles on Linux"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="software-makefiles"></a>
  6. GNU Makefiles on Linux
  7. </h2></div></div></div><p>
  8. The toolkit includes recursive GNU makefiles for Linux. The <code class="filename">Makefile</code> in the root folder calls Makefiles in subordinate folders. Makefiles in subordinate folders can be run independently to produce individual toolkit components. Developers can control which components are compiled and installed by editing the <code class="constant">FOLDERS</code> symbol in the main Makefile.
  9. </p><p>
  10. Component Makefiles have a standard format that includes the following targets:
  11. </p><div class="variablelist"><dl><dt><span class="term">
  12. compile
  13. </span></dt><dd><p>
  14. Compiles source code files prior to installation. Intermmediate files and target files are created in the same folder as the Makefile. This is the default target. That means that typing <span class="command"><strong>make</strong></span> or <span class="command"><strong>make compile</strong></span> have the same result.
  15. </p></dd><dt><span class="term">
  16. library
  17. </span></dt><dd><p>
  18. Creates any special folders that are needed for installation. This target is built by the <span class="command"><strong>install</strong></span> target but it can be built independently.
  19. </p></dd><dt><span class="term">
  20. scripts
  21. </span></dt><dd><p>
  22. Installs scripts required for proper toolkit operation. This target must be built explicitly to prevent accidental loss of changes made to existing scripts. This target may be built at any time, before or after the <span class="command"><strong>install</strong></span> target.
  23. </p></dd><dt><span class="term">
  24. manuals
  25. </span></dt><dd><p>
  26. Creates manuals, documents or html pages. Documentation files are not automatically installed by any target. Installation is left to the user.
  27. </p></dd><dt><span class="term">
  28. install
  29. </span></dt><dd><p>
  30. Installs executable files in folder <code class="filename">/usr/local/bin</code>. This target automatically builds the <span class="command"><strong>compile</strong></span> target before installation. This means that <span class="command"><strong>make install</strong></span> will compile and install in one step.
  31. </p></dd><dt><span class="term">
  32. uninstall
  33. </span></dt><dd><p>
  34. Removes installed components. This target does nothing for Makefiles that have <span class="command"><strong>install</strong></span> targets defined.
  35. </p></dd><dt><span class="term">
  36. clean
  37. </span></dt><dd><p>
  38. Removes intermmediate and temporary files. Temporary files are defined by variable <code class="varname">TRASH</code> at the start of each Makefile.
  39. </p></dd><dt><span class="term">
  40. fresh
  41. </span></dt><dd><p>
  42. Removes intermmediate and temporary then re-compiles local targets. It is normally equivalent to <span class="command"><strong>make clean </strong></span> followed by <span class="command"><strong>make compile</strong></span>.
  43. </p></dd></dl></div><p>
  44. Developers wanting to compile the toolkit under <span class="productname">Windows</span>™ should use <span class="productname">Visual Studio .NET</span>™ solution files instead of makefiles.
  45. </p><p>
  46. Developers wanting to compile the toolkit under <span class="application">OpenBSD</span> must make changes to accommodate variations in <span class="application">make</span> program syntax.
  47. </p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch03s03.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="ch03.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ch03s05.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">
  48. Platform Options
  49.  </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> 
  50. Stand-alone Compiling on GNU/Linux
  51. </td></tr></table></div></body></html>