mirror of
https://github.com/gbowne1/ClassicOS.git
synced 2026-01-19 20:05:20 -08:00
Compare commits
6 Commits
gbowne1-ad
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| b6c158957e | |||
|
|
a7b0d1152f | ||
|
|
e38f1aa2ee | ||
|
|
78d5e9a7ab | ||
|
|
daead5ee57 | ||
|
|
4fb81d2e57 |
24
.clang-format
Normal file
24
.clang-format
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
BasedOnStyle: Google
|
||||||
|
IndentWidth: 4
|
||||||
|
TabWidth: 4
|
||||||
|
UseTab: Never
|
||||||
|
ColumnLimit: 80
|
||||||
|
|
||||||
|
DerivePointerAlignment: false
|
||||||
|
PointerAlignment: Right
|
||||||
|
ReferenceAlignment: Right
|
||||||
|
|
||||||
|
AlignConsecutiveMacros: Consecutive
|
||||||
|
AlignTrailingComments:
|
||||||
|
Kind: Always
|
||||||
|
OverEmptyLines: 0
|
||||||
|
|
||||||
|
IncludeBlocks: Regroup
|
||||||
|
IncludeCategories:
|
||||||
|
# Std headers
|
||||||
|
- Regex: '<[[:alnum:]_.]+>'
|
||||||
|
Priority: 2
|
||||||
|
|
||||||
|
# Other headers
|
||||||
|
- Regex: '.*'
|
||||||
|
Priority: 1
|
||||||
6
.clangd
Normal file
6
.clangd
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
CompileFlags:
|
||||||
|
CompilationDatabase: build
|
||||||
|
|
||||||
|
Diagnostics:
|
||||||
|
UnusedIncludes: Strict
|
||||||
|
MissingIncludes: Strict
|
||||||
12
.editorconfig
Normal file
12
.editorconfig
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
root = true
|
||||||
|
|
||||||
|
[*]
|
||||||
|
charset = utf-8
|
||||||
|
end_of_line = lf
|
||||||
|
insert_final_newline = true
|
||||||
|
trim_trailing_whitespace = true
|
||||||
|
|
||||||
|
[Makefile]
|
||||||
|
indent_style = tab
|
||||||
|
indent_size = 8
|
||||||
|
tab_width = 8
|
||||||
6
Makefile
6
Makefile
@@ -18,9 +18,9 @@ KERNEL_OBJ += $(patsubst kernel/%.asm, $(BUILD_DIR)/asm_%.o, $(KERNEL_ASM_SRC))
|
|||||||
KLIBC_SRC = $(wildcard klibc/src/*.c)
|
KLIBC_SRC = $(wildcard klibc/src/*.c)
|
||||||
KLIBC_OBJ = $(patsubst klibc/src/%.c, $(BUILD_DIR)/klibc/%.o, $(KLIBC_SRC))
|
KLIBC_OBJ = $(patsubst klibc/src/%.c, $(BUILD_DIR)/klibc/%.o, $(KLIBC_SRC))
|
||||||
|
|
||||||
|
.PHONY: all stage1 stage2 kernel compile-commands $(BUILD_DIR)/compile_commands.json run gdb clean clean-cross clean-all
|
||||||
all: $(DISK_IMG)
|
all: $(DISK_IMG)
|
||||||
|
|
||||||
.PHONY: stage1 stage2 kernel run gdb clean
|
|
||||||
stage1: $(BUILD_DIR)
|
stage1: $(BUILD_DIR)
|
||||||
$(AS) $(ASFLAGS) -o $(BUILD_DIR)/$@.o bootloader/$@.asm
|
$(AS) $(ASFLAGS) -o $(BUILD_DIR)/$@.o bootloader/$@.asm
|
||||||
$(LD) -Ttext=0x7c00 -melf_i386 -o $(BUILD_DIR)/$@.elf $(BUILD_DIR)/$@.o
|
$(LD) -Ttext=0x7c00 -melf_i386 -o $(BUILD_DIR)/$@.elf $(BUILD_DIR)/$@.o
|
||||||
@@ -57,6 +57,10 @@ $(BUILD_DIR):
|
|||||||
mkdir -p $@
|
mkdir -p $@
|
||||||
mkdir -p $(BUILD_DIR)/klibc
|
mkdir -p $(BUILD_DIR)/klibc
|
||||||
|
|
||||||
|
compile-commands: $(BUILD_DIR)/compile_commands.json
|
||||||
|
$(BUILD_DIR)/compile_commands.json: $(BUILD_DIR)
|
||||||
|
bear --output $@ -- make -B
|
||||||
|
|
||||||
run:
|
run:
|
||||||
qemu-system-i386 -s -S $(DISK_IMG)
|
qemu-system-i386 -s -S $(DISK_IMG)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user