adonthell-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Adonthell-devel] 0.4 source structure proposals and questions


From: Alexandre Courbot
Subject: Re: [Adonthell-devel] 0.4 source structure proposals and questions
Date: 02 Mar 2003 19:02:09 +0100

> There is one issue that prevents me from releasing the package today.
> While automake and libtool handles perfectly dependancies against
> installed libraries and libraries that get build by the same
> Makefile.am, I get problems for dependancies like "libgfx relies on
> libbase, which is in ../base". Of course, I could play with -L and such,
> but that's not very clean. I think I'll ask that on the automake list
> tomorrow.

Well, don't ask me *why*, but... it doesn't make any problem. I've
erased all trace of libbase from my system, including of course the
source tree, and tried to compile libgfx. It compiled without
complaining, even though it hasn't found libbase. And after installing,
(with libbase compiled of course), I could still import adonthell.gfx
which relied on libbase! Which means libtool must add some stuff to make
the dynamic loading even if the library isn't present at compile time.
That's amazing - and pretty cool for us!

So, here is the base package I've made. It includes the base library
(actually - only fileops) and the gfx library. I'm using automake 1.7,
autoconf 2.57, libtool 1.4.2a, python2.2 and SWIG 1.3.17. I've made a
"make dist" to get this package anyway, so you don't need to
./autogen.sh it.

To keep your system clean, do the following:
run ./configure --prefix=<some_directory_in_your_home>
make
make install

Then cd to the directory you specified as a prefix. The header files are
in include, the libs in lib. In lib/python2.2/site-packages/adonthell
are our Python wrapper files. Wanna test?

$ export 
PYTHONPATH=<some_directory_in_your_home>/lib/python<version>/site-package
(of course, you don't need to do that when you leave the prefix to the
default)
$ python
Python 2.2.2 (#1, Jan 18 2003, 10:18:59)
[GCC 3.2.2 20030109 (Debian prerelease)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import adonthell.gfx
>>> adonthell.gfx.screen.init()
>>> adonthell.gfx.screen.set_video_mode(640, 480)
Using 32bpp depth: 640x480.
>>>

Cool, it works so far! ^_^ Remains to see how types can interact between
modules, but as far as I remember, it worked not so bad. I'll run more
tests.

If you looks at the Makefile.ams, you'll see that automake 1.7 allows us
to separate the dependancies at a lower level than before (i.e the
CXXFLAGS doesn't need to be the same for all the module, we can specify
special ones for every target). This makes our package very clean, with
Python present only where needed, and SDL completely absent from libbase
for instance. Python modules are well handled as well. They get compiled
by the py-compile script that is installed by automake, then they are
installed to the right place.

Oh, the package is available at
http://www.gnurou.org/adonthell-stuff/adonthell-0.4dev1.tar.gz

Comments, improvments, ideas are welcome! I'm sure I forgot to mention a
few things, so don't hesitate to look at configure.in, acinclude.m4
(which includes a SWIG detection macro) and the Makefile.ams. They
should be commented enough.
Alex.
-- 
http://www.gnurou.org





reply via email to

[Prev in Thread] Current Thread [Next in Thread]