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:
parent
b1ae881e99
commit
2222669b6f
8 changed files with 10 additions and 29 deletions
16
Makefile
16
Makefile
|
@ -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:
|
||||
|
|
|
@ -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)
|
||||
|
|
14
src/Makefile
14
src/Makefile
|
@ -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)
|
Loading…
Add table
Reference in a new issue