Compare commits

..

No commits in common. "51aa6ba7dd96164cc6a1499c1c6f400c2d27b012" and "b58cef5658c7fbfad7aa9884239cae01eddb3aa0" have entirely different histories.

5 changed files with 9 additions and 11 deletions

View File

@ -10,7 +10,7 @@ LDSCRIPT = make/$(ARCH)/linker.ld
CFLAGS ?= -O2
CFLAGS := $(CFLAGS) $(ARCH_CFLAGS) \
-Wall -Wextra -pedantic -Wno-language-extension-token -std=gnu11 -I../ext -Isrc -fPIE
-Wall -Wextra -pedantic -Wno-language-extension-token -std=gnu11 -I../ext -fPIE
LDFLAGS := $(LDFLAGS) -T $(LDSCRIPT)
@ -21,17 +21,18 @@ ARCHFILES := $(ARCHFILES) $(shell find src/arch/$(ARCH) -type f -name '*.c' -pri
HFILES := $(shell find src -type f -name '*.h')
OBJ := $(patsubst src/%.c,obj/$(ARCH)/%.o,$(CFILES) $(ARCHFILES))
.PHONY: all clean obj
.PHONY: all clean obj dirs
all: bin/$(TARGET)-$(ARCH)
bin/$(TARGET)-$(ARCH): $(OBJ)
@mkdir -p $(@D)
bin/$(TARGET)-$(ARCH): $(OBJ) dirs
$(LD) $(LDFLAGS) $(OBJ) -o $@
obj/$(ARCH)/%.o: src/%.c $(HFILES)
@mkdir -p $(@D)
obj/$(ARCH)/%.o: src/%.c $(HFILES) dirs
$(CC) $(CFLAGS) -c $< -o $@
dirs:
mkdir -p bin $(patsubst src/%,obj/$(ARCH)/%, $(shell find src/* -type d -print))
clean:
rm -rf bin obj zig-cache

View File

@ -1,8 +1,6 @@
#include <stdint.h>
#include <stddef.h>
#include <print/print.h>
#include "vga.h"
static const size_t VGA_WIDTH = 80;

View File

@ -1,6 +1,5 @@
#include "arch/x86/vga.h"
#include "hal/ops.h"
#include "print/print.h"
void kmain(int argc, char **argv) {
printf("Kernel initialized! Platform: %s\n", arch);

View File

@ -1,4 +1,4 @@
#include <hal/print.h>
#include "../hal/print.h"
void puts(const char*);
void print(const char*);