mirror of
https://github.com/cowmonk/cowos.git
synced 2025-10-27 22:43:26 +00:00
cowos moves to 64bit! and framebuffers too ig
This commit is contained in:
parent
b78e4fc24d
commit
babc65305d
32 changed files with 4074 additions and 146 deletions
58
kernel/Makefile
Normal file
58
kernel/Makefile
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
MAKEFLAGS += -rR
|
||||
.SUFFIXES:
|
||||
|
||||
override OUTPUT := cowos
|
||||
|
||||
CC := clang
|
||||
|
||||
CFLAGS := -g -O3 -pipe
|
||||
|
||||
CPPFLAGS :=
|
||||
|
||||
override CFLAGS += \
|
||||
-m64 -g -c -ffreestanding -Wall -Werror -fcommon -Iinclude/ -fPIE -mno-80387 \
|
||||
-mno-mmx \
|
||||
-mno-sse \
|
||||
-nostdlib \
|
||||
-mno-sse2 \
|
||||
-mno-red-zone -fno-stack-protector \
|
||||
-fno-stack-check \
|
||||
-fno-lto \
|
||||
-target x86_64-unknown-none
|
||||
|
||||
override CPPFLAGS := \
|
||||
-I src \
|
||||
$(CPPFLAGS) \
|
||||
-DLIMINE_API_REVISION=3 \
|
||||
-MMD \
|
||||
-MP
|
||||
|
||||
override NASMFLAGS += \
|
||||
-Wall \
|
||||
-f elf64
|
||||
|
||||
override LDFLAGS += \
|
||||
-Wl,-m,elf_x86_64 \
|
||||
-Wl,--build-id=none \
|
||||
-nostdlib \
|
||||
-static \
|
||||
-z max-page-size=0x1000 \
|
||||
-T linker.ld
|
||||
|
||||
C_SOURCES = $(shell find . -name '*.c')
|
||||
C_OBJS = $(patsubst %.c,%.o,$(C_SOURCES))
|
||||
|
||||
.PHONY: all
|
||||
all: bin/$(OUTPUT)
|
||||
|
||||
bin/$(OUTPUT): Makefile $(C_OBJS) linker.ld
|
||||
mkdir ./bin/ -p
|
||||
$(CC) $(LDFLAGS) -o ./bin/$(OUTPUT) $(C_OBJS) -fuse-ld=lld
|
||||
|
||||
%.o: %.c
|
||||
$(CC) $(CFLAGS) $(subst .o,.c,$@) -o $@
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
find . -name '*.o' -delete
|
||||
rm -r -f ./bin
|
||||
Loading…
Add table
Add a link
Reference in a new issue