<commit_before>.PHONY: all img run floppy_disk iso clean
.SUFFIXES: .asm .bin

OBJS = boot0.bin \
			 boot1.bin

all: nihilum

nihilum: $(OBJS)
	cat boot0.bin boot1.bin > nihilum

.asm.bin: print.asm utils.asm
	nasm -f bin $< -o $@

img: nihilum.img
nihilum.img: nihilum
	dd conv=notrunc if=nihilum of=nihilum.img

run: floppy_disk
	qemu -hda disk -monitor stdio

floppy_disk: nihilum disk
	dd conv=notrunc if=nihilum of=disk bs=512 count=128

disk: disk.backup
	cp disk.backup disk

iso: nihilum.img
	mkisofs -no-emul-boot -boot-load-size 4 -quiet -V 'Nihilum' -input-charset iso8859-1 -o nihilum.iso -b nihilum.img .

clean:
	rm -f *.bin
	rm -f *.img
	rm -f *.iso

distclean: clean
	rm -f nihilum
<commit_msg>A bit of file structure refactoring<commit_after>.PHONY: all run disk_image clean
.SUFFIXES: .asm .bin

DISK_IMAGE = nihilum.fs
DISK_IMAGE_SIZE = 64m

BOOT_OBJS = boot0.bin boot1.bin

all: boot $(DISK_IMAGE)

boot: $(BOOT_OBJS)
	cat $(BOOT_OBJS) > $@

.asm.bin: print.asm utils.asm
	nasm -dDEBUG -f bin $< -o $@

run: $(DISK_IMAGE)
	qemu -hda $(DISK_IMAGE) -monitor stdio

$(DISK_IMAGE): boot
	# the original makefs has a little bug, which creates the bootblock of
	# size 8KiB, instead of a 64KiB
	#
	# I should probably upload a patch..
	/usr/src/usr.sbin/makefs/makefs -tffs -oversion=2 -M$(DISK_IMAGE_SIZE) $(DISK_IMAGE) image/
	dd conv=notrunc if=boot of=$(DISK_IMAGE) bs=512 count=128

clean:
	rm -f *.bin
	rm -f *.img
	rm -f *.fs

distclean: clean
	rm -f boot
	rm -f $(DISK_IMAGE)

{'fraction_non_alphanumeric': 0.1247498332221481, 'fraction_numerical': 0.0200133422281521, 'mean_word_length': 3.4910179640718564, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3148895', 'n_tokens_mistral': 696, 'n_tokens_neox': 655, 'n_words': 185}