shithub: riscv

ref: e81e1a4aeddad2bc612c9c5243573250b6ff33a4
dir: /sys/src/boot/efi/mkfile/

View raw version
TARG=bootia32.efi bootx64.efi
HFILES=fns.h mem.h
IMAGEBASE=0x8000
CFLAGS=-FTVw
PEFLAGS=$CFLAGS '-DIMAGEBASE='$IMAGEBASE

all:V: $TARG

install:V: $TARG
	cp bootia32.efi /386
	cp bootx64.efi /386

clean:V:
	rm -f *.[68] *.out $TARG

bootia32.efi:	pe32.8 efi.8 sub.8
	8l -l -H3 -T$IMAGEBASE -o $target $prereq

pe32.8:	pe32.s
	8a $PEFLAGS pe32.s

efi.8:	efi.c efi.h
	8c $CFLAGS efi.c

sub.8:	sub.c
	8c $CFLAGS sub.c

%.8:	$HFILES


bootx64.efi:	pe64.6 efi.6 sub.6
	6l -l -s -R1 -T$IMAGEBASE -o bootx64.out $prereq
	dd -if bootx64.out -bs 1 -iseek 40 >$target

pe64.6:	pe64.s
	6a $PEFLAGS pe64.s

efi.6:	efi.c efi.h
	6c $CFLAGS efi.c

sub.6:	sub.c
	6c $CFLAGS sub.c

%.6:	$HFILES