[hatari-devel] CMake build system

Eero Tamminen eerot at users.berlios.de
Wed Jan 20 22:55:20 CET 2010


Hi,

On Wednesday 20 January 2010, Thomas Huth wrote:
> > > - Our build system did not support out-of-source builds (i.e.
> > >   generating the object files out of the source tree), which is
> > > helpful for cross-compiling and distributors.
> >
> > This could be added if needed I think.  But first it would need
> > some description how that should work.  Just obj files elsewhere
> > or everything?
>
> I suggest to do it just like the standard "automake" way, since this
> is what people suggest: the object file tree is placed to the folder
> from wherever you call the "configure" script from.
> But I guess the Makefiles would become more complicated and less
> maintainable by this, so I doubt that you want to add and maintain this
> feature "manually".

I think it could be added quite easily with something like:

-- makefile --
OBJS = $(SRCS:.c=$(BUILDDIR)/.o)
<same for subdirlibs>
$(BUILDDIR)/hatari: $(ALLOBJS)
---------

Configure or user would then put suitable BUILDDIR value to Makefile.cnf.
Default value should of course be overridable from the environment
& command line:
	BUILDDIR ?= .

BUILDDIR=$PWD make -C <where Hatari is>


	- Eero



More information about the hatari-devel mailing list