Files
Shawn Quick dfcaae62dd Add qlink, the disk tools, and a bootable ProDOS 8 image.
Move the assembler to src/qasm. qlink links OMF 1.0 and 2.0 from a script. makeBin flattens a load file, qomf dumps OMF, and qpro builds ProDOS volumes. APW and MPW assemble through the ORCA front end. Relocatable modules emit OMF objects. Listings stay off unless -l is set.

make boot assembles the GS/OS 6.0.1 ProDOS 8 kernel and BASIC.SYSTEM into an 800K volume. BASIC.SYSTEM accepts ls and pfx, and its splash reports PRODOS BASIC 2.0, copyright 1983-2026. IIGS.601.SRC is the source and the BASIC.SYSTEM oracle that image is built from.
2026-10-16 14:41:55 -07:00

1 line
7.0 KiB
Makefile

#
# This is the Makefile for creating the Apple II Setup disk
#
# Modification History
# ??-???-88 MSD First try
# 23-Jan-89 MSD Files in the :work: folder can be found
# elsewhere in the project tree. Also, the
# file A2e.Blocks is part of the project and
# will become the Apple //e Boot Blocks file.
# 24-Jan-91 MSD We now build the Apple //e Boot Blocks from
# real source files and the P8 object file.
#
# 11-Jun-91 MSD Made ProDOS16 Image dependent on Makefile.
# Changed max version of components to 4 so they'll
# load on a Mark Twain. Moved Logon to $00/6800.
# Protocols now load in bank 2.
#
# 09-Jul-91 MSD Changed max version for ATROM to 4 so it will load
# on all ROMs.
#
# 01-Apr-92 MSD Added EtherTalk driver to ProDOS16 Image.
#
# 25-Nov-92 DAL Changed 'cat' to 'catenate' (Mark must have had
# an alias for that).
#
image = :work:"ProDOS16 Image"
blocks = :work:"ProDOS16 Boot Blocks"
mi = :makeimage:
gsos = ::
SD = {gsos}SystemDisk:
SDSystem = {SD}System:
SDDrivers = {SDSystem}Drivers:
Drivers = {gsos}Drivers:
GSProj = :::
Basic = {GSProj}Basic.System:
iie = :IIeBlocks:
Logon = :Logon:
Cons = :Console:
TheDisk Ä {blocks}
{image}
:work:"Apple //e Boot Blocks" ¶
:work:P8 ¶
:work:Basic.System
build.disk
:work:"Apple //e Boot Blocks" Ä {iie}Reloc
:work:P8 ¶
:Logon:BootLog8
Catenate {iie}Reloc :work:P8 :Logon:BootLog8 > {Targ}
echo "x" | Rez -o {Targ} -c pdos -t $70060800 · dev:null || set status 0
setfile -m . {Targ}
{iie}Reloc Ä {iie}Reloc.o
LinkIIGS -o {Targ} {iie}Reloc.o
MakeBinIIGS {Targ}
{iie}Reloc.o Ä {iie}Reloc.aii {iie}P8Size {iie}LogonSize
If "{MSDListFlag}"
Set AsmOptions "-f -l -lo {iie}Reloc.lst"
End
AsmIIGS {AsmOptions}
-d P8Size=`catenate {iie}P8Size`
-d LogonSize=`catenate {iie}LogonSize`
{iie}Reloc.aii -o {Targ}
{iie}P8Size Ä :work:P8
(Evaluate "`files -n -x b :work:P8`" =~ /Å[Â0-9]([0-9]+)¨1b/) · dev:null
echo -n {¨1} > {Targ}
{iie}LogonSize Ä {Logon}BootLog8
(Evaluate "`files -n -x b {Logon}BootLog8`" =~ /Å[Â0-9]([0-9]+)¨1b/) · dev:null
echo -n {¨1} > {Targ}
{blocks} Ä :boot:boot
duplicate -y :boot:boot {blocks}
:boot:boot Ä :boot:boot.o
If "{MSDListFlag}"
Set LnkOptions "-l > :boot:boot.map"
End
LinkIIGS -o :boot:boot :boot:boot.o {LnkOptions}
MakeBinIIGS -org $800 :boot:boot
:boot:boot.o Ä :boot:boot.aii
If "{MSDListFlag}"
Set AsmOptions "-f -l -lo :boot:boot.lst"
End
AsmIIGS -o :boot:boot.o :boot:boot.aii {AsmOptions}
{image} Ä {mi}mi
Makefile
:fizzy:fizzy
:stub:stub ¶
:work:p8 ¶
:logon:BootLog16 ¶
:work:ATP1.ATRom ¶
:work:ATP2.ATRam ¶
:work:ETBoot
set ramorg `Evaluate 0x020000`
makebiniigs -o :work:atram -org "{ramorg}" :work:atp2.atram
(evaluate "`files -n -x b :work:atram`" =~ /Å[ ]+([0-9]+)¨1b/) > Dev:Null
set romorg `evaluate {ramorg} + {¨1}`
makebiniigs -o :work:atrom -org "{romorg}" :work:atp1.atrom
makebiniigs -o :work:ETBoot.bin -org "{ramorg}" :work:ETBoot
{mi}mi {image}
:fizzy:fizzy,$1000,4¶
:stub:stub,$2000,4,1¶
:work:p8,$2000,4,2¶
:Logon:BootLog16,$6800,4¶
:work:atrom,"{romorg}",4,0,1¶
:work:atram,"{ramorg}",4,0,1¶
:work:ETBoot.bin,"{ramorg}",4,0,2
unset ramorg romorg
{mi}mi Ä {mi}main.c.o
if "`exists "{CLibraries}CInterface.o"`" && "`exists "{Clibraries}CRuntime.o"`"
Set MyLibs "`quote "{Libraries}"Stubs.o ¶
"{CLibraries}"CRuntime.o ¶
"{CLibraries}"StdCLib.o ¶
"{CLibraries}"CInterface.o ¶
"{Libraries}"Interface.o ¶
"{Libraries}"ToolLibs.o`"
else
Set MyLibs "`quote "{Libraries}"Stubs.o ¶
"{Libraries}"Runtime.o ¶
"{CLibraries}"StdCLib.o ¶
"{Libraries}"Interface.o ¶
"{Libraries}"ToolLibs.o`"
end
Link -w -t MPST -c "MPS " {mi}main.c.o
{MyLibs}
-o {mi}mi
{mi}main.c.o Ä {mi}main.c
C {mi}main.c -o {mi}main.c.o
:fizzy:fizzy Ä :fizzy:fizzy.o
If "{MSDListFlag}"
Set LnkOptions "-l > :fizzy:fizzy.map"
End
LinkIIGS -o :fizzy:fizzy :fizzy:fizzy.o {LnkOptions}
MakeBinIIGS -org $1000 :fizzy:fizzy
:fizzy:fizzy.o Ä :fizzy:fizzy.aii
If "{MSDListFlag}"
Set AsmOptions "-f -l -lo :fizzy:fizzy.lst"
End
AsmIIGS -o :fizzy:fizzy.o :fizzy:fizzy.aii {AsmOptions}
:stub:stub Ä :stub:stub.o
If "{MSDListFlag}"
Set LnkOptions "-l > :stub:stub.map"
End
linkiigs -o :stub:stub :stub:stub.o {LnkOptions}
makebiniigs -org $2000 :stub:stub
:stub:stub.o Ä :stub:stub.aii
If "{MSDListFlag}"
Set AsmOptions "-f -l -lo :stub:stub.lst"
End
AsmIIGS -o :stub:stub.o :stub:stub.aii {AsmOptions}
:logon:BootLog16 Ä :logon:BootLog16.o
:console:console.o ¶
:logon:DES.o
If "{MSDListFlag}"
Set LnkOptions "-l > :logon:BootLog16.map"
End
LinkIIGS -o :logon:BootLog16 ¶
:logon:BootLog16.o ¶
:Console:Console.o ¶
:logon:DES.o ¶
{LnkOptions}
MakeBinIIGS -org $6800 :logon:BootLog16
:Logon:BootLog8 Ä {iie}P8Size
{Logon}BootLog8.o ¶
{Cons}Console.o ¶
{Logon}DES.o
If "{MSDListFlag}"
Set LnkOptions "-l > :logon:BootLog8.map"
End
LinkIIGS -o {Targ}
{Logon}BootLog8.o ¶
{Cons}Console.o ¶
{Logon}DES.o ¶
{LnkOptions}
Set P8Size `catenate {iie}P8Size`
Set LogonORG `Evaluate 0x2000+{P8Size}`
MakeBinIIGS -org {LogonORG} {Targ}
:logon:BootLog16.o Ä :logon:BootLog16.aii
:logon:logon.main ¶
:logon:icon.aii ¶
:console:console.equates ¶
:console:cons.macros
If "{MSDListFlag}"
Set AsmOptions "-f -l -lo :logon:BootLog16.lst"
End
AsmIIGS -i :console: -o :logon:BootLog16.o :logon:BootLog16.aii {AsmOptions}
{Logon}BootLog8.o Ä {Logon}BootLog8.aii
{Logon}Logon.main
{Logon}Icon.aii
{Cons}console.equates
{Cons}Cons.macros
If "{MSDListFlag}"
Set AsmOptions "-f -l -lo :logon:BootLog8.lst"
End
AsmIIGS -i :console: -o {Targ} :logon:BootLog8.aii {AsmOptions}
:Console:Console.o Ä :Console:Console.aii
:Console:input.aii ¶
:Console:strings.aii ¶
:console:console.equates ¶
:console:cons.macros
If "{MSDListFlag}"
Set AsmOptions "-f -l -lo :Console:Console.lst"
End
AsmIIGS -i :console: -o :Console:Console.o :Console:Console.aii {AsmOptions}
:logon:DES.o Ä :logon:DES.aii
If "{MSDListFlag}"
Set AsmOptions "-f -l -lo :logon:DES.lst"
End
AsmIIGS -o :logon:DES.o :logon:DES.aii {AsmOptions}
:work:P8 Ä Always.Do.This
Duplicate -y -d {SDSystem}P8 :work:P8
:work:Basic.System Ä Always.Do.This
Duplicate -y -d {Basic}Basic.System :work:Basic.System
:work:ATP1.ATRom Ä Always.Do.This
Duplicate -y -d {SDDrivers}ATP1.ATRom :work:ATP1.ATRom
:work:ATP2.ATRam Ä Always.Do.This
Duplicate -y -d {SDDrivers}ATP2.ATRam :work:ATP2.ATRam
:work:ETBoot Ä Always.Do.This
Duplicate -y -d {Drivers}ETalk:ETBoot :work:ETBoot
#
# This is a "false target" that forces some files in other places in the
# GSProjects project to be rebuilt if necessary.
#
Always.Do.This Ä
set BootEcho "{echo}"
set echo 0
Directory ::Scripts:
echo "¶t# Building ATP1.ATROM..."
Build -s atrom
echo "¶t# Building ATP2.ATRAM..."
Build -s atram
echo "¶t# Building ETalk..."
Build -s etalk
echo "¶t# Building P8..."
Build -s p8
Directory :::BASIC.System
BuildProgram BASIC.System
Directory ::GS.OS:NetBoot
set echo "{BootEcho}"