Change to using tup build system

This commit is contained in:
pjht 2023-03-28 10:44:29 -05:00
parent 5a0f1c7e46
commit e49c2e2047
Signed by: pjht
GPG Key ID: 7B5F6AFBEC7EE78E
6 changed files with 21 additions and 10 deletions

11
.gitignore vendored
View File

@ -1,3 +1,8 @@
*.bin
*.elf
*.o
##### TUP GITIGNORE #####
##### Lines below automatically generated by Tup.
##### Do not edit.
.tup
/.gitignore
/rom.bin
/rom.elf
/rom.o

7
Tupfile Normal file
View File

@ -0,0 +1,7 @@
.gitignore
LDFLAGS = -z max-page-size=1 --orphan-handling=error -T rom.ld
ASFLAGS = -m68010 --register-prefix-optional
: rom.68k |> m68k-elf-as $(ASFLAGS) -o %o %f |> rom.o
: rom.o |> m68k-elf-ld $(LDFLAGS) -o %o %f |> rom.elf
: rom.elf |> m68k-elf-objcopy -O binary %f %o |> rom.bin

0
Tupfile.ini Normal file
View File

View File

@ -1,4 +0,0 @@
#! /bin/bash -x
m68k-elf-as -m68010 --register-prefix-optional -o rom.o rom.68k
m68k-elf-ld -z max-page-size=1 -T rom.ld -o rom.elf rom.o
m68k-elf-objcopy -O binary rom.elf rom.bin

View File

@ -1,5 +1,6 @@
.long fakestack, start
start:
.long fakestack, _start
.global _start
_start:
move.w #0x1, d0 | Find the ROM card
bra.b find_first_card
romfindret:

4
rom.ld
View File

@ -1,5 +1,7 @@
ENTRY(_start)
SECTIONS {
. = 0x0;
_etext = .;
.text : { *(.text) }
/DISCARD/ : { *(.data) *(.bss) }
}