Welcome to Napoleon! Compiling the game shouldn't be too difficult. Here is how to set it up for your system: 1. Configuring the Makefile: ============================= The SYSTEM line in the Makefile may well need changing for your system. If you are not on Unix, it should contain simply -DPURE_ANSI. Otherwise it should contain -DUNIX along with the following: -DHAS_UNISTD to tell it that it should include the header file unistd.h (not all systems have this file). -DHAS_STDLIB if your machine has stdlib.h. -DHAS_XMALLOC to tell it that your system has xmalloc() built into a library, and it should not be redefined by the program. Most systems do not have this, but there are a few that do. -DDAVID_PILLINGS_BISON must be defined if you are compiling on the Acorn Archimedes using David Pilling's port of Bison. This port is a little strange, as there is no alloca() function available, and the compilation must then proceed differently. You will need bison or yacc - note that the line in the makefile giving YACC=... must be set to YACC=bison -dy or YACC=yacc -d Note the difference in arguments depending on which program you decide to use. If you haven't got gcc, you will have to change the C compiler options to suit your compiler. 2. Installing the readline library: ==================================== If you are building on Unix you must also have access to the GNU readline library - your commands are stored in a history and can be recalled in much the same way as under Bash. If you build with PURE_ANSI defined, you will not need this, but if you build for Unix you will. It should be installed the same directory as the Napoleon source, so that when you are in that directory: readline/libreadline.a is the built library. The current version of the readline library is readline-1.1.tar.Z, available for FTP from the usual places that keep GNU programs. Be careful with this tar file, because it has got messed up somehow so that if you untar it naively it will splat loads of files into the current directory (most GNU tar files untar everything into a subdirectory). You should therefore create the directory readline and untar readline-1.1.tar.Z into it. Then build the readline library as explained by its own documentation (usually just a case of typing "make"). 3. Building: ============= Now type "make" in the Napoleon directory. It should be as easy as that. 4. Possible problems: ====================== If you don't have an ANSI conforming compiler you will find it virtually impossible to build the game. It doesn't normally matter whether you have ANSI header files - but the exception is stdarg.h. If you only have the old style varargs.h you will probably experience difficulties. A lot of C compilers don't like having the GPL stored in one exceedingly long string. This is a problem - I want to keep all the data in with the code, it makes it much easier to do things with the executable once you have it, and I can't think of any other way of incorporating the GPL than to put it in as a string. If you are using a pure System V Unix, you may have problems with the termios library. I can't really advise, since I don't have access to such a machine, but if you get it working I would be interested in having any patches that you needed to apply. Sun OS seems to have a big problem. It is not supplied with a stdarg.h, so you have to use gcc rather than its built in cc. On the other hand, it doesn't have a difftime() function in its library. To get round this, I have included the GNU library's difftime.c in the distribution; to use it, simply add difftime.o to the list of object files in the Makefile. Note that it might not work - ANSI doesn't specify the format that times are stored in. I have not come across a machine where it doesn't, however. Some machines don't have the tmac.andoc file used to compile the manpage. If you are in this position, simply use napoleon.0, which is pre-compiled. Some machines have versions of yacc that produce output that conflicts with the compiler. This is very boring, and there isn't much I can do about it... just edit the output from yacc so it works. Or use bison if you have it. 5. Other things: ================= Napoleon was written by Pete Chown; I can be contacted as: pc123@phx.cam.ac.uk ...!uunet!uknet!camphx!pc123 pc123@camphx.uucp I also have an account on the FSF machines: pc@gnu.ai.mit.edu Try that if messages to the other addresses bounce. Napoleon is subject to the GNU General Public Licence.