<commit_before>
SRCDIR := src
IDIR := include
ODIR := obj
ISODIR := isodir

SRCFILES := $(shell find $(SRCDIR) -type f -name "*.[cs]")
CFILES := $(filter %.c,$(SRCFILES))
SFILES := $(filter %.s,$(SRCFILES))
OBJFILES := $(patsubst $(SRCDIR)/%.s,$(ODIR)/%.o,$(SFILES)) \
	    $(patsubst $(SRCDIR)/%.c,$(ODIR)/%.o,$(CFILES))

TOOLKIT_PREFIX := i586-elf-
CC := $(TOOLKIT_PREFIX)gcc
AS := $(TOOLKIT_PREFIX)as
WARNINGS := -Wall -Wextra -pedantic -Wshadow -Wpointer-arith -Wcast-align \
            -Wwrite-strings -Wmissing-declarations \
            -Wredundant-decls -Wnested-externs -Winline -Wno-long-long \
            -Wuninitialized -Wconversion -Wstrict-prototypes
CFLAGS := -std=gnu99 -ffreestanding -O2 -I$(IDIR)
LFLAGS := -ffreestanding -O2 -nostdlib -lgcc $(WARNINGS)

.PHONY: all run clean

all: shorai.iso

run: shorai.iso
	qemu-system-i386 -cdrom shorai.iso

shorai.iso: $(ODIR)/shorai.bin
	mkdir -p $(ISODIR)
	mkdir -p $(ISODIR)/boot
	cp $(ODIR)/shorai.bin $(ISODIR)/boot/shorai.bin
	mkdir -p $(ISODIR)/boot/grub
	cp src/grub.cfg $(ISODIR)/boot/grub/grub.cfg
	grub-mkrescue -o shorai.iso $(ISODIR)

$(ODIR)/shorai.bin: $(OBJFILES)<commit_msg>changed Makefile to find C source separately from ASM source<commit_after>
SRCDIR := src
IDIR := include
ODIR := obj
ISODIR := isodir

CFILES := $(shell find $(SRCDIR) -type f -name "*.c")
SFILES := $(shell find $(SRCDIR) -type f -name "*.s")
OBJFILES := $(patsubst $(SRCDIR)/%.s,$(ODIR)/%.o,$(SFILES)) \
	    $(patsubst $(SRCDIR)/%.c,$(ODIR)/%.o,$(CFILES))

TOOLKIT_PREFIX := i586-elf-
CC := $(TOOLKIT_PREFIX)gcc
AS := $(TOOLKIT_PREFIX)as
WARNINGS := -Wall -Wextra -pedantic -Wshadow -Wpointer-arith -Wcast-align \
            -Wwrite-strings -Wmissing-declarations \
            -Wredundant-decls -Wnested-externs -Winline -Wno-long-long \
            -Wuninitialized -Wconversion -Wstrict-prototypes
CFLAGS := -std=gnu99 -ffreestanding -O2 -I$(IDIR)
LFLAGS := -ffreestanding -O2 -nostdlib -lgcc $(WARNINGS)

.PHONY: all run clean

all: shorai.iso

run: shorai.iso
	qemu-system-i386 -cdrom shorai.iso

shorai.iso: $(ODIR)/shorai.bin
	mkdir -p $(ISODIR)
	mkdir -p $(ISODIR)/boot
	cp $(ODIR)/shorai.bin $(ISODIR)/boot/shorai.bin
	mkdir -p $(ISODIR)/boot/grub
	cp src/grub.cfg $(ISODIR)/boot/grub/grub.cfg
	grub-mkrescue -o shorai.iso $(ISODIR)

$(ODIR)/shorai.bin: $(OBJFILES)
{'fraction_non_alphanumeric': 0.18556701030927836, 'fraction_numerical': 0.00859106529209622, 'mean_word_length': 3.548828125, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '5459419', 'n_tokens_mistral': 1013, 'n_tokens_neox': 985, 'n_words': 200}