mirror of
https://github.com/tailix/kernel.git
synced 2025-02-17 15:45:37 -05:00
Move to directory "/src"
This commit is contained in:
parent
cce723d416
commit
4fe4df2ee1
6 changed files with 24 additions and 19 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -1,3 +1,3 @@
|
||||||
*.o
|
*.o
|
||||||
|
|
||||||
/kernel
|
/src/kernel
|
||||||
|
|
21
Makefile
21
Makefile
|
@ -1,20 +1,5 @@
|
||||||
CCPREFIX = i686-elf-
|
all:
|
||||||
|
make all -C src
|
||||||
AS = $(CCPREFIX)as
|
|
||||||
CC = $(CCPREFIX)gcc
|
|
||||||
|
|
||||||
OBJS = boot.s.o main.c.o
|
|
||||||
|
|
||||||
all: kernel
|
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm kernel $(OBJS)
|
make clean -C src
|
||||||
|
|
||||||
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 $@
|
|
||||||
|
|
20
src/Makefile
Normal file
20
src/Makefile
Normal 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 $@
|
Loading…
Add table
Reference in a new issue