3 Instructions for compiling cc65 and the ca65 binutils:
6 Linux (and probably most other Unices)
7 --------------------------------------
9 You need the GNU C compiler. Do a
13 twice(!) in each of the directories
18 After that, you need to compile the libraries. Do
28 Be sure to say "clean" each time, since some of the sources have a
29 "#ifdef <target_system>".
33 DOS using the DJGPP compiler
34 ----------------------------
36 Most information in this section was provided by Keith W. Gerdes
37 (kwg@freebird.ghofn.org). Thanks a lot!
39 The tmpfile() function in DJGPP has a bug and will not open the scratch
40 file in binary mode. If you have problems with the archiver (which uses
41 the tmpfile() function), you have two choices:
43 1. Get a fix from http://www.cartsys.com/eldredge/djgpp-patches.html
44 and apply it. This will solve the problem once and forever.
46 2. For a temporary solution, in the file binutils/ar65/main.c, add the
57 This will switch the default mode to binary and will work around the
60 Keith sent me the following notes how to build the tools on a DOS system
61 using DJGPP (add your system type to CFLAGS if needed):
63 -------------------------------------------------------------------------
65 Here's my current batch file:
68 if exist .depend goto ahead1
72 move *.exe ..\binutils
75 if exist .depend goto ahead2
79 move *.exe ..\binutils
82 if exist .depend goto ahead3
88 if exist .depend goto ahead4
95 if exist .depend goto ahead5
102 if exist .depend goto ahead6
109 make 'CFLAGS=-Oi -I../../include/'
110 ar65 a common.lib *.o
114 make 'CFLAGS=-Oi -I../../include/'
115 ar65 a runtime.lib *.o
124 for the .depend file.
128 And in autoexec.bat I have:
130 set CC65_INC=E:\djgpp_v2\cc65\include
131 set CC65_LIB=E:\djgpp_v2\cc65\lib
132 PATH=E:\djgpp_v2\cc65\binutils;%PATH%
134 -------------------------------------------------------------------------
137 DOS, Windows, OS/2 using the Watcom Compiler
138 --------------------------------------------
140 This is what I'm using. You need the Borland make in addition to the
141 Watcom tools, or you have to change the makefile.
143 1. Copy %WATCOM%\src\startup\wildargv.c from your Watcom directory into
148 make -f make\watcom.mak
150 in each of the directories
155 3. Use Linux to build the libraries:-) If you don't have Linux, get it
156 now! More serious: There is no makefile to build the libraries. Use a
157 batch file similar to the one above, or rewrite the makefile.