Changeset 698a58a in buchla-68k


Ignore:
Timestamp:
06/30/2017 10:26:53 PM (7 years ago)
Author:
Thomas Lopatic <thomas@…>
Branches:
master
Children:
f8c95c4
Parents:
a838f5b
Message:

Successfully linked ROM!

Location:
hatari
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • hatari/c/work/rom.lnk

    ra838f5b r698a58a  
    1 bios.o,prolog.a,romp.o,booter.o,timeint.o,libcio.a,vlib.a,iolib.a,libsm.a,lib700.a
     1-a,100000,x,400,bios.o,prolog.a,romp.o,booter.o,timeint.o,libcio.a,vlib.a,iolib.a,libsm.a,lib700.a
  • hatari/rem.py

    ra838f5b r698a58a  
    295295    send_line("")
    296296
    297 def archive_one(arch, base):
    298     print("Adding {}.o to {}".format(base, arch))
    299     run_command("cp d:\\out\\{}.o {}.o".format(base, base))
    300     run_command("ar68 r {} {}.o".format(arch, base))
    301     run_command("rm {}.o".format(base))
    302     send_line("")
    303 
    304 def archive(arch, mod):
    305     print("Creating {}".format(arch))
     297def store_file(file):
     298    run_command("cp {} d:\\out\\{}".format(file, file))
     299
     300def fetch_file(file):
     301    run_command("cp d:\\out\\{} {}".format(file, file))
     302
     303def remove_file(file):
     304    run_command("rm {}".format(file))
     305
     306def store_archive(a_base):
     307    store_file("{}.a".format(a_base))
     308    store_file("{}.ndx".format(a_base))
     309    send_line("")
     310
     311def fetch_archive(a_base):
     312    fetch_file("{}.a".format(a_base))
     313    fetch_file("{}.ndx".format(a_base))
     314    send_line("")
     315
     316def remove_archive(a_base):
     317    remove_file("{}.a".format(a_base))
     318    remove_file("{}.ndx".format(a_base))
     319    send_line("")
     320
     321def archive_one(a_base, base):
     322    print("Adding {}.o to {}.a".format(base, a_base))
     323    fetch_file("{}.o".format(base))
     324    run_command("ar68 r {}.a {}.o".format(a_base, base))
     325    remove_file("{}.o".format(base))
     326    send_line("")
     327
     328def archive(a_base, mod):
     329    print("Creating {}.a".format(a_base))
    306330
    307331    for path in mod:
    308332        (dir, file) = path.split("/")
    309333        (base, ext) = file.split(".")
    310         archive_one(arch, base)
    311 
    312     run_command("cp {} d:\\out\\{}".format(arch, arch))
    313     run_command("rm {}".format(arch))
     334        archive_one(a_base, base)
     335
     336    run_command("doindex -w {}.a".format(a_base))
     337    send_line("")
     338
     339    store_archive(a_base)
     340    remove_archive(a_base)
     341
     342def link_rom():
     343    print("Linking ROM")
     344
     345    fetch_archive("prolog")
     346    fetch_archive("libcio")
     347    fetch_archive("vlib")
     348    fetch_archive("iolib")
     349    fetch_archive("libsm")
     350    fetch_archive("lib700")
     351
     352    fetch_file("bios.o")
     353    fetch_file("romp.o")
     354    fetch_file("booter.o")
     355    fetch_file("timeint.o")
     356    send_line("")
     357
     358    run_command("aln -w -l -c rom.lnk")
     359    send_line("")
     360
     361    remove_archive("prolog")
     362    remove_archive("libcio")
     363    remove_archive("vlib")
     364    remove_archive("iolib")
     365    remove_archive("libsm")
     366    remove_archive("lib700")
     367
     368    remove_file("bios.o")
     369    remove_file("romp.o")
     370    remove_file("booter.o")
     371    remove_file("timeint.o")
     372    send_line("")
     373
     374    store_file("bios.abs")
     375    remove_file("bios.abs")
    314376    send_line("")
    315377
     
    343405            raise Exception("file {} with invalid extension {}".format(file, ext))
    344406
    345 archive("prolog.a", mod_prolog)
    346 archive("iolib.a", mod_iolib)
    347 archive("libcio.a", mod_libcio)
    348 archive("libsm.a", mod_libsm)
    349 archive("lib700.a", mod_lib700)
    350 archive("vlib.a", mod_vlib)
     407archive("prolog", mod_prolog)
     408archive("iolib", mod_iolib)
     409archive("libcio", mod_libcio)
     410archive("libsm", mod_libsm)
     411archive("lib700", mod_lib700)
     412archive("vlib", mod_vlib)
     413
     414link_rom()
Note: See TracChangeset for help on using the changeset viewer.