Re: [cc65] makefile problems

From: Ullrich von Bassewitz <>
Date: 2004-10-22 20:52:00
On Mon, Oct 18, 2004 at 11:44:37PM -0400, Greg King wrote:
> I like that style, too.  So, I wrote my own GNUmakefiles that work that
> way.  But, Uz doesn't use that style -- at least, not in the library
> subtree (interestingly, the development tool subtree does work in that
> autonomous way).

Not really. Executing make in one of the tool directories will only build the
tool specific files, not the common library. The idea behind it is that the
makefiles mirror the directory structure: They build anything in the directory
and below it.

That the libraries do not work in this way has been lazyness on my side
instead of a real design decision. I would prefer the same behaviour, and - as
I do know now - this goal is achievable with only a few small changes. When I
created the first sub makefiles, I didn't realize that. It is a good idea to
make these files compatible with the remainder of the sources.

> You rebuild a single library by starting in the parent subdirectory, and
> naming that library as a make goal:
>     cd cc65/libsrc; make lynxlib

You can even do a

	make -C cc65/libsrc lynxlib

> A desire for portability is one of the reasons for the current method.  Uz
> wanted many host systems to be able to build the cc65 package -- DOS-like
> ones, as well as Unix-like ones.  He wants us to be able to modify any
> file, then update all of the libraries -- for all targets -- without
> resorting to fancy makefile tricks.  [I love to write those tricks -- but,
> I'm weird. ;-) ]

With some effort it would be possible to make the makefiles smarter about
already built modules. However, this would not only involve a much more
complex makefile, but also more disk space, because the object files cannot be
mixed between the different systems, so they would have to go into target
specific subdirectories. But the current scheme works well in my daily
development work, so I see no need to change it.



Ullrich von Bassewitz                        
To unsubscribe from the list send mail to with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Fri Oct 22 20:52:04 2004

This archive was generated by hypermail 2.1.8 : 2004-10-22 20:52:14 CEST