Collapse the two makefiles into one

Programs/makefile is gone and everything it did is here. The split was not
paying for itself: nothing at this level ever ran that file, so it rotted,
and all three bugs found in it this week share that one cause. It named two
source files that had been renamed months earlier and failed outright. The
disk did not depend on the tree it mirrors, so a new file silently was not
on it. And the disk was in no default target, so 'make clean' threw it away
and 'make' did not bring it back - which is what prompted this.

The platform and the system stay separate, as TARGETS rather than as files:
'make SplitBit Assembler' builds the machine and its tools, 'make cosmos'
and 'make disk' build the system, and somebody who wants to write their own
system can ignore the second group entirely. That boundary is now one make
enforces, which the directory boundary never did - Tests/makedisks.sh has
always reached across it to build its own fixtures.

'make' now builds a bootable disk as well as the tools, because a machine
with nothing in the drive does not do anything and the first thing anybody
wants after building this is to watch CosmOS come up. It costs half a
second: the whole system, twenty six apps and the native assembler assemble
in less time than the emulator links.

Two things the merge needed that the split did not. Assembling now takes an
order-only dependency on the assembler, which came free when you had already
built the tools before changing directory. And the mirror is told which
directory to walk: it was ".", meaning Programs/, and left alone it would
have meant the whole repository - the C sources, the tests and the manuals
mirrored onto a disk for an 8-bit machine.

The disk comes out at 188 files where it was 189. The one that went is
Programs/makefile, which was itself being mirrored onto it as
/Source/makefile.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E2JrLzFvuFX9fgi1LDRjrW
This commit is contained in:
Anachronaut
2026-08-30 09:47:06 -04:00
co-authored by Claude Opus 5
parent 2f22807458
commit e52d8d84f8
5 changed files with 339 additions and 289 deletions
+5 -10
View File
@@ -56,17 +56,12 @@ emulator, and disk-image tool. From the repository root, build those tools first
make
```
Then build CosmOS and all of its applications:
That builds CosmOS, all of its applications, and a disk to boot them from - one makefile
covers the machine and the system. To rebuild only part of it:
```sh
cd Programs
make cosmos
```
Build a fresh SBFS application disk as well:
```sh
make cosmos-disk
make disk
```
To boot CosmOS with that disk attached:
@@ -383,7 +378,7 @@ without stopping the machine.
## What Is On The Disk:
`make -C Programs cosmos-disk` builds the disk this system is meant to be met on, and it is
`make disk` builds the disk this system is meant to be met on, and it is
laid out in three directories:
| Where | What |
@@ -551,7 +546,7 @@ which assembles its own now.
### A Clean Install:
`make cosmos-disk` in `Programs/` lays down a disk the machine can start itself from, and
`make disk` lays down a disk the machine can start itself from, and
`make run-cosmos` starts it - with no boot image named, so the emulator shadows its ROM and
reads the disk for everything else.