File: compile_compile.html

package info (click to toggle)
funnelweb-doc 3.2d-4.2
  • links: PTS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,744 kB
  • sloc: perl: 241; makefile: 23
file content (365 lines) | stat: -rw-r--r-- 14,327 bytes parent folder | download | duplicates (5)
1
2
3
4
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
            "http://www.w3.org/TR/REC-html40/loose.dtd">

<HTML>
<!--
***********************************************************************
FUNNELWEB MANUAL WEB PAGE
=========================
Copyright (c) Ross N. Williams 1992,1999. All rights reserved.

Permission is granted to redistribute and use this manual in
any medium, with or without modification, provided that all
notices (including, without limitation, the copyright
notice, this permission notice, any record of modification,
and all legal notices) are preserved on all copies, that all
modifications are clearly marked, and that modified versions
are not represented as the original version unless all the
modifications since the manual's original release by Ross N.
Williams (www.ross.net) consist of translations or other
transformations that alter only the manual's form, not its
content. THIS MANUAL IS PROVIDED "AS IS" AND WITHOUT ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT
LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND
FITNESS FOR A PARTICULAR PURPOSE. TO THE EXTENT PERMITTED BY
LAW THERE IS ABSOLUTELY NO WARRANTY.

***********************************************************************
-->

<HEAD>
<TITLE>1.4 Compiling FunnelWeb</TITLE>
<STYLE TYPE="text/css"> <!-- A {text-decoration: none} // --> </STYLE>
</HEAD>
<BODY BACKGROUND="binary/background.gif"
      BGCOLOR="#FFFFFF"
      TEXT="#000000"
      VLINK="#660000"
      LINK="#FF0000"
      ALINK="#CC0000">

<TABLE WIDTH="590">
<TR>
<TD WIDTH="130" VALIGN="top">
<IMG SRC="binary/d_clear.gif" ALT="" WIDTH="130" HEIGHT="1"><BR>

<FONT SIZE="2">
<BR>

<A HREF="http://www.ross.net/"
 TARGET="rosshome"
 onClick="window.open('','rosshome','location,status,menubar,scrollbars,resizable',false).focus(); return true;"
>
 <IMG SRC="binary/rossnet_logo.gif"
  WIDTH="64" HEIGHT="32"
  BORDER="0" ALT="RossNet"
  HSPACE="0" VSPACE="1"></A><BR>
<BR>

<A HREF="../index.shtml"
 TARGET="funnelweb"
 onClick="window.open('','funnelweb','location,status,menubar,scrollbars,resizable',false).focus(); return true;"
>
 <IMG SRC="binary/linklogo.gif"
  WIDTH="64" HEIGHT="32"
  BORDER="0" ALT="FunnelWeb"
  HSPACE="0" VSPACE="1"></A><BR>
<BR>
<TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0><TR><TD BGCOLOR="#000000">
<A HREF="../reference/index.html"
 TARGET="funnelwebreference"
 onClick="window.open('','funnelwebreference','location,status,menubar,scrollbars,resizable',false).focus(); return true;"
><FONT COLOR="#FFFFFF"><B>Reference</B></FONT></A><BR>
<BR>
<A HREF="../tutorial/index.html"
 TARGET="funnelwebtutorial"
 onClick="window.open('','funnelwebtutorial','location,status,menubar,scrollbars,resizable',false).focus(); return true;"
><FONT COLOR="#FFFFFF"><B>Tutorial</B></FONT></A><BR>
<BR>
<A HREF="index.html"><FONT COLOR="#FFFFFF"><B>Developer</B></FONT></A><BR>
<A HREF="compile.html"><FONT COLOR="#FFFFFF">1 Compile</FONT></A><BR>
<A HREF="design.html"><FONT COLOR="#FFFFFF">2 Design</FONT></A><BR>
<A HREF="implement.html"><FONT COLOR="#FFFFFF">3 Implement</FONT></A><BR>
<A HREF="modify.html"><FONT COLOR="#FFFFFF">4 Modify</FONT></A><BR>
<A HREF="misc.html"><FONT COLOR="#FFFFFF">5 Misc</FONT></A><BR>
<A HREF="gpl.html"><FONT COLOR="#FFFFFF">6 Licence</FONT></A><BR>

<BR>
<A HREF="search.html"><FONT COLOR="#FFFFFF"><B>SEARCH</B></FONT></A><BR>
</FONT>
</TD></TR></TABLE>


</TD>
<TD WIDTH="460" VALIGN="top">
<FONT SIZE="3">


<A HREF="index.html"><IMG SRC="binary/title.gif"
 WIDTH="316" HEIGHT="24"
 BORDER="0" ALT="FunnelWeb Developer Manual"
 HSPACE="0" VSPACE="0"></A>
<P><FONT SIZE="5">1.4 Compiling FunnelWeb</FONT><BR>



<P>The FunnelWeb source code is entirely contained within
the <SAMP>sources</SAMP> directory. However, some simple script
files and makefiles can be found in the <SAMP>admin</SAMP>
directory.

<P>There should be little difficulty compiling FunnelWeb
for any of the currently supported platforms. If the machine
on which you are compiling FunnelWeb is not one of the ones
listed in the <SAMP>environ.h</SAMP> file, then choose the
closest one you can. FunnelWeb contains some
machine-dependent components, so if you are compiling for a
currently-unsupported platform, you will probably need to go
into the modules <SAMP>environ.h</SAMP>, <SAMP>machin.h</SAMP> and
<SAMP>machin.c</SAMP> and make some changes.

<P>Compile
FunnelWeb by pointing your C compiler at all the
"<TT>.c</TT>" files in the <SAMP>sources</SAMP> directory. The
"<TT>.txt</TT>", and "<TT>.tex</TT>" files do not
participate in the compilation, but appear in the
<SAMP>sources</SAMP> directory because they were used to
generate the "<TT>.ctx</TT>" files. The "<TT>.ctx</TT>"
files are included by <SAMP>.c</SAMP> files of the same name
and do not need to be compiled separately. Link the results.

<P>
<PRE>
   cc -c *.c
   cc -o fw *.o
</PRE>

<P>The result of all this should be a binary executable
called <SAMP>fw</SAMP>, or <SAMP>fw.exe</SAMP>, or
<SAMP>fw.xxx</SAMP> where <SAMP>.xxx</SAMP> is whatever file
extension is appropriate on the target machine. Clean up the
<SAMP>sources</SAMP> directory by deleting all the listing and
object files.

<P>If you encounter any difficulties compiling FunnelWeb, you
may wish to refer to the platform-specific notes below.

<P>If you port FunnelWeb to a new platform, please <A HREF="mailto:ross@ross.net">email me</A>
any information that I can incorporate into the next
release, or add here to help others porting to the same
platform.

<P><BR><FONT SIZE="4"><STRONG>A Make File</STRONG></FONT><BR>

<P>The FunnelWeb distribution does not provide a makefile
as compilers are so fast now that the risk of omitting a
dependency far exceeds the benefits provided by a makefile
for a program this size.

<P>However, some people have complained about the lack of
a makefile, and in fact Dougal Scott
(<A HREF="mailto:dwagon@nella9.cc.monash.edu.au">dwagon@nella9.cc.monash.edu.au</A>)
actually sent me one which he constructed using the GNU C -MM
option. Here it is:

<P>
<FONT SIZE="2"><PRE>
------------------------SLICE and DICE here---------------------------------
OBJS= analyse.o as.o clock.o command.o data.o dump.o help.o help_gnu.o list.o \
      lister.o machin.o mapper.o memory.o misc.o option.o parser.o scanner.o \
      section.o table.o tangle.o texhead.o weave.o writfile.o main.o
HDRS= analyse.h as.h clock.h command.h data.h dump.h environ.h help.h \
      help_gnu.h list.h lister.h machin.h mapper.h memory.h misc.h option.h \
      parser.h scanner.h section.h style.h table.h tangle.h texhead.h weave.h \
      writfile.h
CC=gcc
CFLAGS=-O -Wall

all: fw

fw: $(OBJS)
        $(CC) -o fw $(OBJS)

analyse.o : analyse.c style.h environ.h analyse.h as.h data.h clock.h list.h \
  table.h option.h machin.h help.h section.h writfile.h lister.h misc.h
as.o : as.c style.h environ.h as.h machin.h
clock.o : clock.c style.h environ.h as.h clock.h machin.h
command.o : command.c style.h environ.h analyse.h as.h command.h machin.h data.h \
  clock.h list.h table.h option.h help.h section.h writfile.h dump.h lister.h \
  memory.h mapper.h misc.h parser.h scanner.h tangle.h weave.h
data.o : data.c data.h style.h environ.h clock.h list.h table.h option.h machin.h \
  help.h section.h writfile.h
dump.o : dump.c style.h environ.h as.h clock.h data.h list.h table.h option.h \
  machin.h help.h section.h writfile.h dump.h misc.h
help.o : help.c style.h environ.h as.h help.h help_gnu.h misc.h data.h clock.h \
  list.h table.h option.h machin.h section.h writfile.h
help_gnu.o : help_gnu.c style.h environ.h help_gnu.h help_gnu.ctx
list.o : list.c style.h environ.h as.h machin.h memory.h list.h
lister.o : lister.c style.h environ.h as.h data.h clock.h list.h table.h option.h \
  machin.h help.h section.h writfile.h lister.h misc.h
machin.o : machin.c style.h environ.h as.h machin.h
main.o : main.c style.h environ.h as.h command.h machin.h data.h clock.h list.h \
  table.h option.h help.h section.h writfile.h memory.h
mapper.o : mapper.c style.h environ.h as.h machin.h mapper.h memory.h
memory.o : memory.c style.h environ.h as.h machin.h memory.h
misc.o : misc.c style.h environ.h as.h data.h clock.h list.h table.h option.h \
  machin.h help.h section.h writfile.h memory.h misc.h
option.o : option.c style.h environ.h as.h data.h clock.h list.h table.h option.h \
  machin.h help.h section.h writfile.h misc.h
parser.o : parser.c style.h environ.h as.h data.h clock.h list.h table.h option.h \
  machin.h help.h section.h writfile.h lister.h mapper.h memory.h misc.h parser.h
scanner.o : scanner.c style.h environ.h as.h clock.h data.h list.h table.h option.h \
  machin.h help.h section.h writfile.h dump.h lister.h mapper.h memory.h misc.h \
  scanner.h
section.o : section.c style.h environ.h as.h section.h
table.o : table.c style.h environ.h as.h machin.h memory.h table.h
tangle.o : tangle.c style.h environ.h as.h data.h clock.h list.h table.h option.h \
  machin.h help.h section.h writfile.h lister.h memory.h misc.h tangle.h
texhead.o : texhead.c style.h environ.h texhead.h writfile.h texhead.ctx
weave.o : weave.c style.h environ.h as.h data.h clock.h list.h table.h option.h \
  machin.h help.h section.h writfile.h lister.h misc.h texhead.h weave.h
writfile.o : writfile.c style.h environ.h as.h machin.h writfile.h
------------------------SLICE and DICE here---------------------------------
</PRE></FONT>

<P><BR><FONT SIZE="4"><STRONG>Apollo</STRONG></FONT><BR>

<P>16-Oct-1992: David Barton (<A HREF="mailto:dlb@hudson.wash.inmet.com">dlb@hudson.wash.inmet.com</A>)
reports that he has managed to compile FunnelWeb on an Apollo running
Domain/OS SR10.2.

<P><BR><FONT SIZE="4"><STRONG>HP-UX</STRONG></FONT><BR>

<P>15-Oct-1992: On an HP 9000/s300 running HP-UX 8.0, some
users got FunnelWeb to compile, but found that they were
running up against buffer size limitations. The problem is
the definition of FILENAME_MAX in machin.h. When I wrote
FunnelWeb, I assumed that FILENAME_MAX was the maximum
length of an entire file specification including the path.
However, on many machines, it is defined the be the maximum
length of a filename without the path. The problem can be
fixed by forcing the definition

<P>
<PRE>
   #define FILENAME_MAX 300
</PRE>

<P>in machin.h. This is the only known problem encountered
by those who have performed HP ports.

<P><BR><FONT SIZE="4"><STRONG>Macintosh MPW C</STRONG></FONT><BR>

<P>09-Aug-1992: Tor Olaussen (<A HREF="mailto:olaussen@cc.uib.no">olaussen@cc.uib.no</A>)
of the Nansen Remote Sensing Center, University of Bergen,
Norway reports that he has managed to get FunnelWeb to
compile and run under the Macintosh MPW environment. He
writes:

<P>
<PRE>
"If you are interested in my changes, I should be able to generate
diff files, and send them to you together with a makefile. Otherwise
you can use me a reference if you receive questions about FunnelWeb
and MPW."
</PRE>

<P><BR><FONT SIZE="4"><STRONG>Next</STRONG></FONT><BR>

<P>16-Oct-1992: John Dawson (<A HREF="mailto:avsoft!john@cs.utexas.edu">avsoft!john@cs.utexas.edu</A>)
has installed FunnelWeb on a NeXT machine and has got it to pass
the regression tests. He writes:

<P>
<PRE>
   "I had to play with the machin.{h,m} and environ.h files to get
   FunnelWeb to compile correctly.  The problem area was in machin.h
   where you put all those prototypes for the Sun.  They didn't jive
   well with my system.  However, every other default for the Sun was
   ok.  (A NeXT only needs to be aligned on 2^1-byte boundaries, and
   I think 2^0-byte boundaries might even work, but aligning things on
   2^2-byte boundaries doesn't hurt much.)."
</PRE>

<P>The modified header files are available in the file:

<P>

<DL>
<DT>
<DL>

<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>

</DL>
</DL>


<P><BR><FONT SIZE="4"><STRONG>MS-DOS</STRONG></FONT><BR>

<P>09-Oct-1992: In the lead up to the release of FunnelWeb 3.0,
the PC that had been
available for me to use to test the port of FW to the PC became
unavailable. Because of this, I took the shortcut of not compiling and
testing the final released version of the code (V3.0) on a PC!!! Worse
still, I did not provide any notes on what compiler flags should be
used.

<P>As a result, those who have attempted to compile FunnelWeb on PCs ran
into a few difficulties.

<P>If you still want to compile FunnelWeb on the PC, here are
some notes that I have collected:

<P>Most people who compile FunnelWeb on a PC seem to be using Borland
C++. If you are using this compiler, you need to do the following:

<UL>
<LI> Insert "#define STDC 1" in environ.h.
<LI> Compile with the HUGE memory model.
<LI> Turn on the ANSI option.
<LI> Turn on the BorlandC++ option.
<LI> Increase the run time stack size from 4K (default) to 32K
     by inserting the line:
     <SAMP>extern unsigned _stklen = 32768;</SAMP>
     just above the minimain() declaration.  Refer to page 608
     of the borland library reference manual (V3.00).
</UL>

<P>You may run into troubles with MSDOS with the regression
test input file "sc13a" which is a zero length file. It is
just a zero length file so if you run into difficulties,
create it any way you like.


<P>
<TABLE WIDTH="100%">
<TR>
<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>
<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>
<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>
</TR>
</TABLE>



<P>
<HR>
<FONT SIZE="2">
<A HREF="mailto:webmaster@ross.net">Webmaster</A>&nbsp;&nbsp;&nbsp;
<A HREF="copyright.html">Copyright &copy; Ross N. Williams 1992,1999. All rights reserved.</A><BR>
</FONT>

</FONT>
</TD>
</TR>
</TABLE>


</BODY>

<!-- *********************************************************************** -->
<!--      End Of A FunnelWeb Manual Web Page (www.ross.net/funnelweb/)       -->
<!-- *********************************************************************** -->

</HTML>