new: 改变filesystem的编译文件结构

This commit is contained in:
fslongjin 2022-09-05 17:06:42 +08:00
parent 9f98a07345
commit 0fcba99282
4 changed files with 62 additions and 11 deletions

View File

@ -1,20 +1,20 @@
CFLAGS += -I .
all: fat32.o MBR.o VFS.o fat_ent.o
kernel_fs_objs:= $(shell find ./*.c)
kernel_fs_subdirs:= devfs VFS fat32
ECHO:
@echo "$@"
fat32.o: fat32/fat32.c
gcc $(CFLAGS) -c fat32/fat32.c -o fat32/fat32.o
$(kernel_fs_objs): ECHO
gcc $(CFLAGS) -c $@ -o $@.o
MBR.o: MBR.c
gcc $(CFLAGS) -c MBR.c -o MBR.o
$(kernel_fs_subdirs): ECHO
$(MAKE) -C $@ all CFLAGS="$(CFLAGS)" ASFLAGS="$(ASFLAGS)" PIC="$(PIC)"
VFS.o: VFS/VFS.c
gcc $(CFLAGS) -c VFS/VFS.c -o VFS/VFS.o
fat_ent.o: fat32/fat_ent.c
gcc $(CFLAGS) -c fat32/fat_ent.c -o fat32/fat_ent.o
all: $(kernel_fs_objs) $(kernel_fs_subdirs)
clean:
echo "Done."

View File

@ -0,0 +1,17 @@
CFLAGS += -I .
kernel_fs_vfs_objs:= $(shell find ./*.c)
ECHO:
@echo "$@"
$(kernel_fs_vfs_objs): ECHO
gcc $(CFLAGS) -c $@ -o $@.o
all: $(kernel_fs_vfs_objs)

View File

@ -0,0 +1,17 @@
CFLAGS += -I .
kernel_fs_devfs_objs:= $(shell find ./*.c)
ECHO:
@echo "$@"
$(kernel_fs_devfs_objs): ECHO
gcc $(CFLAGS) -c $@ -o $@.o
all: $(kernel_fs_devfs_objs)

View File

@ -0,0 +1,17 @@
CFLAGS += -I .
kernel_fs_fat32_objs:= $(shell find ./*.c)
ECHO:
@echo "$@"
$(kernel_fs_fat32_objs): ECHO
gcc $(CFLAGS) -c $@ -o $@.o
all: $(kernel_fs_fat32_objs)