4 <h1><a name=
"make" id=
"make">Make
</a></h1>
9 <a href=
"http://www.gnu.org/software/make/" class=
"urlextern" title=
"http://www.gnu.org/software/make/" rel=
"nofollow">Make
</a>:
<a href=
"http://en.wikipedia.org/wiki/Make_(software)" class=
"interwiki iw_wp" title=
"http://en.wikipedia.org/wiki/Make_(software)">Make
</a>
11 <div class=
"plugin_uparrow">
12 <a href=
"#" title=
"Back to top">
13 <img src=
"lib/plugins/uparrow/images/tango-small.png" alt=
"Back to top"/>
18 <!-- SECTION "Make" [1-93] -->
19 <h2><a name=
"smart_makefile" id=
"smart_makefile">Smart Makefile
</a></h2>
24 <a href=
"http://www-etud.iro.umontreal.ca/~petitg/cpp/makefile.html" class=
"urlextern" title=
"http://www-etud.iro.umontreal.ca/~petitg/cpp/makefile.html" rel=
"nofollow">Here
</a>.
26 <div class=
"plugin_uparrow">
27 <a href=
"#" title=
"Back to top">
28 <img src=
"lib/plugins/uparrow/images/tango-small.png" alt=
"Back to top"/>
33 <!-- SECTION "Smart Makefile" [94-191] -->
34 <h2><a name=
"simple_makefile" id=
"simple_makefile">Simple Makefile
</a></h2>
39 This assumes a program.cpp source file.
41 <pre class=
"code make">all
<span class=
"sy0">:
</span> program
42 <span class=
"sy0">./
</span><span class=
"re0">$
<</span>
43 touch
<span class=
"re0">$
<</span>
44 CXXFLAGS
<span class=
"sy0">=
</span> <span class=
"sy0">-
</span>Wall
</pre>
49 <pre class=
"code bash">$
<span class=
"kw2">ls
</span>
51 $
<span class=
"kw2">make
</span>
52 <span class=
"kw2">g++
</span> <span class=
"re5">-Wall
</span> <span class=
"re5">-o
</span> program program.cpp
53 .
<span class=
"sy0">/
</span>program
54 <span class=
"kw2">touch
</span> program
55 $
<span class=
"kw2">ls
</span>
56 program program.cpp makefile
57 $
<span class=
"kw2">make
</span>
58 .
<span class=
"sy0">/
</span>program
59 <span class=
"kw2">touch
</span> program
</pre>
60 <div class=
"plugin_uparrow">
61 <a href=
"#" title=
"Back to top">
62 <img src=
"lib/plugins/uparrow/images/tango-small.png" alt=
"Back to top"/>
67 <!-- SECTION "Simple Makefile" [192-512] -->
68 <h2><a name=
"how_to_install_colormake" id=
"how_to_install_colormake">How to install colormake
</a></h2>
70 <pre class=
"code bash">$
<span class=
"kw2">sudo
</span> <span class=
"kw2">apt-get
</span> <span class=
"kw2">install
</span> colormake
71 $
<span class=
"kw3">cd
</span> <span class=
"sy0">/
</span>usr
<span class=
"sy0">/
</span>local
<span class=
"sy0">/
</span>bin
72 $
<span class=
"kw2">sudo
</span> <span class=
"kw2">ln
</span> <span class=
"re5">-s
</span> <span class=
"sy0">/
</span>usr
<span class=
"sy0">/
</span>bin
<span class=
"sy0">/
</span>colormake
<span class=
"kw2">make
</span></pre>
73 <div class=
"plugin_uparrow">
74 <a href=
"#" title=
"Back to top">
75 <img src=
"lib/plugins/uparrow/images/tango-small.png" alt=
"Back to top"/>
80 <!-- SECTION "How to install colormake" [513-661] -->
81 <h2><a name=
"how_to_access_an_index_of_a_list" id=
"how_to_access_an_index_of_a_list">How to access an index of a list
</a></h2>
83 <pre class=
"code make">all
<span class=
"sy0">:
</span> prog1 prog2
84 <span class=
"sy0">./
</span><span class=
"re0">$
<</span>
85 <span class=
"sy0">./$
</span><span class=
"br0">(</span><span class=
"re1">word
</span> 2<span class=
"sy0">,
</span> <span class=
"re0">$^
</span><span class=
"br0">)</span></pre>
86 <div class=
"tags"><span>
87 <a href=
"/~kssilveira/site/doku.php?id=tag:programming&do=showtag&tag=tag%3Aprogramming" class=
"wikilink1" title=
"tag:programming" rel=
"tag">programming
</a>
89 <div class=
"plugin_uparrow">
90 <a href=
"#" title=
"Back to top">
91 <img src=
"lib/plugins/uparrow/images/tango-small.png" alt=
"Back to top"/>
96 <!-- SECTION "How to access an index of a list" [662-] -->