mirror of
https://github.com/ksherlock/mpw.git
synced 2024-12-11 17:50:46 +00:00
Created MPW Makefile Conversion (markdown)
parent
0cc541938c
commit
eed575db53
52
MPW-Makefile-Conversion.md
Normal file
52
MPW-Makefile-Conversion.md
Normal file
@ -0,0 +1,52 @@
|
||||
MPW's `make` utility is similar to the Unix `make` utility. Similar enough that some makefiles can be converted with simple text replacements.
|
||||
|
||||
Here is an MPW makefile from IR 2.0.2 (ir.make):
|
||||
|
||||
IR ƒƒ IR.make ∂
|
||||
IRInit.aii.obj ∂
|
||||
RequestProc.aii.obj ∂
|
||||
IR.rfork
|
||||
LinkIIGS -t $B6 -at $0000 ∂
|
||||
IRInit.aii.obj ∂
|
||||
RequestProc.aii.obj ∂
|
||||
-o IR
|
||||
DuplicateIIgs -y -m IR :
|
||||
|
||||
IRInit.aii.obj ƒ IR.make IRInit.aii
|
||||
AsmIIGS -t IRInit.aii
|
||||
RequestProc.aii.obj ƒ IR.make RequestProc.aii
|
||||
AsmIIGS -t RequestProc.aii
|
||||
IR.rfork ƒ IR.make IR.r
|
||||
RezIIgs IR.r -o IR.rfork
|
||||
Duplicate -r -y IR.rfork IR
|
||||
|
||||
* `ƒƒ` and `ƒ` should be replaced with `:`.
|
||||
* `∂` should be replaced with `\`.
|
||||
* `$` needs to be escaped as `\$$`.
|
||||
* mpw commands (AsmIIgs, LinkIIgs, RezIIgs, and Duplicate) are executed as _mpw command_ (unless you generate shell scripts for each command).
|
||||
* the DuplicateIIgs command is no longer necessary.
|
||||
* if the makefile (IR.make) is included as a dependency, it should be updated to the new name.
|
||||
|
||||
The modern makefile (makefile) is now:
|
||||
|
||||
|
||||
IR : makefile \
|
||||
IRInit.aii.obj \
|
||||
RequestProc.aii.obj \
|
||||
IR.rfork
|
||||
mpw LinkIIGS -t \$$B6 -at \$$0000 \
|
||||
IRInit.aii.obj \
|
||||
RequestProc.aii.obj \
|
||||
-o IR
|
||||
mpw Duplicate -r -y IR.rfork IR
|
||||
|
||||
IRInit.aii.obj : IR.make IRInit.aii
|
||||
mpw AsmIIGS -t IRInit.aii
|
||||
RequestProc.aii.obj : IR.make RequestProc.aii
|
||||
mpw AsmIIGS -t RequestProc.aii
|
||||
IR.rfork : IR.make IR.r
|
||||
mpw RezIIgs IR.r -o IR.rfork
|
||||
|
||||
(the Duplicate command was also moved from IR.rfork to IR since I prefer to set the resource fork after linking).
|
||||
|
||||
More complicated makefiles involving variables require more work and editing.
|
Loading…
Reference in New Issue
Block a user