Replaced the cl65 docs by an sgml version
git-svn-id: svn://svn.cc65.org/cc65/trunk@256 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
@@ -1,48 +1,32 @@
|
|||||||
|
<!doctype linuxdoc system>
|
||||||
|
|
||||||
|
<article>
|
||||||
|
<title>cl65 Users Guide
|
||||||
|
<author>Ullrich von Bassewitz, <tt/uz@musoftware.de/
|
||||||
|
<date>01.08.2000
|
||||||
|
<abstract>cl65 is the compile & link utility for cc65.
|
||||||
|
</abstract>
|
||||||
|
|
||||||
cl65
|
<!-- Table of contents -->
|
||||||
|
<toc>
|
||||||
|
|
||||||
Compile and link utility for cc65
|
<!-- Begin the document -->
|
||||||
|
|
||||||
(C) Copyright 1998-2000 Ullrich von Bassewitz
|
<sect>Overview<p>
|
||||||
(uz@musoftware.de)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Contents
|
|
||||||
--------
|
|
||||||
|
|
||||||
1. Overview
|
|
||||||
|
|
||||||
2. Basic Usage
|
|
||||||
|
|
||||||
3. More usage
|
|
||||||
|
|
||||||
4. Examples
|
|
||||||
|
|
||||||
5. Bugs/Feedback
|
|
||||||
|
|
||||||
6. Copyright
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
1. Overview
|
|
||||||
-----------
|
|
||||||
|
|
||||||
cl65 is a frontend for cc65, ca65 and ld65. While you may not use the full
|
cl65 is a frontend for cc65, ca65 and ld65. While you may not use the full
|
||||||
power of the tools when calling them through cl65, most features are
|
power of the tools when calling them through cl65, most features are
|
||||||
available, and the use of cl65 is much simpler.
|
available, and the use of cl65 is much simpler.
|
||||||
|
|
||||||
|
|
||||||
|
<sect>Basic Usage<p>
|
||||||
2. Basic Usage
|
|
||||||
--------------
|
|
||||||
|
|
||||||
The cl65 compile and link utility may be used to compile, assemble and
|
The cl65 compile and link utility may be used to compile, assemble and
|
||||||
link files. While the separate tools do just one step, cl65 knows how to
|
link files. While the separate tools do just one step, cl65 knows how to
|
||||||
build object files from C files (by calling the compiler, then the
|
build object files from C files (by calling the compiler, then the
|
||||||
assembler) and other things.
|
assembler) and other things.
|
||||||
|
|
||||||
|
<tscreen><verb>
|
||||||
---------------------------------------------------------------------------
|
---------------------------------------------------------------------------
|
||||||
Usage: cl65 [options] file
|
Usage: cl65 [options] file
|
||||||
Short options:
|
Short options:
|
||||||
@@ -80,17 +64,20 @@ Long options:
|
|||||||
--version Print the version number
|
--version Print the version number
|
||||||
--verbose Verbose mode
|
--verbose Verbose mode
|
||||||
---------------------------------------------------------------------------
|
---------------------------------------------------------------------------
|
||||||
|
</verb></tscreen>
|
||||||
|
|
||||||
Most of the options have the same meaning than the corresponding compiler,
|
Most of the options have the same meaning than the corresponding compiler,
|
||||||
assembler or linker option. See the documentation for these tools for an
|
assembler or linker option. See the documentation for these tools for an
|
||||||
explanation. If an option is available for more than one of the tools, it
|
explanation. If an option is available for more than one of the tools, it
|
||||||
is set for all tools, where it is available. One example for this is -v:
|
is set for all tools, where it is available. One example for this is <tt/-v/:
|
||||||
The compiler, the assembler and the linker are all called with the -v
|
The compiler, the assembler and the linker are all called with the <tt/-v/
|
||||||
switch.
|
switch.
|
||||||
|
|
||||||
There are a few remaining options that control the behaviour of cl65:
|
There are a few remaining options that control the behaviour of cl65:
|
||||||
|
|
||||||
-S
|
<descrip>
|
||||||
|
|
||||||
|
<tag><tt>-S</tt></tag>
|
||||||
|
|
||||||
This option forces cl65 to stop after the assembly step. This means that
|
This option forces cl65 to stop after the assembly step. This means that
|
||||||
C files are translated into assembler files, but nothing more is done.
|
C files are translated into assembler files, but nothing more is done.
|
||||||
@@ -98,7 +85,7 @@ There are a few remaining options that control the behaviour of cl65:
|
|||||||
are ignored.
|
are ignored.
|
||||||
|
|
||||||
|
|
||||||
-c
|
<tag><tt>-c</tt></tag>
|
||||||
|
|
||||||
This options forces cl65 to stop after the assembly step. This means
|
This options forces cl65 to stop after the assembly step. This means
|
||||||
that C and assembler files given on the command line are translated into
|
that C and assembler files given on the command line are translated into
|
||||||
@@ -106,7 +93,7 @@ There are a few remaining options that control the behaviour of cl65:
|
|||||||
given on the command line are ignored.
|
given on the command line are ignored.
|
||||||
|
|
||||||
|
|
||||||
-o name
|
<tag><tt>-o name</tt></tag>
|
||||||
|
|
||||||
The -o option is used for the target name in the final step. This causes
|
The -o option is used for the target name in the final step. This causes
|
||||||
problems, if the linker will not be called, and there are several input
|
problems, if the linker will not be called, and there are several input
|
||||||
@@ -115,8 +102,7 @@ There are a few remaining options that control the behaviour of cl65:
|
|||||||
shouldn't use -o when more than one output file is created.
|
shouldn't use -o when more than one output file is created.
|
||||||
|
|
||||||
|
|
||||||
-t sys
|
<tag><tt>-t sys, --target sys</tt></tag>
|
||||||
--target sys
|
|
||||||
|
|
||||||
The default for this option is different from the compiler and linker in
|
The default for this option is different from the compiler and linker in
|
||||||
the case that the option is missing: While the compiler and linker will
|
the case that the option is missing: While the compiler and linker will
|
||||||
@@ -124,70 +110,76 @@ There are a few remaining options that control the behaviour of cl65:
|
|||||||
target system by default. This was choosen since most people seem to use
|
target system by default. This was choosen since most people seem to use
|
||||||
cc65 to develop for the C64.
|
cc65 to develop for the C64.
|
||||||
|
|
||||||
|
</descrip>
|
||||||
|
|
||||||
|
|
||||||
3. More usage
|
|
||||||
-------------
|
<sect>More usage<p>
|
||||||
|
|
||||||
Since cl65 was created to simplify the use of the cc65 development
|
Since cl65 was created to simplify the use of the cc65 development
|
||||||
package, it tries to be smart about several things.
|
package, it tries to be smart about several things.
|
||||||
|
|
||||||
- If you don't give a target system on the command line, cl65
|
<itemize>
|
||||||
|
|
||||||
|
<item> If you don't give a target system on the command line, cl65
|
||||||
defaults to the C64.
|
defaults to the C64.
|
||||||
|
|
||||||
- When linking, cl65 will supply the names of the startup file and
|
<item> When linking, cl65 will supply the names of the startup file and
|
||||||
library for the target system to the linker, so you don't have to do
|
library for the target system to the linker, so you don't have to do
|
||||||
that.
|
that.
|
||||||
|
|
||||||
- If the final step is the linker, and the name of the output file was
|
<item> If the final step is the linker, and the name of the output file was
|
||||||
not explicitly given, cl65 will use the name of the first input file
|
not explicitly given, cl65 will use the name of the first input file
|
||||||
without the extension, provided that the name of this file has an
|
without the extension, provided that the name of this file has an
|
||||||
extension. So you don't need to name the executable name in most
|
extension. So you don't need to name the executable name in most
|
||||||
cases, just give the name of your "main" file as first input file.
|
cases, just give the name of your "main" file as first input file.
|
||||||
|
</itemize>
|
||||||
|
|
||||||
|
|
||||||
|
<sect>Examples<p>
|
||||||
4. Examples
|
|
||||||
-----------
|
|
||||||
|
|
||||||
The morse trainer software, which consists of one C file (morse.c) and one
|
The morse trainer software, which consists of one C file (morse.c) and one
|
||||||
assembler file (irq.s) will need the following separate steps to compile
|
assembler file (irq.s) will need the following separate steps to compile
|
||||||
into an executable named morse:
|
into an executable named morse:
|
||||||
|
|
||||||
|
<tscreen><verb>
|
||||||
cc65 -g -Oi -t c64 morse.c
|
cc65 -g -Oi -t c64 morse.c
|
||||||
ca65 -g morse.s
|
ca65 -g morse.s
|
||||||
ca65 -g irq.s
|
ca65 -g irq.s
|
||||||
ld65 -t c64 -o morse c64.o morse.o irq.o c64.lib
|
ld65 -t c64 -o morse c64.o morse.o irq.o c64.lib
|
||||||
|
</verb></tscreen>
|
||||||
|
|
||||||
When using cl65, this is simplified to
|
When using cl65, this is simplified to
|
||||||
|
|
||||||
|
<tscreen><verb>
|
||||||
cl65 -g -Oi morse.c irq.s
|
cl65 -g -Oi morse.c irq.s
|
||||||
|
</verb></tscreen>
|
||||||
|
|
||||||
As a general rule, you may use cl65 instead of cc65 at most times,
|
As a general rule, you may use cl65 instead of cc65 at most times,
|
||||||
especially in makefiles to build object files directly from C files. Use
|
especially in makefiles to build object files directly from C files. Use
|
||||||
|
|
||||||
|
<tscreen><verb>
|
||||||
.c.o:
|
.c.o:
|
||||||
cl65 -g -Oi $<
|
cl65 -g -Oi $<
|
||||||
|
</verb></tscreen>
|
||||||
|
|
||||||
to do this.
|
to do this.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
5. Bugs/Feedback
|
<sect>Bugs/Feedback<p>
|
||||||
----------------
|
|
||||||
|
|
||||||
If you have problems using the utility, if you find any bugs, or if you're
|
If you have problems using the utility, if you find any bugs, or if you're
|
||||||
doing something interesting with it, I would be glad to hear from you.
|
doing something interesting with it, I would be glad to hear from you. Feel
|
||||||
Feel free to contact me by email (uz@musoftware.de).
|
free to contact me by email (<htmlurl url="uz@cc65.org" name="uz@cc65.org">).
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
6. Copyright
|
<sect>Copyright<p>
|
||||||
------------
|
|
||||||
|
|
||||||
cl65 is (C) Copyright 1998-2000 Ullrich von Bassewitz. For usage of the
|
cl65 (and all cc65 binutils) are (C) Copyright 1998-2000 Ullrich von
|
||||||
binaries and/or sources the following conditions do apply:
|
Bassewitz. For usage of the binaries and/or sources the following
|
||||||
|
conditions do apply:
|
||||||
|
|
||||||
This software is provided 'as-is', without any expressed or implied
|
This software is provided 'as-is', without any expressed or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
@@ -197,14 +189,18 @@ Permission is granted to anyone to use this software for any purpose,
|
|||||||
including commercial applications, and to alter it and redistribute it
|
including commercial applications, and to alter it and redistribute it
|
||||||
freely, subject to the following restrictions:
|
freely, subject to the following restrictions:
|
||||||
|
|
||||||
1. The origin of this software must not be misrepresented; you must not
|
<enum>
|
||||||
|
<item> The origin of this software must not be misrepresented; you must not
|
||||||
claim that you wrote the original software. If you use this software
|
claim that you wrote the original software. If you use this software
|
||||||
in a product, an acknowledgment in the product documentation would be
|
in a product, an acknowledgment in the product documentation would be
|
||||||
appreciated but is not required.
|
appreciated but is not required.
|
||||||
2. Altered source versions must be plainly marked as such, and must not
|
<item> Altered source versions must be plainly marked as such, and must not
|
||||||
be misrepresented as being the original software.
|
be misrepresented as being the original software.
|
||||||
3. This notice may not be removed or altered from any source
|
<item> This notice may not be removed or altered from any source
|
||||||
distribution.
|
distribution.
|
||||||
|
</enum>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</article>
|
||||||
|
|
||||||
Reference in New Issue
Block a user