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

Move "src" to "arch/x86"

This commit is contained in:
Braiden Vasco 2017-11-09 15:46:35 +00:00
parent b1ae881e99
commit 2222669b6f
8 changed files with 10 additions and 29 deletions

View file

@ -8,11 +8,9 @@ export CC = $(CCPREFIX)gcc
export INCLUDE = $(shell pwd)/include
export KERNEL = $(shell pwd)/rootfs/boot/kernelmq.multiboot2
export LIBSRC = $(shell pwd)/src/libsrc.a
export CFLAGS = -std=gnu99 -ffreestanding -nostdinc -fno-builtin -fno-stack-protector -Wall -Wextra -I $(INCLUDE)
SUBDIRS = arch src
SUBDIRS = arch
IMAGE = $(shell pwd)/image.iso
@ -27,21 +25,11 @@ clean: $(addprefix clean-, $(SUBDIRS))
rm -f $(IMAGE)
rm -f $(KERNEL)
#######
# src #
#######
all-src:
make all -C src
clean-src:
make clean -C src
########
# arch #
########
all-arch: all-src
all-arch:
make all -C arch
clean-arch:

View file

@ -8,6 +8,13 @@ OBJS += pfa.c.o
OBJS += paging.c.o paging.asm.cpp.o
OBJS += pagedir.c.o
# Architecture-independent
OBJS += info.c.o
OBJS += memset.c.o
OBJS += strlen.c.o
OBJS += itoa.c.o
OBJS += strncpy.c.o
# Built-in drivers
OBJS += console.c.o
OBJS += pic.c.o
@ -34,7 +41,7 @@ clean:
rm -f $(OBJS)
$(KERNEL): $(OBJS)
$(CC) -T linker.ld -o $(KERNEL) -ffreestanding -nostdlib -lgcc $(OBJS) $(LIBSRC)
$(CC) -T linker.ld -o $(KERNEL) -ffreestanding -nostdlib -lgcc $(OBJS)
%.c.o: %.c
$(CC) -c $< -o $@ $(CFLAGS)

View file

@ -1,14 +0,0 @@
OUTPUT = libsrc.a
OBJS = info.c.o memset.c.o strlen.c.o itoa.c.o strncpy.c.o
all: $(OUTPUT)
clean:
rm -f $(OUTPUT) $(OBJS)
$(OUTPUT): $(OBJS)
$(AR) -rcs $@ $(OBJS)
%.c.o: %.c
$(CC) -c $< -o $@ $(CFLAGS)