summaryrefslogtreecommitdiff
path: root/doc/usage.tex
diff options
context:
space:
mode:
authorAlasdair Armstrong2019-02-26 17:25:55 +0000
committerAlasdair Armstrong2019-02-27 14:15:23 +0000
commit87140e97e3c1b2b1713a4458f8f5e622625c0683 (patch)
tree3a01372caf14335d2fd987723c5c893b0a7752cb /doc/usage.tex
parent8985e0ffc1b23ef5039383d99bdf46da10a131c1 (diff)
Make -o option work as usual with C compilation
Diffstat (limited to 'doc/usage.tex')
-rw-r--r--doc/usage.tex12
1 files changed, 8 insertions, 4 deletions
diff --git a/doc/usage.tex b/doc/usage.tex
index 2711fff5..a7532ddf 100644
--- a/doc/usage.tex
+++ b/doc/usage.tex
@@ -87,10 +87,14 @@ To compile Sail into C, the \verb+-c+ option is used, like so:
\begin{verbatim}
sail -c FILES 1> out.c
\end{verbatim}
-The transated C is currently printed to stdout, so this should be
-redirected to a file as above. To produce an executable this needs to
-be compiled and linked with the C files in the \verb+sail/lib+
-directory:
+The transated C is by default printed to stdout, but one can also use
+the \verb+-o+ option to output to a file, so
+\begin{verbatim}
+sail -c FILES -o out
+\end{verbatim}
+will generate a file called \verb+out.c+. To produce an executable
+this needs to be compiled and linked with the C files in the
+\verb+sail/lib+ directory:
\begin{verbatim}
gcc out.c $SAIL_DIR/lib/*.c -lgmp -lz -I $SAIL_DIR/lib/ -o out
\end{verbatim}