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:
@@ -15,8 +15,7 @@ LISTS=lists
|
|||||||
TESTS=tests
|
TESTS=tests
|
||||||
|
|
||||||
SRCS=$(wildcard *.s) $(wildcard *.c)
|
SRCS=$(wildcard *.s) $(wildcard *.c)
|
||||||
SRCS+=$(wildcard filesystem/*.s) $(wildcard filesystem/*.c)
|
SRCS+=$(filter-out $(wildcard tests/*), $(wildcard **/*.s)) $(filter-out $(wildcard tests/*), $(wildcard **/*.c))
|
||||||
SRCS+=$(wildcard devices/*.s) $(wildcard devices/*.c)
|
|
||||||
OBJS+=$(patsubst %.s,%.o,$(filter %s,$(SRCS)))
|
OBJS+=$(patsubst %.s,%.o,$(filter %s,$(SRCS)))
|
||||||
OBJS+=$(patsubst %.c,%.o,$(filter %c,$(SRCS)))
|
OBJS+=$(patsubst %.c,%.o,$(filter %c,$(SRCS)))
|
||||||
|
|
||||||
@@ -47,6 +46,7 @@ $(BIN): $(OBJS)
|
|||||||
$(CC) $(CFLAGS) -l $(LISTS)/$<.list -c $< -o $@
|
$(CC) $(CFLAGS) -l $(LISTS)/$<.list -c $< -o $@
|
||||||
|
|
||||||
$(LISTS):
|
$(LISTS):
|
||||||
|
$(info $$SRCS is [${SRCS}])
|
||||||
mkdir -p $(addprefix $(LISTS)/,$(sort $(dir $(SRCS))))
|
mkdir -p $(addprefix $(LISTS)/,$(sort $(dir $(SRCS))))
|
||||||
mkdir $(LISTS)/$(sort $(dir $(TEST_SRCS)))
|
mkdir $(LISTS)/$(sort $(dir $(TEST_SRCS)))
|
||||||
|
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#include "board_io.h"
|
#include "devices/board_io.h"
|
||||||
#include "uart.h"
|
#include "devices/uart.h"
|
||||||
#include "interrupt.h"
|
#include "devices/interrupt.h"
|
||||||
|
|
||||||
int main(void)
|
int main(void)
|
||||||
{
|
{
|
||||||
Reference in New Issue
Block a user