3 Instructions for compiling cc65 and the ca65 binutils:
6 Linux (and probably most other Unices)
7 --------------------------------------
9 You need the GNU C compiler. Enter the src/ directory and do a
13 This will build all executables. You may use
15 make -f make/gcc.mak strip
17 to remove debugging information from the binaries.
19 After that, you need to compile the libraries. Do
30 Be sure to say "clean" each time, since some of the sources have a
31 "#ifdef <target_system>".
35 DOS using the DJGPP compiler
36 ----------------------------
38 Most information in this section was provided by Keith W. Gerdes
39 (kwg@freebird.ghofn.org). Thanks a lot!
41 The tmpfile() function in DJGPP has a bug and will not open the scratch
42 file in binary mode. If you have problems with the archiver (which uses
43 the tmpfile() function), you have two choices:
45 1. Get a fix from http://www.cartsys.com/eldredge/djgpp-patches.html
46 and apply it. This will solve the problem once and forever.
48 2. For a temporary solution, in the file binutils/ar65/main.c, add the
59 This will switch the default mode to binary and will work around the
62 Keith sent me the following notes how to build the tools on a DOS system
63 using DJGPP (add your system type to CFLAGS if needed):
65 -------------------------------------------------------------------------
67 Here's my current batch file:
70 if exist .depend goto ahead1
74 move *.exe ..\binutils
77 if exist .depend goto ahead2
81 move *.exe ..\binutils
84 if exist .depend goto ahead3
90 if exist .depend goto ahead4
97 if exist .depend goto ahead5
104 if exist .depend goto ahead6
111 make 'CFLAGS=-Oi -I../../include/'
112 ar65 a common.lib *.o
116 make 'CFLAGS=-Oi -I../../include/'
117 ar65 a runtime.lib *.o
126 for the .depend file.
130 And in autoexec.bat I have:
132 set CC65_INC=E:\djgpp_v2\cc65\include
133 set CC65_LIB=E:\djgpp_v2\cc65\lib
134 PATH=E:\djgpp_v2\cc65\binutils;%PATH%
136 -------------------------------------------------------------------------
139 DOS, Windows, OS/2 using the Watcom Compiler
140 --------------------------------------------
142 This is what I'm using. You need the Borland make in addition to the
143 Watcom tools, or you have to change the makefile.
145 1. Copy %WATCOM%\src\startup\wildargv.c from your Watcom directory into
150 make -f make\watcom.mak
152 in the src/ directory.
154 3. Use Linux to build the libraries:-) If you don't have Linux, get it
155 now! More serious: There is no makefile to build the libraries under
156 any of the DOS based operating systems. Use a batch file similar to
157 the one above, or rewrite the makefile.