1
0
Fork 0
mirror of https://github.com/tailix/kernel.git synced 2025-02-10 15:36:37 -05:00

Move to directory "/src"

This commit is contained in:
Braiden Vasco 2017-11-01 04:53:54 +00:00
parent cce723d416
commit 4fe4df2ee1
6 changed files with 24 additions and 19 deletions

2
.gitignore vendored
View file

@ -1,3 +1,3 @@
*.o
/kernel
/src/kernel

View file

@ -1,20 +1,5 @@
CCPREFIX = i686-elf-
AS = $(CCPREFIX)as
CC = $(CCPREFIX)gcc
OBJS = boot.s.o main.c.o
all: kernel
all:
make all -C src
clean:
rm kernel $(OBJS)
kernel: $(OBJS)
$(CC) -T linker.ld -o $@ -ffreestanding -nostdlib -O2 -lgcc $(OBJS)
%.c.o: %.c
$(CC) -c $< -o $@ -std=c99 -ffreestanding -O2 -Wall -Wextra
%.s.o: %.s
$(AS) $< -o $@
make clean -C src

20
src/Makefile Normal file
View file

@ -0,0 +1,20 @@
CCPREFIX = i686-elf-
AS = $(CCPREFIX)as
CC = $(CCPREFIX)gcc
OBJS = boot.s.o main.c.o
all: kernel
clean:
rm kernel $(OBJS)
kernel: $(OBJS)
$(CC) -T linker.ld -o $@ -ffreestanding -nostdlib -O2 -lgcc $(OBJS)
%.c.o: %.c
$(CC) -c $< -o $@ -std=c99 -ffreestanding -O2 -Wall -Wextra
%.s.o: %.s
$(AS) $< -o $@

View file

View file