<?xml version="1.0"?> 

<!--
	description:

		"Using gecc"

	tool: "Gobo Eiffel C Compilation"
	copyright: "Copyright (c) 2018, Eric Bezault and others"
	license: "MIT License"
	date: "$Date$"
	revision: "$Revision$"
-->

<chapter xmlns="http://www.gobosoft.com/eiffel/gobo/documentation" id="gecc/usage">
<chapterinfo>
	<copyright>
		<year>2018</year>
		<holder>Eric Bezault</holder>
	</copyright>
	<author>
		<firstname>Eric</firstname><surname>Bezault</surname>
	</author>
	<email>ericb@gobosoft.com</email>
	<date>6 October 2018</date>
</chapterinfo>

<title>Using gecc</title>

<section><title>Command-line options</title>
<para>
The usual way to invoke <projectname>gecc</projectname> is as follows:
<blockquote>
	<filename>gecc &lt;script_filename&gt;</filename>
</blockquote>

This will read the C compilation command-lines generated by <projectname>gec</projectname>
in the script file <filename>&lt;script_filename&gt;</filename> (typically of the form 
<filename>&lt;system_name&gt;.bat</filename> or <filename>&lt;system_name&gt;.sh</filename>).
It will execute them (except the last one) concurrently using a number of threads corresponding
to the number of CPUs available on the machine), and then will execute the last line (which
is supposed to be the link command to generate the executable file).
</para><para>
Here is the list of options that can be used with <projectname>gecc</projectname>:
<variablelist>
	<varlistentry>
		<term>
			<filename>-h</filename>
		</term>
		<term>
			<filename>--help</filename>
		</term>
		<listitem><para>
			Print a summary of the command-line options of <projectname>gecc</projectname> and exit.
		</para></listitem>
	</varlistentry>
	<varlistentry>
		<term>
			<filename>--thread=&lt;thread_count&gt;</filename>
		</term>
		<listitem><para>
			Number of threads to be used to run <projectname>gecc</projectname>.
			Negative numbers -N mean &quot;number of CPUs - N&quot;.
			(default: number of CPUs)
		</para></listitem>
	</varlistentry>
	<varlistentry>
		<term>
			<filename>-V</filename>
		</term>
		<term>
			<filename>--version</filename>
		</term>
		<listitem><para>
			Print the version number of <projectname>gecc</projectname> and exit.
		</para></listitem>
	</varlistentry>
</variablelist>
</para>
</section>

</chapter>
