Linux build-system updated

Programmers discuss here anything related to FreeOrion programming. Primarily for the developers to discuss.

Moderator: Committer

Post Reply
Message
Author
Yoghurt
Programmer
Posts: 376
Joined: Sat Jun 28, 2003 8:17 pm
Location: Heidelberg, Germany

Linux build-system updated

#1 Post by Yoghurt »

Please note that this does not apply to Dev-Cpp users.

I finally managed to get the updated build-system working. Now it should be easy to compile even if some Windows-developers added new files.

Changing the Makefile.am's when some files are added now should not be needed anymore (as long as the new files don't contain FREEORION_BUILD-#ifdefs)
I also added the tool I use to update FO-autotools.tar.bz2 that is downloaded via the update-configure.sh script.

Here is a short summary of the new files:

cvs - A wrapper for cvs that moves the hand-written Makefiles out of the way before doing anything. To use it, simply write './cvs' instead of 'cvs'

mkauto.sh - the script that creates FO-autotools.tar.bz2 and also uploads it to the Sourceforge Webserver. The latter is only done if the Environmentvariable "SF_USERNAME" is set to the correct username (you will need developer access for this) and it is called as './mkauto.sh U'.

createMakefile.pl - This file creates the Makefile.am's for the Empire etc. subdirectory. It works as follows:
It decides which files will compile identical for server,client and AI-target, and which not. Now the common files will be compiled into a convenience-lib (libFOwhatever-common), the special files will be compiled into a different lib that is specific to the target. Therefore, most of the files are now only compiled once.

Unfortunately, g++ doesn't support "export template", which is why System.h is TARGET dependent, therefore, all files that include it directly or indirectly have to be compiled three-times. This will hopefully change later, when the createMakefile gets smarter (right now, lib...-client and lib...-ai are (nearly) always identical)

Just call autogen when you (or someone else) added new files, it will call createMakefile. After that, do a mkauto and upload the new FO-autotools.

I hope this post is readable, I'm very tired right now... :(

Edit: replace occurences of client with human in your head, I'm to lazy/tired to change it ;)

Tyreth
FreeOrion Lead Emeritus
Posts: 885
Joined: Thu Jun 26, 2003 6:23 am
Location: Australia

#2 Post by Tyreth »

Great!

Tyreth
FreeOrion Lead Emeritus
Posts: 885
Joined: Thu Jun 26, 2003 6:23 am
Location: Australia

#3 Post by Tyreth »

Compilation complains about UI/ChatWindow.cpp/.h which is absent from my system. I assume it's some development code on your system?

Yoghurt
Programmer
Posts: 376
Joined: Sat Jun 28, 2003 8:17 pm
Location: Heidelberg, Germany

#4 Post by Yoghurt »

Whoops, yes.

Just call createMakefile.pl ; automake ; ./config.status on your machine.

I will upload corrected Makefile.am's soon.

Edit: Corrected FO-autotools is up.

Post Reply