192 lines
17 KiB
HTML
192 lines
17 KiB
HTML
<!-- HTML header for doxygen 1.8.8-->
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
<!-- For Mobile Devices -->
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
|
<meta name="generator" content="Doxygen 1.8.11"/>
|
|
<script type="text/javascript" src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
|
|
<title>lutin: build system and packager: How to use lutin</title>
|
|
<!--<link href="tabs.css" rel="stylesheet" type="text/css"/>-->
|
|
<script type="text/javascript" src="dynsections.js"></script>
|
|
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="search/searchdata.js"></script>
|
|
<script type="text/javascript" src="search/search.js"></script>
|
|
<script type="text/javascript">
|
|
$(document).ready(function() { init_search(); });
|
|
</script>
|
|
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
|
<link href="customdoxygen.css" rel="stylesheet" type="text/css"/>
|
|
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css">
|
|
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js"></script>
|
|
<script type="text/javascript" src="doxy-boot.js"></script>
|
|
</head>
|
|
<body>
|
|
<nav class="navbar navbar-default" role="navigation">
|
|
<div class="container">
|
|
<div class="navbar-header">
|
|
<a class="navbar-brand">lutin: build system and packager 2.0.0</a>
|
|
</div>
|
|
</div>
|
|
</nav>
|
|
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
|
<div class="content" id="content">
|
|
<div class="container">
|
|
<div class="row">
|
|
<div class="col-sm-12 panel panel-default" style="padding-bottom: 15px;">
|
|
<div style="margin-bottom: 15px;">
|
|
<!-- end header part -->
|
|
<!-- Generated by Doxygen 1.8.11 -->
|
|
<script type="text/javascript">
|
|
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
|
</script>
|
|
<div id="navrow1" class="tabs">
|
|
<ul class="tablist">
|
|
<li><a href="index.html"><span>Main Page</span></a></li>
|
|
<li class="current"><a href="pages.html"><span>Related Pages</span></a></li>
|
|
<li><a href="annotated.html"><span>Classes</span></a></li>
|
|
<li>
|
|
<div id="MSearchBox" class="MSearchBoxInactive">
|
|
<span class="left">
|
|
<img id="MSearchSelect" src="search/mag_sel.png"
|
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
|
alt=""/>
|
|
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
|
onfocus="searchBox.OnSearchFieldFocus(true)"
|
|
onblur="searchBox.OnSearchFieldFocus(false)"
|
|
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
|
</span><span class="right">
|
|
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
|
</span>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<!-- window showing the filter options -->
|
|
<div id="MSearchSelectWindow"
|
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
|
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
|
</div>
|
|
|
|
<!-- iframe showing the search results (closed by default) -->
|
|
<div id="MSearchResultsWindow">
|
|
<iframe src="javascript:void(0)" frameborder="0"
|
|
name="MSearchResults" id="MSearchResults">
|
|
</iframe>
|
|
</div>
|
|
|
|
</div><!-- top -->
|
|
<div class="header">
|
|
<div class="headertitle">
|
|
<div class="title">How to use lutin </div> </div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
<div class="toc"><h3>Table of Contents</h3>
|
|
<ul><li class="level1"><a href="#lutin_use_compile">compile a module: </a></li>
|
|
<li class="level1"><a href="#lutin_use_options">Option working: </a><ul><li class="level2"><a href="#lutin_use_options_global">Global options: </a></li>
|
|
<li class="level2"><a href="#lutin_use_options_help">Display help: </a></li>
|
|
<li class="level2"><a href="#lutin_use_options_color">Build in color: </a></li>
|
|
<li class="level2"><a href="#lutin_use_options_pretty">Display build line in pretty print mode: </a></li>
|
|
<li class="level2"><a href="#lutin_use_options_log">lutin log: </a></li>
|
|
<li class="level2"><a href="#lutin_use_options_cpu">Select the number of CPU core used: </a></li>
|
|
<li class="level2"><a href="#lutin_use_options_rebuild_force">Force rebuild all: </a></li>
|
|
<li class="level2"><a href="#lutin_use_options_strip">Force strip all library and programs: </a></li>
|
|
</ul>
|
|
</li>
|
|
<li class="level1"><a href="#lutin_use_options_cross_compile">Manage Cross compilation: </a></li>
|
|
<li class="level1"><a href="#lutin_use_options_debug_release">Build in debug mode: </a></li>
|
|
<li class="level1"><a href="#lutin_use_options_execute">Execute your program after building it: </a></li>
|
|
<li class="level1"><a href="#lutin_use_options_install">Install your program after building it: </a></li>
|
|
</ul>
|
|
</div>
|
|
<div class="textblock"><p>Lutin permit simply to compile applications and library.</p>
|
|
<p>To simply understand the use, we will use a simple library:</p>
|
|
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> git clone http://github.con/atria-soft/etk.git</div></div><!-- fragment --><h1><a class="anchor" id="lutin_use_compile"></a>
|
|
compile a module: </h1>
|
|
<p>It is really simple:</p>
|
|
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> lutin yourModuleName</div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span> #example:</div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span> lutin etk</div></div><!-- fragment --><h1><a class="anchor" id="lutin_use_options"></a>
|
|
Option working: </h1>
|
|
<p>Lutin have a complex option methodologie. We can consider 3 part of the option:</p><ul>
|
|
<li>global option</li>
|
|
<li>target option</li>
|
|
<li>modules</li>
|
|
</ul>
|
|
<h2><a class="anchor" id="lutin_use_options_global"></a>
|
|
Global options: </h2>
|
|
<p>Globals option is parse first and manage global setting of the build (not specific of a target)</p>
|
|
<p>this keep the last value config set</p>
|
|
<h2><a class="anchor" id="lutin_use_options_help"></a>
|
|
Display help: </h2>
|
|
<p>Availlable everywhere ...</p>
|
|
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> lutin -h</div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span> lutin --help</div></div><!-- fragment --><p>You can see in this help that it take a litle time to react. The first time you run lutin, it parse all the file in your sub-directory. But the system(OS) keep the data in cash, then the next time it is faster.</p>
|
|
<p>At the end of the help you an see an help about the etk librery with the associated help.</p>
|
|
<h2><a class="anchor" id="lutin_use_options_color"></a>
|
|
Build in color: </h2>
|
|
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> lutin -C</div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span> lutin --color</div></div><!-- fragment --><h2><a class="anchor" id="lutin_use_options_pretty"></a>
|
|
Display build line in pretty print mode: </h2>
|
|
<p>when an error apear, the gcc or clang compile line can be really unreadable: </p><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> g++ -o /home/heero/dev/plop/out/Linux_x86_64/release/build/gcc/etk/obj/etk/Color.cpp.o -I/home/heero/dev/plop/etk -std=c++11 -D__CPP_VERSION__=2011 -D__TARGET_OS__Linux -D__TARGET_ARCH__x86 -D__TARGET_ADDR__64BITS -D_REENTRANT -DNDEBUG -O3 -fpic -D__STDCPP_GNU__ -Wall -Wsign-compare -Wreturn-type -Wno-write-strings -Woverloaded-virtual -Wnon-virtual-dtor -Wno-unused-variable -DMODE_RELEASE -c -MMD -MP /home/heero/dev/plop/etk/etk/Color.cpp</div></div><!-- fragment --><p>whith this option you can transform this not obvious line in a readable line:</p>
|
|
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> lutin -P</div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span> lutin --pretty</div></div><!-- fragment --><p>result: </p><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> g++ \</div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span>  -o /home/XXX/dev/out/Linux_x86_64/release/build/gcc/etk/obj/etk/Color.cpp.o \</div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span>  -I/home/XXX/dev/etk \</div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span>  -std=c++11 \</div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span>  -D__CPP_VERSION__=2011 \</div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span>  -D__TARGET_OS__Linux \</div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span>  -D__TARGET_ARCH__x86 \</div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span>  -D__TARGET_ADDR__64BITS \</div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span>  -D_REENTRANT \</div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span>  -DNDEBUG \</div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span>  -O3 \</div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span>  -fpic \</div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span>  -D__STDCPP_GNU__ \</div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span>  -Wall \</div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span>  -Wsign-compare \</div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span>  -Wreturn-type \</div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span>  -Wno-write-strings \</div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span>  -Woverloaded-virtual \</div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span>  -Wnon-virtual-dtor \</div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span>  -Wno-unused-variable \</div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span>  -DMODE_RELEASE \</div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span>  -c \</div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span>  -MMD \</div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span>  -MP \</div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span>  /home/XXX/dev/etk/etk/Color.cpp</div></div><!-- fragment --><h2><a class="anchor" id="lutin_use_options_log"></a>
|
|
lutin log: </h2>
|
|
<p>Lutin have an internal log system. To enable or disable it just select your debug level with the option:</p>
|
|
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> lutin -v4</div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span> lutin --verbose 4</div></div><!-- fragment --><p>The level availlables are:</p><ul>
|
|
<li>0: None</li>
|
|
<li>1: error</li>
|
|
<li>2: warning (default)</li>
|
|
<li>3: info</li>
|
|
<li>4: debug</li>
|
|
<li>5: verbose</li>
|
|
<li>6: extreme_verbose</li>
|
|
</ul>
|
|
<h2><a class="anchor" id="lutin_use_options_cpu"></a>
|
|
Select the number of CPU core used: </h2>
|
|
<p>By default lutin manage only 1 CPU core (faster to debug) but for speed requirement you can use use multiple core:</p>
|
|
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> #for 5 core</div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span> lutin -j5</div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span> lutin --jobs 5</div></div><!-- fragment --><h2><a class="anchor" id="lutin_use_options_rebuild_force"></a>
|
|
Force rebuild all: </h2>
|
|
<p>Sometime it is needed to rebuild all the program, just do:</p>
|
|
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> lutin -B</div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span> lutin --force-build</div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span> # or remove the build directory</div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span> rm -rf out/</div></div><!-- fragment --><h2><a class="anchor" id="lutin_use_options_strip"></a>
|
|
Force strip all library and programs: </h2>
|
|
<p>Force strip of output binary (remove symboles)</p>
|
|
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> lutin -s</div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span> lutin --force-strip</div></div><!-- fragment --><h1><a class="anchor" id="lutin_use_options_cross_compile"></a>
|
|
Manage Cross compilation: </h1>
|
|
<p>The main objective of lutin is managing the cross compilation to build from linux to other platform:</p>
|
|
<p>For android you can use:</p>
|
|
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> lutin -t Android your-module</div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span> lutin -t Windows your-module</div></div><!-- fragment --><h1><a class="anchor" id="lutin_use_options_debug_release"></a>
|
|
Build in debug mode: </h1>
|
|
<p>To developp it is fasted with debug tools</p>
|
|
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> lutin -m debug your-module</div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span> lutin -m release your-module</div></div><!-- fragment --><p>You can desire to have compilation optimisation when you build in debug mode:</p>
|
|
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> lutin -m debug --force-optimisation your-module</div></div><!-- fragment --><h1><a class="anchor" id="lutin_use_options_execute"></a>
|
|
Execute your program after building it: </h1>
|
|
<p>You can execute some action in a single line for a module:</p>
|
|
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> lutin -m debug your-module?clean?build?run:--run-option1:--run-option2</div></div><!-- fragment --><p>Why use <code>?run</code> istead of direct calling the binary?</p>
|
|
<p>This is simple: you does nok knoww where the binary is installed... when you build for linux in debug it will be set in <code>out/Linux_x86_64/debug/staging/clang/edn/edn.app/</code> for edn application. Note that the path is distinct for gcc/clang, debug/release, Linux/windows/Android/..., 64/32 bits, and for every applications ...</p>
|
|
<p>Then it is really easy to run the wrong binary.</p>
|
|
<h1><a class="anchor" id="lutin_use_options_install"></a>
|
|
Install your program after building it: </h1>
|
|
<p>You can install your build module:</p>
|
|
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> lutin -m debug your-module?build?install</div></div><!-- fragment --><p>This option is not availlablke on all platform ...</p>
|
|
<p><b>Index:</b></p><ul>
|
|
<li>mainpage</li>
|
|
<li><a class="el" href="lutin_concept.html">Basic concept</a></li>
|
|
<li><a class="el" href="lutin_use.html">How to use lutin</a></li>
|
|
<li><a class="el" href="lutin_module.html">Create a new Module:</a> </li>
|
|
</ul>
|
|
</div></div><!-- contents -->
|
|
<!-- HTML footer for doxygen 1.8.8-->
|
|
<!-- start footer part -->
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<hr class="footer"/><address class="footer"><small>
|
|
Generated on Fri Sep 9 2016 12:15:03 for lutin: build system and packager by  <a href="http://www.doxygen.org/index.html">
|
|
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
|
</a> 1.8.11
|
|
</small></address>
|
|
</body>
|
|
</html>
|