Last active
August 18, 2016 04:24
-
-
Save tanishiking/22b545ebd5bd9c8328f1bbdcd4f2c658 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SRCS=ipl.s | |
OBJS=$(SRCS:.s=.o) | |
BINS=$(SRCS:.s=.bin) | |
IMGS=$(SRCS:.s=.img) | |
LNK=lnk.ld | |
all: | |
make img | |
make run | |
$(OBJS): $(SRCS) | |
as -o $@ $^ | |
$(BINS): $(OBJS) $(LNK) | |
ld -o $@ -T $(LNK) $(OBJS) | |
$(IMGS): $(BINS) | |
mformat -f 1440 -C -B $^ -i $@ | |
img: $(IMGS) | |
run: $(IMGS) | |
qemu-system-i386 $^ | |
.PHONY: clean | |
clean: | |
$(RM) $(IMGS) $(BINS) $(OBJS) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment