How to compile EnergyMech

If you chose one of the binary install packages, skip this stage as you already have an executable to run.

To be able to compile, you first have to run the configure script. The configure script will check for all the programs that is needed to compile the mech and also ask for which options you want your mech to have. The options it asks for can only be changed at compile time, and not while the EnergyMech is running so make sure you make the right choice or you will have to recompile later on.

If the configure script exits before it is done, it was unable to locate some program or other component that is needed to be able to compile an EnergyMech. If it does, you are out of luck unless you can compile on another machine or if one of the pre-compiled packages works on your shell.

The options you have to choose from are the following:

DEBUG
This option makes the EnergyMech rather large, but can be quite useful when the EnergyMech doesnt act like its supposed to do.

SEEN
If you want the SEEN command you will have to enable this option. It is not recommended though, since the SEEN feature can use up a very large amount of memory.

LINKING
Enable this option to make it possible for EnergyMechs to link with eachother.

TELNET
Enable this option to include support for telnetting to the LINKPORT of an EnergyMech. This option requires that the LINKING option has been enabled (obvisouly, since there otherwise is no linkport to connect to).

DYNAMIC COMMAND LEVELS
If you enable this option you can change the levels required for doing commands at runtime. Without this option, the only way to change command levels is to change them in the source and recompile.

NEWBIE
The newbie option adds some extra help output and other miscellanious stuff. An experienced EnergyMech user would typically not need this newbie support.

ALIAS
If you enable this option, you may create aliases for EnergyMech commands. These aliases will have the same syntax and functionality as the aliased command.

WINGATE
If you want your EnergyMech to use wingates you have to enable this option.

SESSION
Enable this option to allow the EnergyMech to save changed settings, new channels, and other stuff to the mech.session file.

Once the configure script has finished setting up the configuration files, you may compile the EnergyMech by using the command make.

~$ make clean mech install
cd src ; make clean
make[1]: Entering directory `/home/mech/emech-2.7.0/src'
/bin/rm -f cfgfile.o channel.o com-ons.o combot.o commands.o dcc.o function.o link.o main.o
memory.o parse.o socket.o userlist.o vars.o xmech.o mech mcmd_gen mcmd_gen.o mcmd.h core
make[1]: Leaving directory `/home/mech/emech-2.7.0/src'
cd src ; make mech
make[1]: Entering directory `/home/mech/emech-2.7.0/src'
gcc -pipe -g -Wshadow -Wall -O2 -m486 -c mcmd_gen.c
gcc -g -o mcmd_gen mcmd_gen.o
./mcmd_gen >  mcmd.h
gcc -pipe -g -Wshadow -Wall -O2 -m486 -c cfgfile.c
gcc -pipe -g -Wshadow -Wall -O2 -m486 -c channel.c
gcc -pipe -g -Wshadow -Wall -O2 -m486 -c com-ons.c
gcc -pipe -g -Wshadow -Wall -O2 -m486 -c combot.c
gcc -pipe -g -Wshadow -Wall -O2 -m486 -c commands.c
gcc -pipe -g -Wshadow -Wall -O2 -m486 -c dcc.c
gcc -pipe -g -Wshadow -Wall -O2 -m486 -c function.c
gcc -pipe -g -Wshadow -Wall -O2 -m486 -c link.c
gcc -pipe -g -Wshadow -Wall -O2 -m486 -c main.c
gcc -pipe -g -Wshadow -Wall -O2 -m486 -c memory.c
gcc -pipe -g -Wshadow -Wall -O2 -m486 -c parse.c
gcc -pipe -g -Wshadow -Wall -O2 -m486 -c socket.c
gcc -pipe -g -Wshadow -Wall -O2 -m486 -c userlist.c
gcc -pipe -g -Wshadow -Wall -O2 -m486 -c vars.c
gcc -pipe -g -Wshadow -Wall -O2 -m486 -c xmech.c
gcc -g -o mech cfgfile.o channel.o com-ons.o combot.o commands.o dcc.o function.o link.o
main.o memory.o parse.o socket.o userlist.o vars.o xmech.o  
make[1]: Leaving directory `/home/mech/emech-2.7.0/src'
cd src ; make install
make[1]: Entering directory `/home/mech/emech-2.7.0/src'
/bin/chmod 0700 mech
/bin/mv mech ..
make[1]: Leaving directory `/home/mech/emech-2.7.0/src'
~$ ls -l mech
-rwx------   1 mech     users      414384 Oct 26 07:15 mech*
~$

Leave a Reply

Your email address will not be published. Required fields are marked *