| 1 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" |
| 2 |
"http://www.w3.org/TR/REC-html40/loose.dtd"> |
| 3 |
|
| 4 |
<HTML> |
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
<HEAD> |
| 31 |
<TITLE>1.4 Compiling FunnelWeb</TITLE> |
| 32 |
<STYLE TYPE="text/css"> <!-- A {text-decoration: none} // --> </STYLE> |
| 33 |
</HEAD> |
| 34 |
<BODY BACKGROUND="binary/background.gif" |
| 35 |
BGCOLOR="#FFFFFF" |
| 36 |
TEXT="#000000" |
| 37 |
VLINK="#660000" |
| 38 |
LINK="#FF0000" |
| 39 |
ALINK="#CC0000"> |
| 40 |
|
| 41 |
<TABLE WIDTH="590"> |
| 42 |
<TR> |
| 43 |
<TD WIDTH="130" VALIGN="top"> |
| 44 |
<IMG SRC="binary/d_clear.gif" ALT="" WIDTH="130" HEIGHT="1"><BR> |
| 45 |
|
| 46 |
<FONT SIZE="2"> |
| 47 |
<BR> |
| 48 |
|
| 49 |
<A HREF="http://www.ross.net/" |
| 50 |
TARGET="rosshome" |
| 51 |
onClick="window.open('','rosshome','location,status,menubar,scrollbars,resizable',false).focus(); return true;" |
| 52 |
> |
| 53 |
<IMG SRC="binary/rossnet_logo.gif" |
| 54 |
WIDTH="64" HEIGHT="32" |
| 55 |
BORDER="0" ALT="RossNet" |
| 56 |
HSPACE="0" VSPACE="1"></A><BR> |
| 57 |
<BR> |
| 58 |
|
| 59 |
<A HREF="../index.shtml" |
| 60 |
TARGET="funnelweb" |
| 61 |
onClick="window.open('','funnelweb','location,status,menubar,scrollbars,resizable',false).focus(); return true;" |
| 62 |
> |
| 63 |
<IMG SRC="binary/linklogo.gif" |
| 64 |
WIDTH="64" HEIGHT="32" |
| 65 |
BORDER="0" ALT="FunnelWeb" |
| 66 |
HSPACE="0" VSPACE="1"></A><BR> |
| 67 |
<BR> |
| 68 |
<TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0><TR><TD BGCOLOR="#000000"> |
| 69 |
<A HREF="../reference/index.html" |
| 70 |
TARGET="funnelwebreference" |
| 71 |
onClick="window.open('','funnelwebreference','location,status,menubar,scrollbars,resizable',false).focus(); return true;" |
| 72 |
><FONT COLOR="#FFFFFF"><B>Reference</B></FONT></A><BR> |
| 73 |
<BR> |
| 74 |
<A HREF="../tutorial/index.html" |
| 75 |
TARGET="funnelwebtutorial" |
| 76 |
onClick="window.open('','funnelwebtutorial','location,status,menubar,scrollbars,resizable',false).focus(); return true;" |
| 77 |
><FONT COLOR="#FFFFFF"><B>Tutorial</B></FONT></A><BR> |
| 78 |
<BR> |
| 79 |
<A HREF="index.html"><FONT COLOR="#FFFFFF"><B>Developer</B></FONT></A><BR> |
| 80 |
<A HREF="compile.html"><FONT COLOR="#FFFFFF">1 Compile</FONT></A><BR> |
| 81 |
<A HREF="design.html"><FONT COLOR="#FFFFFF">2 Design</FONT></A><BR> |
| 82 |
<A HREF="implement.html"><FONT COLOR="#FFFFFF">3 Implement</FONT></A><BR> |
| 83 |
<A HREF="modify.html"><FONT COLOR="#FFFFFF">4 Modify</FONT></A><BR> |
| 84 |
<A HREF="misc.html"><FONT COLOR="#FFFFFF">5 Misc</FONT></A><BR> |
| 85 |
<A HREF="gpl.html"><FONT COLOR="#FFFFFF">6 Licence</FONT></A><BR> |
| 86 |
|
| 87 |
<BR> |
| 88 |
<A HREF="search.html"><FONT COLOR="#FFFFFF"><B>SEARCH</B></FONT></A><BR> |
| 89 |
</FONT> |
| 90 |
</TD></TR></TABLE> |
| 91 |
|
| 92 |
|
| 93 |
</TD> |
| 94 |
<TD WIDTH="460" VALIGN="top"> |
| 95 |
<FONT SIZE="3"> |
| 96 |
|
| 97 |
|
| 98 |
<A HREF="index.html"><IMG SRC="binary/title.gif" |
| 99 |
WIDTH="316" HEIGHT="24" |
| 100 |
BORDER="0" ALT="FunnelWeb Developer Manual" |
| 101 |
HSPACE="0" VSPACE="0"></A> |
| 102 |
<P><FONT SIZE="5">1.4 Compiling FunnelWeb</FONT><BR> |
| 103 |
|
| 104 |
|
| 105 |
|
| 106 |
<P>The FunnelWeb source code is entirely contained within |
| 107 |
the <SAMP>sources</SAMP> directory. However, some simple script |
| 108 |
files and makefiles can be found in the <SAMP>admin</SAMP> |
| 109 |
directory. |
| 110 |
|
| 111 |
<P>There should be little difficulty compiling FunnelWeb |
| 112 |
for any of the currently supported platforms. If the machine |
| 113 |
on which you are compiling FunnelWeb is not one of the ones |
| 114 |
listed in the <SAMP>environ.h</SAMP> file, then choose the |
| 115 |
closest one you can. FunnelWeb contains some |
| 116 |
machine-dependent components, so if you are compiling for a |
| 117 |
currently-unsupported platform, you will probably need to go |
| 118 |
into the modules <SAMP>environ.h</SAMP>, <SAMP>machin.h</SAMP> and |
| 119 |
<SAMP>machin.c</SAMP> and make some changes. |
| 120 |
|
| 121 |
<P>Compile |
| 122 |
FunnelWeb by pointing your C compiler at all the |
| 123 |
"<TT>.c</TT>" files in the <SAMP>sources</SAMP> directory. The |
| 124 |
"<TT>.txt</TT>", and "<TT>.tex</TT>" files do not |
| 125 |
participate in the compilation, but appear in the |
| 126 |
<SAMP>sources</SAMP> directory because they were used to |
| 127 |
generate the "<TT>.ctx</TT>" files. The "<TT>.ctx</TT>" |
| 128 |
files are included by <SAMP>.c</SAMP> files of the same name |
| 129 |
and do not need to be compiled separately. Link the results. |
| 130 |
|
| 131 |
<P> |
| 132 |
<PRE> |
| 133 |
cc -c *.c |
| 134 |
cc -o fw *.o |
| 135 |
</PRE> |
| 136 |
|
| 137 |
<P>The result of all this should be a binary executable |
| 138 |
called <SAMP>fw</SAMP>, or <SAMP>fw.exe</SAMP>, or |
| 139 |
<SAMP>fw.xxx</SAMP> where <SAMP>.xxx</SAMP> is whatever file |
| 140 |
extension is appropriate on the target machine. Clean up the |
| 141 |
<SAMP>sources</SAMP> directory by deleting all the listing and |
| 142 |
object files. |
| 143 |
|
| 144 |
<P>If you encounter any difficulties compiling FunnelWeb, you |
| 145 |
may wish to refer to the platform-specific notes below. |
| 146 |
|
| 147 |
<P>If you port FunnelWeb to a new platform, please <A HREF="mailto:[email protected]">email me</A> |
| 148 |
any information that I can incorporate into the next |
| 149 |
release, or add here to help others porting to the same |
| 150 |
platform. |
| 151 |
|
| 152 |
<P><BR><FONT SIZE="4"><STRONG>A Make File</STRONG></FONT><BR> |
| 153 |
|
| 154 |
<P>The FunnelWeb distribution does not provide a makefile |
| 155 |
as compilers are so fast now that the risk of omitting a |
| 156 |
dependency far exceeds the benefits provided by a makefile |
| 157 |
for a program this size. |
| 158 |
|
| 159 |
<P>However, some people have complained about the lack of |
| 160 |
a makefile, and in fact Dougal Scott |
| 161 |
(<A HREF="mailto:[email protected]">[email protected]</A>) |
| 162 |
actually sent me one which he constructed using the GNU C -MM |
| 163 |
option. Here it is: |
| 164 |
|
| 165 |
<P> |
| 166 |
<FONT SIZE="2"><PRE> |
| 167 |
------------------------SLICE and DICE here--------------------------------- |
| 168 |
OBJS= analyse.o as.o clock.o command.o data.o dump.o help.o help_gnu.o list.o \ |
| 169 |
lister.o machin.o mapper.o memory.o misc.o option.o parser.o scanner.o \ |
| 170 |
section.o table.o tangle.o texhead.o weave.o writfile.o main.o |
| 171 |
HDRS= analyse.h as.h clock.h command.h data.h dump.h environ.h help.h \ |
| 172 |
help_gnu.h list.h lister.h machin.h mapper.h memory.h misc.h option.h \ |
| 173 |
parser.h scanner.h section.h style.h table.h tangle.h texhead.h weave.h \ |
| 174 |
writfile.h |
| 175 |
CC=gcc |
| 176 |
CFLAGS=-O -Wall |
| 177 |
|
| 178 |
all: fw |
| 179 |
|
| 180 |
fw: $(OBJS) |
| 181 |
$(CC) -o fw $(OBJS) |
| 182 |
|
| 183 |
analyse.o : analyse.c style.h environ.h analyse.h as.h data.h clock.h list.h \ |
| 184 |
table.h option.h machin.h help.h section.h writfile.h lister.h misc.h |
| 185 |
as.o : as.c style.h environ.h as.h machin.h |
| 186 |
clock.o : clock.c style.h environ.h as.h clock.h machin.h |
| 187 |
command.o : command.c style.h environ.h analyse.h as.h command.h machin.h data.h \ |
| 188 |
clock.h list.h table.h option.h help.h section.h writfile.h dump.h lister.h \ |
| 189 |
memory.h mapper.h misc.h parser.h scanner.h tangle.h weave.h |
| 190 |
data.o : data.c data.h style.h environ.h clock.h list.h table.h option.h machin.h \ |
| 191 |
help.h section.h writfile.h |
| 192 |
dump.o : dump.c style.h environ.h as.h clock.h data.h list.h table.h option.h \ |
| 193 |
machin.h help.h section.h writfile.h dump.h misc.h |
| 194 |
help.o : help.c style.h environ.h as.h help.h help_gnu.h misc.h data.h clock.h \ |
| 195 |
list.h table.h option.h machin.h section.h writfile.h |
| 196 |
help_gnu.o : help_gnu.c style.h environ.h help_gnu.h help_gnu.ctx |
| 197 |
list.o : list.c style.h environ.h as.h machin.h memory.h list.h |
| 198 |
lister.o : lister.c style.h environ.h as.h data.h clock.h list.h table.h option.h \ |
| 199 |
machin.h help.h section.h writfile.h lister.h misc.h |
| 200 |
machin.o : machin.c style.h environ.h as.h machin.h |
| 201 |
main.o : main.c style.h environ.h as.h command.h machin.h data.h clock.h list.h \ |
| 202 |
table.h option.h help.h section.h writfile.h memory.h |
| 203 |
mapper.o : mapper.c style.h environ.h as.h machin.h mapper.h memory.h |
| 204 |
memory.o : memory.c style.h environ.h as.h machin.h memory.h |
| 205 |
misc.o : misc.c style.h environ.h as.h data.h clock.h list.h table.h option.h \ |
| 206 |
machin.h help.h section.h writfile.h memory.h misc.h |
| 207 |
option.o : option.c style.h environ.h as.h data.h clock.h list.h table.h option.h \ |
| 208 |
machin.h help.h section.h writfile.h misc.h |
| 209 |
parser.o : parser.c style.h environ.h as.h data.h clock.h list.h table.h option.h \ |
| 210 |
machin.h help.h section.h writfile.h lister.h mapper.h memory.h misc.h parser.h |
| 211 |
scanner.o : scanner.c style.h environ.h as.h clock.h data.h list.h table.h option.h \ |
| 212 |
machin.h help.h section.h writfile.h dump.h lister.h mapper.h memory.h misc.h \ |
| 213 |
scanner.h |
| 214 |
section.o : section.c style.h environ.h as.h section.h |
| 215 |
table.o : table.c style.h environ.h as.h machin.h memory.h table.h |
| 216 |
tangle.o : tangle.c style.h environ.h as.h data.h clock.h list.h table.h option.h \ |
| 217 |
machin.h help.h section.h writfile.h lister.h memory.h misc.h tangle.h |
| 218 |
texhead.o : texhead.c style.h environ.h texhead.h writfile.h texhead.ctx |
| 219 |
weave.o : weave.c style.h environ.h as.h data.h clock.h list.h table.h option.h \ |
| 220 |
machin.h help.h section.h writfile.h lister.h misc.h texhead.h weave.h |
| 221 |
writfile.o : writfile.c style.h environ.h as.h machin.h writfile.h |
| 222 |
------------------------SLICE and DICE here--------------------------------- |
| 223 |
</PRE></FONT> |
| 224 |
|
| 225 |
<P><BR><FONT SIZE="4"><STRONG>Apollo</STRONG></FONT><BR> |
| 226 |
|
| 227 |
<P>16-Oct-1992: David Barton (<A HREF="mailto:[email protected]">[email protected]</A>) |
| 228 |
reports that he has managed to compile FunnelWeb on an Apollo running |
| 229 |
Domain/OS SR10.2. |
| 230 |
|
| 231 |
<P><BR><FONT SIZE="4"><STRONG>HP-UX</STRONG></FONT><BR> |
| 232 |
|
| 233 |
<P>15-Oct-1992: On an HP 9000/s300 running HP-UX 8.0, some |
| 234 |
users got FunnelWeb to compile, but found that they were |
| 235 |
running up against buffer size limitations. The problem is |
| 236 |
the definition of FILENAME_MAX in machin.h. When I wrote |
| 237 |
FunnelWeb, I assumed that FILENAME_MAX was the maximum |
| 238 |
length of an entire file specification including the path. |
| 239 |
However, on many machines, it is defined the be the maximum |
| 240 |
length of a filename without the path. The problem can be |
| 241 |
fixed by forcing the definition |
| 242 |
|
| 243 |
<P> |
| 244 |
<PRE> |
| 245 |
#define FILENAME_MAX 300 |
| 246 |
</PRE> |
| 247 |
|
| 248 |
<P>in machin.h. This is the only known problem encountered |
| 249 |
by those who have performed HP ports. |
| 250 |
|
| 251 |
<P><BR><FONT SIZE="4"><STRONG>Macintosh MPW C</STRONG></FONT><BR> |
| 252 |
|
| 253 |
<P>09-Aug-1992: Tor Olaussen (<A HREF="mailto:[email protected]">[email protected]</A>) |
| 254 |
of the Nansen Remote Sensing Center, University of Bergen, |
| 255 |
Norway reports that he has managed to get FunnelWeb to |
| 256 |
compile and run under the Macintosh MPW environment. He |
| 257 |
writes: |
| 258 |
|
| 259 |
<P> |
| 260 |
<PRE> |
| 261 |
"If you are interested in my changes, I should be able to generate |
| 262 |
diff files, and send them to you together with a makefile. Otherwise |
| 263 |
you can use me a reference if you receive questions about FunnelWeb |
| 264 |
and MPW." |
| 265 |
</PRE> |
| 266 |
|
| 267 |
<P><BR><FONT SIZE="4"><STRONG>Next</STRONG></FONT><BR> |
| 268 |
|
| 269 |
<P>16-Oct-1992: John Dawson (<A HREF="mailto:[email protected]">[email protected]</A>) |
| 270 |
has installed FunnelWeb on a NeXT machine and has got it to pass |
| 271 |
the regression tests. He writes: |
| 272 |
|
| 273 |
<P> |
| 274 |
<PRE> |
| 275 |
"I had to play with the machin.{h,m} and environ.h files to get |
| 276 |
FunnelWeb to compile correctly. The problem area was in machin.h |
| 277 |
where you put all those prototypes for the Sun. They didn't jive |
| 278 |
well with my system. However, every other default for the Sun was |
| 279 |
ok. (A NeXT only needs to be aligned on 2^1-byte boundaries, and |
| 280 |
I think 2^0-byte boundaries might even work, but aligning things on |
| 281 |
2^2-byte boundaries doesn't hurt much.)." |
| 282 |
</PRE> |
| 283 |
|
| 284 |
<P>The modified header files are available in the file: |
| 285 |
|
| 286 |
<P> |
| 287 |
|
| 288 |
<DL> |
| 289 |
<DT> |
| 290 |
<DL> |
| 291 |
|
| 292 |
<A HREF="ftp://ftp.ross.net/clients/ross/funnelweb/funnelweb300/funnelweb300_next_patch.c" TARGET="_blank">ftp://ftp.ross.net/clients/ross/funnelweb/funnelweb300/funnelweb300_next_patch.c</A> |
| 293 |
|
| 294 |
</DL> |
| 295 |
</DL> |
| 296 |
|
| 297 |
|
| 298 |
<P><BR><FONT SIZE="4"><STRONG>MS-DOS</STRONG></FONT><BR> |
| 299 |
|
| 300 |
<P>09-Oct-1992: In the lead up to the release of FunnelWeb 3.0, |
| 301 |
the PC that had been |
| 302 |
available for me to use to test the port of FW to the PC became |
| 303 |
unavailable. Because of this, I took the shortcut of not compiling and |
| 304 |
testing the final released version of the code (V3.0) on a PC!!! Worse |
| 305 |
still, I did not provide any notes on what compiler flags should be |
| 306 |
used. |
| 307 |
|
| 308 |
<P>As a result, those who have attempted to compile FunnelWeb on PCs ran |
| 309 |
into a few difficulties. |
| 310 |
|
| 311 |
<P>If you still want to compile FunnelWeb on the PC, here are |
| 312 |
some notes that I have collected: |
| 313 |
|
| 314 |
<P>Most people who compile FunnelWeb on a PC seem to be using Borland |
| 315 |
C++. If you are using this compiler, you need to do the following: |
| 316 |
|
| 317 |
<UL> |
| 318 |
<LI> Insert "#define STDC 1" in environ.h. |
| 319 |
<LI> Compile with the HUGE memory model. |
| 320 |
<LI> Turn on the ANSI option. |
| 321 |
<LI> Turn on the BorlandC++ option. |
| 322 |
<LI> Increase the run time stack size from 4K (default) to 32K |
| 323 |
by inserting the line: |
| 324 |
<SAMP>extern unsigned _stklen = 32768;</SAMP> |
| 325 |
just above the minimain() declaration. Refer to page 608 |
| 326 |
of the borland library reference manual (V3.00). |
| 327 |
</UL> |
| 328 |
|
| 329 |
<P>You may run into troubles with MSDOS with the regression |
| 330 |
test input file "sc13a" which is a zero length file. It is |
| 331 |
just a zero length file so if you run into difficulties, |
| 332 |
create it any way you like. |
| 333 |
|
| 334 |
|
| 335 |
<P> |
| 336 |
<TABLE WIDTH="100%"> |
| 337 |
<TR> |
| 338 |
<TD ALIGN="left" VALIGN="bottom"><A HREF="compile_tree.html"><IMG SRC="binary/fw_left.gif" HEIGHT="32" WIDTH="32" BORDER="0" ALT="Prev"></A></TD> |
| 339 |
<TD ALIGN="center" VALIGN="bottom"><A HREF="compile.html"><IMG SRC="binary/fw_up.gif" HEIGHT="32" WIDTH="32" BORDER="0" ALT="Up"></A></TD> |
| 340 |
<TD ALIGN="right" VALIGN="bottom"><A HREF="compile_testing.html"><IMG SRC="binary/fw_right.gif" HEIGHT="32" WIDTH="32" BORDER="0" ALT="Next"></A></TD> |
| 341 |
</TR> |
| 342 |
</TABLE> |
| 343 |
|
| 344 |
|
| 345 |
|
| 346 |
<P> |
| 347 |
<HR> |
| 348 |
<FONT SIZE="2"> |
| 349 |
<A HREF="mailto:[email protected]">Webmaster</A> |
| 350 |
<A HREF="copyright.html">Copyright © Ross N. Williams 1992,1999. All rights reserved.</A><BR> |
| 351 |
</FONT> |
| 352 |
|
| 353 |
</FONT> |
| 354 |
</TD> |
| 355 |
</TR> |
| 356 |
</TABLE> |
| 357 |
|
| 358 |
|
| 359 |
</BODY> |
| 360 |
|
| 361 |
|
| 362 |
|
| 363 |
|
| 364 |
|
| 365 |
</HTML> |