Makefile 203 B

12345678910111213141516
  1. .POSIX:
  2. MAIN := main.img
  3. .PHONY: clean run
  4. $(MAIN): main.S
  5. as -o main.o '$<'
  6. ld --oformat binary -o '$@' -Ttext 0x7C00 main.o
  7. clean:
  8. rm -f '$(MAIN)'
  9. run: $(MAIN)
  10. qemu-system-i386 -hda '$(MAIN)'