Skip to content

Instantly share code, notes, and snippets.

@pinglunliao
Created January 15, 2016 09:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pinglunliao/f514e6f0301fb5b5f23e to your computer and use it in GitHub Desktop.
Save pinglunliao/f514e6f0301fb5b5f23e to your computer and use it in GitHub Desktop.
AS = as
LD = ld
OBJCOPY = objcopy
.s.o:
$(AS) -a $< -o $*.o > $*.map
all: disk.img
disk.img: holanBoot.out
$(OBJCOPY) -O binary -j .text $< $@
holanBoot.out: holanBoot.o
${LD} -r -Ttext 0x7c00 -e start -s -o holanBoot.out holanBoot.o
clean:
rm -f disk.img holanBoot.out holanBoot.o holanBoot.map
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment