1
Requirements to compile Freeciv
2
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3
Currently the native version of freeciv is tested with SAS C only.
4
Anyway the code should be much more portable than previous versions.
6
Furthermore you need the AmiTCP SDK or Miami SDK, MUI, NList and Guigfx
7
includes to be on your machine.
11
If all is ready, simply cd into this directory and enter
15
Maybe modify below settings before. 'smake install' will probably not work.
16
This is because there are currently no icons in the cvs. And the ilbm
17
pictures aren't there as well.
19
There are some settings you may change in the smakefile:
20
DESTDIR set to the directory, where install should copy files to
21
CPU_MATH set the CPU and math type you want including the math library
23
TCPSDK Choose one of the two possible lines
24
OPTFLAGS Set optimization flags, default are none.
25
INCDIRS Allows to include additional include directories. Normally
26
this will be the Miami or AmiTCP SDK directory or empty.
28
To make the server call 'smake dirs civserver' (dirs creates directories).
29
To make the client call 'smake dirs civclient' (dirs creates directories).
30
To transform the locale files call 'smake dirs locale' (dirs creates
32
You need not add the dirs always, when they have been created already.
34
What to know about compiling process?
35
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
36
The files server/civserver.c and client/civclient.c contain the main()
37
functions for civserver and civclient. On the Amiga we need to do some
38
special stuff (e.g. library opening) before these main()'s are called. So
39
a special handling is needed:
41
The two files need to be compiled with DEFINE main=civ_main (redefine the
42
name main to civ_main). The files amigaserver.c and amigaclient.c contain
43
the real main() functions, which call civ_main() afterwards.
44
The main() in amigaserver.c and amigaclient.c expect normal C style
45
arguments argc and argv. If called from Workbench, argc is 0 and argv the
46
pointer to WBStartup message. If your compiler does not support that
47
behaviour, add another preparser and call the main function from it.
51
Add following before main() in amigaserver.c and amigaclient.c.
53
#ifdef __MY_COMPILER_NAME__
54
int main(int argc, char *argv)
56
if(WBenchMsg) /* the hell knows, how your compiler handles this :-) */
57
return main2(0, (char **) WBenchMsg);
59
return main2(argc, argv);
61
#define main main2 /* redefine main to avoid conflicts */
64
The free process is handled with atexit(), so the libraries are freed on
65
abnormal program abortion also.
67
The gettext.c and libintl.h files.
68
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
69
These two files allow support of NLS. This is not a complete gettext
70
implementation, but enough for freeciv port.
71
The environment variable "LANG" or "LANGUAGE" must contain the language
72
string (e.g. >de< for german locale). The function also tries to convert
73
the system language to the form used in freeciv distribution. If this
74
does not work add a new conversion entry to LocaleConvTab in gettext.c.
76
The language files are stored in locale directory in form xx.mo. Where
77
xx is the language identifier as used im po directory of source tree.
81
The current Amiga development systems (especially SAS and VBCC) do not
82
support argument reordering in their printf-style functions. So the
83
sprintf function must be added to the project. And as freeciv needs
84
vsnprintf (which has better error checking) instead of sprintf we also
85
removed the need to use the internal workaround of freeciv.
87
How to make with VBCC (at least 0.8)?
88
~~~~~~~~~~~~~~~~~~~~~~
90
- Get fd2pragma (Aminet/dev/misc/fd2pragma.lha) and create prototype files
91
as well as usergroup.lib and guigfx.lib.
92
- Start make and fix all the other problems, which may have been added in
93
between releases (example: make -f vmakefile). Ignore warnings.
96
- Starting server from WB is nearly useless as it misses the input and
98
- Starting client from WB misses the output dialog (client uses no input).