If the variable 'prefix' is defined then the builtin search paths are set to
$(prefix)/lib/cc65/... allowing to build binaries intended for installation.
Note that the library build still works with these binaries as it generally
overrides the builtin search paths by setting the CC65_HOME env var.
The sim65 source code has been a construction site for over a decade.
I was looking for a simple cc65 program execution environment for
regression tests. So I decided to re-purpose sim65 for that task by
removing about everything but the 6502 emulation.
There's no memory mapped i/o emulation whatsoever. Rather exit(),
open(), close(), read() and write() calls are supported by mapping
them through a thin paravirtualization layer to the corresponding
host os functions.
Note: The sim65 6502 emulation provides means to switch between
6502 and 65C02 emulation but currently there are no actual 65C02
opcodes implemented.
There are two reasons for removing this dependency:
- If someone does 'make avail' on the top level Makefile he ends up with
binaries but without libraries - not nice. Better do just "nothing" and
have hin understand that he needs to do 'make [all]' on the top level
Makfile first.
- If 'make avail' is done via 'sudo' it isn't desirable to do a large amount
of work as root.
BTW: I wasn't sure if this dependency is a good thing in the first place
but I saw it in many examples ('install' depending on 'all') so I did it too.
The [un]install make goals have a rather fixed meaning for *ix users. The simple
symlinks provided here don't match the expectations users have from [un]install.
Therefore it is appropriate to rename them to "something" not tied to specific
expectations.
Maybe I'm naive but even after thinking about it for quite
some time I can't see why it should hurt to just build the
cc65 binaries from the sources "in place" and have 'make
install' simply create some symlinks in usr/local/bin.
The new Makfile builds the binaries with builtin search paths
matching their build location. So the symlinks in usr/local/bin
allow to allow to use them out-of-the-box without additional
environment variables.