问题
I have made a small program in assembly language which is executing fine. I also have the commands to execute it but I don't know how to make a makefile to automate the same. The command I used is:
nasm -f bin boot2.asm -o boot2.bin && qemu-system-x86_64 -fda boot2.bin
How do I make a makefile for the same?
回答1:
Simple version:
all: build run
build: boot2.bin
boot2.bin: boot2.asm
nasm -f bin boot2.asm -o boot2.bin
run: boot2.bin
qemu-system-x86_64 -fda boot2.bin
clean:
-rm boot2.bin
来源:https://stackoverflow.com/questions/65378273/not-able-to-write-make-file