GCCX64	= gcc
GCCRV64	= riscv64-linux-gnu-gcc

all: hello-x64-syscall hello-x64-libc hello-rv64-syscall hello-rv64-libc

hello-x64-syscall: hello-x64-syscall.s
	$(GCCX64) -nostdlib -static -o $@ $<

hello-x64-libc: hello-x64-libc.s
	$(GCCX64) -static -o $@ $<

hello-rv64-syscall: hello-rv64-syscall.s
	$(GCCRV64) -nostdlib -static -o $@ $<

hello-rv64-libc: hello-rv64-libc.s
	$(GCCRV64) -static -o $@ $<

clean:
	rm -f hello-x64-syscall hello-x64-libc
	rm -f hello-rv64-syscall hello-rv64-libc
