diff options
Diffstat (limited to 'libraries/sqlite/unix/sqlite-3.5.1/www/mingw.tcl')
-rw-r--r-- | libraries/sqlite/unix/sqlite-3.5.1/www/mingw.tcl | 160 |
1 files changed, 160 insertions, 0 deletions
diff --git a/libraries/sqlite/unix/sqlite-3.5.1/www/mingw.tcl b/libraries/sqlite/unix/sqlite-3.5.1/www/mingw.tcl new file mode 100644 index 0000000..f1a0186 --- /dev/null +++ b/libraries/sqlite/unix/sqlite-3.5.1/www/mingw.tcl | |||
@@ -0,0 +1,160 @@ | |||
1 | # | ||
2 | # Run this Tcl script to generate the mingw.html file. | ||
3 | # | ||
4 | set rcsid {$Id: mingw.tcl,v 1.4 2003/03/30 18:58:58 drh Exp $} | ||
5 | |||
6 | puts {<html> | ||
7 | <head> | ||
8 | <title>Notes On How To Build MinGW As A Cross-Compiler</title> | ||
9 | </head> | ||
10 | <body bgcolor=white> | ||
11 | <h1 align=center> | ||
12 | Notes On How To Build MinGW As A Cross-Compiler | ||
13 | </h1>} | ||
14 | puts "<p align=center> | ||
15 | (This page was last modified on [lrange $rcsid 3 4] UTC) | ||
16 | </p>" | ||
17 | |||
18 | puts { | ||
19 | <p><a href="http://www.mingw.org/">MinGW</a> or | ||
20 | <a href="http://www.mingw.org/">Minimalist GNU For Windows</a> | ||
21 | is a version of the popular GCC compiler that builds Win95/Win98/WinNT | ||
22 | binaries. See the website for details.</p> | ||
23 | |||
24 | <p>This page describes how you can build MinGW | ||
25 | from sources as a cross-compiler | ||
26 | running under Linux. Doing so will allow you to construct | ||
27 | WinNT binaries from the comfort and convenience of your | ||
28 | Unix desktop.</p> | ||
29 | } | ||
30 | |||
31 | proc Link {path {file {}}} { | ||
32 | if {$file!=""} { | ||
33 | set path $path/$file | ||
34 | } else { | ||
35 | set file $path | ||
36 | } | ||
37 | puts "<a href=\"$path\">$file</a>" | ||
38 | } | ||
39 | |||
40 | puts { | ||
41 | <p>Here are the steps:</p> | ||
42 | |||
43 | <ol> | ||
44 | <li> | ||
45 | <p>Get a copy of source code. You will need the binutils, the | ||
46 | compiler, and the MinGW runtime. Each are available separately. | ||
47 | As of this writing, Mumit Khan has collected everything you need | ||
48 | together in one FTP site: | ||
49 | } | ||
50 | set ftpsite \ | ||
51 | ftp://ftp.nanotech.wisc.edu/pub/khan/gnu-win32/mingw32/snapshots/gcc-2.95.2-1 | ||
52 | Link $ftpsite | ||
53 | puts { | ||
54 | The three files you will need are:</p> | ||
55 | <ul> | ||
56 | <li>} | ||
57 | Link $ftpsite binutils-19990818-1-src.tar.gz | ||
58 | puts </li><li> | ||
59 | Link $ftpsite gcc-2.95.2-1-src.tar.gz | ||
60 | puts </li><li> | ||
61 | Link $ftpsite mingw-20000203.zip | ||
62 | puts {</li> | ||
63 | </ul> | ||
64 | |||
65 | <p>Put all the downloads in a directory out of the way. The sequel | ||
66 | will assume all downloads are in a directory named | ||
67 | <b>~/mingw/download</b>.</p> | ||
68 | </li> | ||
69 | |||
70 | <li> | ||
71 | <p> | ||
72 | Create a directory in which to install the new compiler suite and make | ||
73 | the new directory writable. | ||
74 | Depending on what directory you choose, you might need to become | ||
75 | root. The example shell commands that follow | ||
76 | will assume the installation directory is | ||
77 | <b>/opt/mingw</b> and that your user ID is <b>drh</b>.</p> | ||
78 | <blockquote><pre> | ||
79 | su | ||
80 | mkdir /opt/mingw | ||
81 | chown drh /opt/mingw | ||
82 | exit | ||
83 | </pre></blockquote> | ||
84 | </li> | ||
85 | |||
86 | <li> | ||
87 | <p>Unpack the source tarballs into a separate directory.</p> | ||
88 | <blockquote><pre> | ||
89 | mkdir ~/mingw/src | ||
90 | cd ~/mingw/src | ||
91 | tar xzf ../download/binutils-*.tar.gz | ||
92 | tar xzf ../download/gcc-*.tar.gz | ||
93 | unzip ../download/mingw-*.zip | ||
94 | </pre></blockquote> | ||
95 | </li> | ||
96 | |||
97 | <li> | ||
98 | <p>Create a directory in which to put all the build products.</p> | ||
99 | <blockquote><pre> | ||
100 | mkdir ~/mingw/bld | ||
101 | </pre></blockquote> | ||
102 | </li> | ||
103 | |||
104 | <li> | ||
105 | <p>Configure and build binutils and add the results to your PATH.</p> | ||
106 | <blockquote><pre> | ||
107 | mkdir ~/mingw/bld/binutils | ||
108 | cd ~/mingw/bld/binutils | ||
109 | ../../src/binutils/configure --prefix=/opt/mingw --target=i386-mingw32 -v | ||
110 | make 2>&1 | tee make.out | ||
111 | make install 2>&1 | tee make-install.out | ||
112 | export PATH=$PATH:/opt/mingw/bin | ||
113 | </pre></blockquote> | ||
114 | </li> | ||
115 | |||
116 | <li> | ||
117 | <p>Manually copy the runtime include files into the installation directory | ||
118 | before trying to build the compiler.</p> | ||
119 | <blockquote><pre> | ||
120 | mkdir /opt/mingw/i386-mingw32/include | ||
121 | cd ~/mingw/src/mingw-runtime*/mingw/include | ||
122 | cp -r * /opt/mingw/i386-mingw32/include | ||
123 | </pre></blockquote> | ||
124 | </li> | ||
125 | |||
126 | <li> | ||
127 | <p>Configure and build the compiler</p> | ||
128 | <blockquote><pre> | ||
129 | mkdir ~/mingw/bld/gcc | ||
130 | cd ~/mingw/bld/gcc | ||
131 | ../../src/gcc-*/configure --prefix=/opt/mingw --target=i386-mingw32 -v | ||
132 | cd gcc | ||
133 | make installdirs | ||
134 | cd .. | ||
135 | make 2>&1 | tee make.out | ||
136 | make install | ||
137 | </pre></blockquote> | ||
138 | </li> | ||
139 | |||
140 | <li> | ||
141 | <p>Configure and build the MinGW runtime</p> | ||
142 | <blockquote><pre> | ||
143 | mkdir ~/mingw/bld/runtime | ||
144 | cd ~/mingw/bld/runtime | ||
145 | ../../src/mingw-runtime*/configure --prefix=/opt/mingw --target=i386-mingw32 -v | ||
146 | make install-target-w32api | ||
147 | make install | ||
148 | </pre></blockquote> | ||
149 | </li> | ||
150 | </ol> | ||
151 | |||
152 | <p>And you are done...</p> | ||
153 | } | ||
154 | puts { | ||
155 | <p><hr /></p> | ||
156 | <p><a href="index.html"><img src="/goback.jpg" border=0 /> | ||
157 | Back to the SQLite Home Page</a> | ||
158 | </p> | ||
159 | |||
160 | </body></html>} | ||