#Need help with converting a makefile

1 messages · Page 1 of 1 (latest)

chrome crag
#

Hello guys, i want to convert this makefile from xv6-riscv to build.zig and experiment with adding zig here, but im not sure how to convert this makefile. I have started doing it, but im hoping someone will help me continue.
heres the makefile: https://github.com/mit-pdos/xv6-riscv/blob/riscv/Makefile
and heres the build.zig progress so far: https://pastebin.com/0qZyT0YB

GitHub

Xv6 for RISC-V. Contribute to mit-pdos/xv6-riscv development by creating an account on GitHub.

#

im not sure how to add ld flags
LDFLAGS = -z max-page-size=4096
and how to compile all the userspace programs and how to make the fs.img

#

also curious whether i can add zig files without converting to build.zig?

final quail
#

yeah you can

chrome crag
#

How can i do that?

final quail
#

just call zig compiler in your makefile?

#

it probably makes the most sense to have all your zig code compiled into a single object, since that way zig code can @import itself and use APIs that aren't extern compatible