diff options
-rw-r--r-- | Makefile | 10 | ||||
-rw-r--r-- | kernel/interrupts/idt.dats | 2 | ||||
-rw-r--r-- | kernel/main.dats | 2 | ||||
-rw-r--r-- | kernel/prelude/DATS/print.dats (renamed from kernel/output/print.dats) | 5 | ||||
-rw-r--r-- | kernel/prelude/kernel_prelude.hats (renamed from kernel/kernel_prelude.hats) | 4 | ||||
-rw-r--r-- | lib/DATS/itoa.dats (renamed from kernel/itoa.dats) | 2 | ||||
-rw-r--r-- | lib/DATS/writer.dats (renamed from kernel/output/writer.dats) | 4 | ||||
-rw-r--r-- | lib/SATS/writer.sats (renamed from kernel/output/writer.sats) | 0 |
8 files changed, 14 insertions, 15 deletions
@@ -8,9 +8,9 @@ assembly_source_files := $(wildcard arch/$(arch)/boot/*.asm) assembly_object_files := $(patsubst arch/$(arch)/boot/%.asm, \ build/arch/$(arch)/%.o, $(assembly_source_files)) -dats_source_files := $(wildcard kernel/*.dats kernel/**/*.dats) -dats_object_files := $(patsubst kernel/%.dats, \ - build/kernel/%_dats.o, $(dats_source_files)) +dats_source_files := $(wildcard lib/**/*.dats kernel/*.dats kernel/**/*.dats kernel/**/**/*.dats) +dats_object_files := $(patsubst %.dats, \ + build/%_dats.o, $(dats_source_files)) PATSCC=acc pc @@ -51,11 +51,11 @@ build/arch/$(arch)/%.o: arch/$(arch)/boot/%.asm @mkdir -p $(shell dirname $@) @nasm -felf64 $< -o $@ -build/kernel/%_dats.c: kernel/%.dats +build/%_dats.c: %.dats @mkdir -p $(shell dirname $@) $(PATSCC) -ccats -o $@ $< @mv *_dats.c $@ -build/kernel/%.o: build/kernel/%.c +build/%.o: build/%.c @mkdir -p $(shell dirname $@) $(CC) $(INCLUDE_ATS) $(CFLAGS) $(CFLAGS_ATS) -O2 -c $< -o $@ diff --git a/kernel/interrupts/idt.dats b/kernel/interrupts/idt.dats index 851a2b0..ea25ced 100644 --- a/kernel/interrupts/idt.dats +++ b/kernel/interrupts/idt.dats @@ -1,4 +1,4 @@ -#include "kernel/kernel_prelude.hats" +#include "kernel/prelude/kernel_prelude.hats" #define ATS_DYNLOADFLAG 0 diff --git a/kernel/main.dats b/kernel/main.dats index 26db859..d6e29f4 100644 --- a/kernel/main.dats +++ b/kernel/main.dats @@ -1,4 +1,4 @@ -#include "kernel/kernel_prelude.hats" +#include "./prelude/kernel_prelude.hats" staload "kernel/interrupts/idt.sats" diff --git a/kernel/output/print.dats b/kernel/prelude/DATS/print.dats index 9b5def0..5049a98 100644 --- a/kernel/output/print.dats +++ b/kernel/prelude/DATS/print.dats @@ -2,9 +2,8 @@ #define ATS_DYNLOADFLAG 0 - -staload "kernel/output/writer.sats" -staload "kernel/itoa.dats" +staload "lib/SATS/writer.sats" +staload "lib/DATS/itoa.dats" extern fun print_newline() : void implement print_newline() = put_string("\n") diff --git a/kernel/kernel_prelude.hats b/kernel/prelude/kernel_prelude.hats index 048cba1..eb1990d 100644 --- a/kernel/kernel_prelude.hats +++ b/kernel/prelude/kernel_prelude.hats @@ -3,10 +3,10 @@ #include "share/atspre_staload.hats" -staload "kernel/output/writer.sats" +staload "lib/SATS/writer.sats" val () = clear_screen() -staload "kernel/output/print.dats" +staload "./DATS/print.dats" #endif diff --git a/kernel/itoa.dats b/lib/DATS/itoa.dats index 7557dac..35b8c47 100644 --- a/kernel/itoa.dats +++ b/lib/DATS/itoa.dats @@ -54,7 +54,7 @@ implement itoa(value,base) = let // Run loop val () = loop(pf | addr@buffer, value, i2sz(0)); - val str = char_arr2string(buffer); // Convert to string UNSAFE: + val str = char_arr2string(buffer); // Convert arr to string UNSAFE: in let prval () = fpf(pf) in end; str // Return string diff --git a/kernel/output/writer.dats b/lib/DATS/writer.dats index c7731f6..24246a1 100644 --- a/kernel/output/writer.dats +++ b/lib/DATS/writer.dats @@ -1,6 +1,6 @@ -#include "kernel/kernel_prelude.hats" +#include "share/atspre_staload.hats" -staload "./writer.sats" +staload "lib/SATS/writer.sats" #define ATS_DYNLOADFLAG 0 diff --git a/kernel/output/writer.sats b/lib/SATS/writer.sats index 65a2ea9..65a2ea9 100644 --- a/kernel/output/writer.sats +++ b/lib/SATS/writer.sats |