Separate kernel code from test code

Eventually I want the kernel to be loaded from the SD card as well, but
it still needs to separate from user programs.

At some point there should be a folder just for the BIOS, which should
read from the boot block of the SD card and start executing, and thats
it.
This commit is contained in:
Byron Lathi
2022-04-16 21:58:37 -05:00
parent 238a4b6f98
commit c6098f2d1f
26 changed files with 5 additions and 5 deletions

View File

@@ -15,8 +15,7 @@ LISTS=lists
TESTS=tests
SRCS=$(wildcard *.s) $(wildcard *.c)
SRCS+=$(wildcard filesystem/*.s) $(wildcard filesystem/*.c)
SRCS+=$(wildcard devices/*.s) $(wildcard devices/*.c)
SRCS+=$(filter-out $(wildcard tests/*), $(wildcard **/*.s)) $(filter-out $(wildcard tests/*), $(wildcard **/*.c))
OBJS+=$(patsubst %.s,%.o,$(filter %s,$(SRCS)))
OBJS+=$(patsubst %.c,%.o,$(filter %c,$(SRCS)))
@@ -47,6 +46,7 @@ $(BIN): $(OBJS)
$(CC) $(CFLAGS) -l $(LISTS)/$<.list -c $< -o $@
$(LISTS):
$(info $$SRCS is [${SRCS}])
mkdir -p $(addprefix $(LISTS)/,$(sort $(dir $(SRCS))))
mkdir $(LISTS)/$(sort $(dir $(TEST_SRCS)))

View File

@@ -1,8 +1,8 @@
#include <stdio.h>
#include "board_io.h"
#include "uart.h"
#include "interrupt.h"
#include "devices/board_io.h"
#include "devices/uart.h"
#include "devices/interrupt.h"
int main(void)
{