Rename programs/ to com/

This commit is contained in:
Nero 2019-10-18 14:43:28 +00:00
parent 50e58765b1
commit ec4bdf649d
3 changed files with 9 additions and 5 deletions

View File

@ -1,6 +1,6 @@
FLOPPY = 360 FLOPPY = 360
PROGRAMS = $(patsubst %.asm,%.com,$(wildcard programs/*.asm)) PROGRAMS = $(patsubst %.asm,%.com,$(wildcard com/*.asm))
DISTFILES = rdos.bin $(PROGRAMS) DISTFILES = rdos.bin $(PROGRAMS)
ROMS = ROMS =
@ -30,18 +30,22 @@ endif
default: fdimage.img default: fdimage.img
# Kernel image
rdos.bin: kernel/*.asm lib/*.asm rdos.bin: kernel/*.asm lib/*.asm
$(NASM) $(NASM_ARGS) -o $@ -I kernel kernel/main.asm $(NASM) $(NASM_ARGS) -o $@ -I kernel kernel/main.asm
# Boot sectors
boot/%.bs: boot/%.asm boot/%.bs: boot/%.asm
$(NASM) $(NASM_ARGS) -DFLOPPY=$(FLOPPY) -o $@ $< $(NASM) $(NASM_ARGS) -DFLOPPY=$(FLOPPY) -o $@ $<
programs/%.com: programs/%.asm # BIOS option roms
$(NASM) $(NASM_ARGS) -o $@ $<
rom/%.rom: rom/%.asm rom/%.rom: rom/%.asm
$(NASM) $(NASM_ARGS) -o $@ $< && utils/fix-rom.sh $@ $(NASM) $(NASM_ARGS) -o $@ $< && utils/fix-rom.sh $@
# Regular COM programs
com/%.com: com/%.asm
$(NASM) $(NASM_ARGS) -o $@ $<
fdimage.img: boot/fat.bs $(DISTFILES) fdimage.img: boot/fat.bs $(DISTFILES)
mformat -C -i $@ -f $(FLOPPY) -B boot/fat.bs :: mformat -C -i $@ -f $(FLOPPY) -B boot/fat.bs ::
mcopy -i $@ $(DISTFILES) :: mcopy -i $@ $(DISTFILES) ::
@ -51,7 +55,7 @@ hdimage.img: boot/mbr.bs fdimage.img
clean: clean:
find -name '*.lst' -delete find -name '*.lst' -delete
rm -f $$(cat .gitignore) programs/*.com boot/*.bs rom/*.rom utils/emul rm -f $$(cat .gitignore) boot/*.bs com/*.com rom/*.rom utils/emul
qemu-floppy: fdimage.img $(ROMS) qemu-floppy: fdimage.img $(ROMS)
$(QEMU) $(QEMU_ARGS) -boot c -fda fdimage.img $(QEMU) $(QEMU_ARGS) -boot c -fda fdimage.img