mirror of
https://github.com/DragonOS-Community/DragonOS.git
synced 2025-06-10 20:36:48 +00:00
将common文件夹下的c文件移动到lib文件夹下
This commit is contained in:
parent
be9ac3d58b
commit
1872d9bd4a
@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
CFLAGS += -I .
|
CFLAGS += -I .
|
||||||
|
|
||||||
kernel_common_subdirs:=libELF math
|
kernel_common_subdirs:= math
|
||||||
|
|
||||||
ECHO:
|
ECHO:
|
||||||
@echo "$@"
|
@echo "$@"
|
||||||
@ -10,38 +10,5 @@ $(kernel_common_subdirs): ECHO
|
|||||||
|
|
||||||
$(MAKE) -C $@ all CFLAGS="$(CFLAGS)" ASFLAGS="$(ASFLAGS)" PIC="$(PIC)"
|
$(MAKE) -C $@ all CFLAGS="$(CFLAGS)" ASFLAGS="$(ASFLAGS)" PIC="$(PIC)"
|
||||||
|
|
||||||
all: glib.o printk.o cpu.o bitree.o kfifo.o wait_queue.o mutex.o wait.o unistd.o string.o semaphore.o $(kernel_common_subdirs)
|
all: $(kernel_common_subdirs)
|
||||||
|
|
||||||
|
|
||||||
glib.o: glib.c
|
|
||||||
gcc $(CFLAGS) -c glib.c -o glib.o
|
|
||||||
|
|
||||||
printk.o: printk.c
|
|
||||||
gcc $(CFLAGS) -c printk.c -o printk.o
|
|
||||||
|
|
||||||
cpu.o: cpu.c
|
|
||||||
gcc $(CFLAGS) -c cpu.c -o cpu.o
|
|
||||||
|
|
||||||
bitree.o: bitree.c
|
|
||||||
gcc $(CFLAGS) -c bitree.c -o bitree.o
|
|
||||||
|
|
||||||
kfifo.o: kfifo.c
|
|
||||||
gcc $(CFLAGS) -c kfifo.c -o kfifo.o
|
|
||||||
|
|
||||||
wait_queue.o: wait_queue.c
|
|
||||||
gcc $(CFLAGS) -c wait_queue.c -o wait_queue.o
|
|
||||||
|
|
||||||
mutex.o: mutex.c
|
|
||||||
gcc $(CFLAGS) -c mutex.c -o mutex.o
|
|
||||||
|
|
||||||
wait.o: sys/wait.c
|
|
||||||
gcc $(CFLAGS) -c sys/wait.c -o sys/wait.o
|
|
||||||
|
|
||||||
unistd.o: unistd.c
|
|
||||||
gcc $(CFLAGS) -c unistd.c -o unistd.o
|
|
||||||
|
|
||||||
string.o: string.c
|
|
||||||
gcc $(CFLAGS) -c string.c -o string.o
|
|
||||||
|
|
||||||
semaphore.o: semaphore.c
|
|
||||||
gcc $(CFLAGS) -c semaphore.c -o semaphore.o
|
|
@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
CFLAGS += -I .
|
CFLAGS += -I .
|
||||||
|
|
||||||
kernel_lib_subdirs:= libUI
|
kernel_lib_subdirs:= libUI sys libELF
|
||||||
|
|
||||||
kernel_lib_objs:= $(shell find ./*.c)
|
kernel_lib_objs:= $(shell find ./*.c)
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include "bitree.h"
|
#include <common/bitree.h>
|
||||||
#include <mm/slab.h>
|
#include <mm/slab.h>
|
||||||
#include <common/errno.h>
|
#include <common/errno.h>
|
||||||
#include <common/kfifo.h>
|
#include <common/kfifo.h>
|
@ -1,6 +1,6 @@
|
|||||||
#include "cpu.h"
|
#include <common/cpu.h>
|
||||||
#include "kprint.h"
|
#include <common/kprint.h>
|
||||||
#include "printk.h"
|
#include <common/printk.h>
|
||||||
// #pragma GCC optimize("O0")
|
// #pragma GCC optimize("O0")
|
||||||
// cpu支持的最大cpuid指令的基础主功能号
|
// cpu支持的最大cpuid指令的基础主功能号
|
||||||
uint Cpu_cpuid_max_Basic_mop;
|
uint Cpu_cpuid_max_Basic_mop;
|
@ -1,5 +1,5 @@
|
|||||||
#include "glib.h"
|
#include <common/glib.h>
|
||||||
#include "string.h"
|
#include <common/string.h>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief 这个函数让蜂鸣器发声,目前仅用于真机调试。未来将移除,请勿依赖此函数。
|
* @brief 这个函数让蜂鸣器发声,目前仅用于真机调试。未来将移除,请勿依赖此函数。
|
@ -1,14 +1,14 @@
|
|||||||
//
|
//
|
||||||
// Created by longjin on 2022/1/22.
|
// Created by longjin on 2022/1/22.
|
||||||
//
|
//
|
||||||
#include "printk.h"
|
#include <common/printk.h>
|
||||||
#include "kprint.h"
|
#include <common/kprint.h>
|
||||||
|
|
||||||
#include <mm/mm.h>
|
#include <mm/mm.h>
|
||||||
#include <common/spinlock.h>
|
#include <common/spinlock.h>
|
||||||
#include <lib/libUI/textui.h>
|
#include <lib/libUI/textui.h>
|
||||||
|
|
||||||
#include "math.h"
|
#include <common/math.h>
|
||||||
#include <common/string.h>
|
#include <common/string.h>
|
||||||
|
|
||||||
static spinlock_t __printk_lock = {1};
|
static spinlock_t __printk_lock = {1};
|
@ -1,4 +1,4 @@
|
|||||||
#include "semaphore.h"
|
#include <common/semaphore.h>
|
||||||
#include <sched/sched.h>
|
#include <sched/sched.h>
|
||||||
#include <process/process.h>
|
#include <process/process.h>
|
||||||
|
|
@ -1,5 +1,5 @@
|
|||||||
#include "string.h"
|
#include <common/string.h>
|
||||||
#include "glib.h"
|
#include <common/glib.h>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief 拷贝整个字符串
|
* @brief 拷贝整个字符串
|
17
kernel/lib/sys/Makefile
Normal file
17
kernel/lib/sys/Makefile
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
|
||||||
|
CFLAGS += -I .
|
||||||
|
|
||||||
|
kernel_lib_sys_objs:= $(shell find ./*.c)
|
||||||
|
|
||||||
|
ECHO:
|
||||||
|
@echo "$@"
|
||||||
|
|
||||||
|
$(kernel_lib_sys_objs): ECHO
|
||||||
|
$(MAKE) -C $@ all CFLAGS="$(CFLAGS)" ASFLAGS="$(ASFLAGS)" PIC="$(PIC)"
|
||||||
|
|
||||||
|
$(kernel_lib_sys_objs): ECHO
|
||||||
|
gcc $(CFLAGS) -c $@ -o $@.o
|
||||||
|
|
||||||
|
all: $(kernel_lib_sys_objs) $(kernel_lib_sys_objs)
|
||||||
|
@echo $(kernel_lib_sys_objs)
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
#include "wait_queue.h"
|
#include <common/wait_queue.h>
|
||||||
#include <sched/sched.h>
|
#include <sched/sched.h>
|
||||||
#include <process/process.h>
|
#include <process/process.h>
|
||||||
#include <mm/slab.h>
|
#include <mm/slab.h>
|
@ -5,7 +5,7 @@
|
|||||||
#include <common/stdio.h>
|
#include <common/stdio.h>
|
||||||
#include <common/string.h>
|
#include <common/string.h>
|
||||||
#include <common/compiler.h>
|
#include <common/compiler.h>
|
||||||
#include <common/libELF/elf.h>
|
#include <common/elf.h>
|
||||||
#include <common/time.h>
|
#include <common/time.h>
|
||||||
#include <common/sys/wait.h>
|
#include <common/sys/wait.h>
|
||||||
#include <driver/video/video.h>
|
#include <driver/video/video.h>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user