![kueller](/assets/img/avatar_default.png)
git-svn-id: svn://svn.compuextreme.de/Viitor/V961/Viitor_cc65@4236 504e572c-2e33-0410-9681-be2bf7408885
59 lines
1.4 KiB
HTML
59 lines
1.4 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
|
<HTML>
|
|
<HEAD>
|
|
<META NAME="GENERATOR" CONTENT="LinuxDoc-Tools 0.9.20">
|
|
<TITLE>cl65 Users Guide: Examples</TITLE>
|
|
<LINK HREF="cl65-5.html" REL=next>
|
|
<LINK HREF="cl65-3.html" REL=previous>
|
|
<LINK HREF="cl65.html#toc4" REL=contents>
|
|
</HEAD>
|
|
<BODY>
|
|
<A HREF="cl65-5.html">Next</A>
|
|
<A HREF="cl65-3.html">Previous</A>
|
|
<A HREF="cl65.html#toc4">Contents</A>
|
|
<HR>
|
|
<H2><A NAME="s4">4.</A> <A HREF="cl65.html#toc4">Examples</A></H2>
|
|
|
|
|
|
<P>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
|
|
into an executable named morse:</P>
|
|
<P>
|
|
<BLOCKQUOTE><CODE>
|
|
<PRE>
|
|
cc65 -g -Oi -t c64 morse.c
|
|
ca65 -g morse.s
|
|
ca65 -g irq.s
|
|
ld65 -t c64 -o morse c64.o morse.o irq.o c64.lib
|
|
</PRE>
|
|
</CODE></BLOCKQUOTE>
|
|
</P>
|
|
<P>When using cl65, this is simplified to</P>
|
|
<P>
|
|
<BLOCKQUOTE><CODE>
|
|
<PRE>
|
|
cl65 -g -Oi morse.c irq.s
|
|
</PRE>
|
|
</CODE></BLOCKQUOTE>
|
|
</P>
|
|
<P>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</P>
|
|
<P>
|
|
<BLOCKQUOTE><CODE>
|
|
<PRE>
|
|
.c.o:
|
|
cl65 -g -Oi $<
|
|
</PRE>
|
|
</CODE></BLOCKQUOTE>
|
|
</P>
|
|
<P>to do this.</P>
|
|
|
|
|
|
|
|
<HR>
|
|
<A HREF="cl65-5.html">Next</A>
|
|
<A HREF="cl65-3.html">Previous</A>
|
|
<A HREF="cl65.html#toc4">Contents</A>
|
|
</BODY>
|
|
</HTML>
|