diff --git a/Makefile b/Makefile deleted file mode 100644 index 4e7cea8..0000000 --- a/Makefile +++ /dev/null @@ -1,7 +0,0 @@ -.PHONY: all -all: - @./rscons - -.PHONY: run -run: all - qemu-system-x86_64 -bios OVMF.fd -hdb build/e.1/efi-loader.img diff --git a/Rsconscript b/Rsconscript index 1d1942a..88d8874 100644 --- a/Rsconscript +++ b/Rsconscript @@ -18,7 +18,7 @@ class Image < Builder end end -env do |env| +uefi_env = env "uefi" do |env| env.add_builder(Image) env["CC"] = "x86_64-w64-mingw32-gcc" env["CPPPATH"] += %w[/usr/include/efi /usr/include/efi/x86_64] @@ -29,3 +29,7 @@ env do |env| env.Program("^/BOOTX64.EFI", "${sources}") env.Image("^/efi-loader.img", "^/BOOTX64.EFI") end + +task "run" do + sh %W[qemu-system-x86_64 -bios OVMF.fd -hda #{uefi_env.expand("^/efi-loader.img")}] +end