Seems cool.
I don't know if I'm in the minority here, but when I installed Python on Windows, it didn't by default associate .py files to run with Python. So just typing "lazymake.py" doesn't work here (I have .py associated with a text editor).
One way to fix that could be to provide lazy65.cmd and lazymake.cmd (for Windows) and lazy65 and lazymake shell scripts (for *nix) in the base directory. Then a simple "lazy65" or "lazymake" could be used to invoke the scripts.
lazy65.cmd and lazymake.cmd could look like this:
Not sure what the *nix counterparts would be. Also need to change LAZY65 in lazymake.py from lazy65.py to lazy65. I think I may have missed some other place where it tries to run lazy65.py, because when I run lazymake, lazy65.py opens in my text editor.
Aaaand, not sure if I just messed something up with my changes, but when I run lazymake, it occasionally picks a different compilation order and fails to compile the "basic" example.
Here's a run that failed (didn't compile Graphics before main):
Code: Select all
C:\Users\f\Downloads\lazy65-0.1.0\examples\basic>lazymake
lazy65 -s "src" -o "obj" Global
lazy65 -s "src" -o "obj" Module
lazy65 -s "src" -o "obj" Graphics.Sprite
lazy65 -s "src" -o "obj" Graphics.Tile
lazy65 -s "src" -o "obj" main
Traceback (most recent call last):
File "C:\Users\f\Downloads\lazy65-0.1.0\lazy65.py", line 92, in <module>
main()
File "C:\Users\f\Downloads\lazy65-0.1.0\lazy65.py", line 80, in main
lines = parser.parse() #2nd pass
File "C:\Users\f\Downloads\lazy65-0.1.0\src\tempy.py", line 46, in parse
self.lineCallback()
File "C:\Users\f\Downloads\lazy65-0.1.0\lazy65.py", line 20, in lineCallback
asm.parse()
File "C:\Users\f\Downloads\lazy65-0.1.0\src\Assembler.py", line 185, in parse
self.command(tok.text)
File "C:\Users\f\Downloads\lazy65-0.1.0\src\Assembler.py", line 385, in command
self.importModule(moduleName, scopeName, True, True)
File "C:\Users\f\Downloads\lazy65-0.1.0\src\Assembler.py", line 115, in importModule
self.importSingleModule(moduleName, scopeName, generateIncludes)
File "C:\Users\f\Downloads\lazy65-0.1.0\src\Assembler.py", line 85, in importS
ingleModule
with open(symfile,'rb') as f:
IOError: [Errno 2] No such file or directory: 'obj/Graphics.sym'
lazymake.py: Error 1
And here's a one that succeeded (I did lazymake clean inbetween):
Code: Select all
C:\Users\f\Downloads\lazy65-0.1.0\examples\basic>lazymake
lazy65 -s "src" -o "obj" Global
lazy65 -s "src" -o "obj" Module
lazy65 -s "src" -o "obj" Graphics.Sprite
lazy65 -s "src" -o "obj" Graphics.Tile
lazy65 -s "src" -o "obj" Graphics
lazy65 -s "src" -o "obj" main
ca65 "obj/Global.s" -o "obj/Global.o"
ca65 "obj/main.s" -o "obj/main.o"
ca65 "obj/Module.s" -o "obj/Module.o"
ca65 "obj/Graphics/Sprite.s" -o "obj/Graphics/Sprite.o"
ca65 "obj/Graphics/Tile.s" -o "obj/Graphics/Tile.o"
ca65 "obj/Graphics.s" -o "obj/Graphics.o"
ld65 -o "basic.nes" -C linker.cfg "obj/Global.o" "obj/main.o" "obj/Module.o" "ob
j/Graphics/Sprite.o" "obj/Graphics/Tile.o" "obj/Graphics.o"
basic.nes: Build complete