use seperate folders

This commit is contained in:
a1ive 2025-02-16 19:52:45 +09:00
parent 17c0e30043
commit d7f62043ac
No known key found for this signature in database
GPG Key ID: DA9BACF4F462B55D
35 changed files with 86 additions and 13 deletions

View File

@ -1,17 +1,12 @@
# Versioning information # Versioning information
# #
VERSION := v3.0.3 VERSION := v3.0.4
WIMBOOT_VERSION := v2.8.0 WIMBOOT_VERSION := v2.8.0
SBAT_GENERATION := 1 SBAT_GENERATION := 1
# Abstract target-independent objects # Abstract target-independent objects
# #
OBJECTS := prefix.o startup.o callback.o main.o vsprintf.o string.o peloader.o OBJECTS := prefix.o
OBJECTS += int13.o vdisk.o cpio.o stdio.o die.o efi.o efimain.o
OBJECTS += efifile.o efiboot.o efiblock.o cmdline.o
OBJECTS += cookie.o paging.o memmap.o
OBJECTS += reg.o charset.o bcd.o fsuuid.o gpt.o msdos.o
OBJECTS += biosdisk.o efidisk.o payload.o
# Target-dependent objects # Target-dependent objects
# #
@ -20,6 +15,11 @@ OBJECTS_x86_64 := $(patsubst %.o,%.x86_64.o,$(OBJECTS))
OBJECTS_i386_x86_64 := $(patsubst %.o,%.i386.x86_64.o,$(OBJECTS)) OBJECTS_i386_x86_64 := $(patsubst %.o,%.i386.x86_64.o,$(OBJECTS))
OBJECTS_arm64 := $(patsubst %.o,%.arm64.o,$(OBJECTS)) OBJECTS_arm64 := $(patsubst %.o,%.arm64.o,$(OBJECTS))
include posix/build.mk
include libnt/build.mk
include disk/build.mk
include kern/build.mk
# Header files # Header files
# #
HEADERS := $(wildcard *.h) HEADERS := $(wildcard *.h)
@ -311,6 +311,7 @@ regview : utils/regview.c
# Cleanup # Cleanup
clean : clean :
$(RM) -f $(RM_FILES)
$(RM) -f *.s *.o *.a *.elf *.map $(RM) -f *.s *.o *.a *.elf *.map
$(RM) -f elf2efi32 elf2efi64 $(RM) -f elf2efi32 elf2efi64
$(RM) -f regview regview.exe $(RM) -f regview regview.exe

16
disk/build.mk Normal file
View File

@ -0,0 +1,16 @@
# Objects
OBJ_DISK := disk/biosdisk.o
OBJ_DISK += disk/efidisk.o
OBJ_DISK += disk/fsuuid.o
OBJ_DISK += disk/gpt.o
OBJ_DISK += disk/msdos.o
OBJECTS += $(OBJ_DISK)
OBJECTS_i386 += $(patsubst %.o,%.i386.o,$(OBJ_DISK))
OBJECTS_x86_64 += $(patsubst %.o,%.x86_64.o,$(OBJ_DISK))
OBJECTS_i386_x86_64 += $(patsubst %.o,%.i386.x86_64.o,$(OBJ_DISK))
OBJECTS_arm64 += $(patsubst %.o,%.arm64.o,$(OBJ_DISK))
RM_FILES += disk/*.s disk/*.o

View File

View File

@ -1,5 +1,5 @@
#ifndef _MEMMAP_H #ifndef _E820_H
#define _MEMMAP_H #define _E820_H
/* /*
* Copyright (C) 2021 Michael Brown <mbrown@fensystems.co.uk>. * Copyright (C) 2021 Michael Brown <mbrown@fensystems.co.uk>.
@ -56,4 +56,4 @@ struct e820_entry
extern struct e820_entry *memmap_next (struct e820_entry *prev); extern struct e820_entry *memmap_next (struct e820_entry *prev);
#endif /* _MEMMAP_H */ #endif /* _E820_H */

26
kern/build.mk Normal file
View File

@ -0,0 +1,26 @@
# Objects
OBJ_KERN := kern/callback.o
OBJ_KERN += kern/cmdline.o
OBJ_KERN += kern/cookie.o
OBJ_KERN += kern/die.o
OBJ_KERN += kern/e820.o
OBJ_KERN += kern/efi.o
OBJ_KERN += kern/efiblock.o
OBJ_KERN += kern/efiboot.o
OBJ_KERN += kern/efifile.o
OBJ_KERN += kern/efimain.o
OBJ_KERN += kern/int13.o
OBJ_KERN += kern/main.o
OBJ_KERN += kern/paging.o
OBJ_KERN += kern/payload.o
OBJ_KERN += kern/startup.o
OBJECTS += $(OBJ_KERN)
OBJECTS_i386 += $(patsubst %.o,%.i386.o,$(OBJ_KERN))
OBJECTS_x86_64 += $(patsubst %.o,%.x86_64.o,$(OBJ_KERN))
OBJECTS_i386_x86_64 += $(patsubst %.o,%.i386.x86_64.o,$(OBJ_KERN))
OBJECTS_arm64 += $(patsubst %.o,%.arm64.o,$(OBJ_KERN))
RM_FILES += kern/*.s kern/*.o

View File

View File

@ -28,7 +28,7 @@
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#include "ntloader.h" #include "ntloader.h"
#include "memmap.h" #include "e820.h"
/** Buffer for INT 15,e820 calls */ /** Buffer for INT 15,e820 calls */
static struct e820_entry e820_buf __attribute__ ((section (".bss16"))); static struct e820_entry e820_buf __attribute__ ((section (".bss16")));

View File

View File

@ -29,7 +29,7 @@
#include "payload.h" #include "payload.h"
#include "cmdline.h" #include "cmdline.h"
#include "paging.h" #include "paging.h"
#include "memmap.h" #include "e820.h"
#include "biosdisk.h" #include "biosdisk.h"
/** Start of our image (defined by linker) */ /** Start of our image (defined by linker) */

View File

@ -29,7 +29,7 @@
#include <string.h> #include <string.h>
#include <assert.h> #include <assert.h>
#include "ntloader.h" #include "ntloader.h"
#include "memmap.h" #include "e820.h"
#include "paging.h" #include "paging.h"
#if defined(__i386__) || defined(__x86_64__) #if defined(__i386__) || defined(__x86_64__)

View File

17
libnt/build.mk Normal file
View File

@ -0,0 +1,17 @@
# Objects
OBJ_LIBNT := libnt/bcd.o
OBJ_LIBNT += libnt/charset.o
OBJ_LIBNT += libnt/cpio.o
OBJ_LIBNT += libnt/peloader.o
OBJ_LIBNT += libnt/reg.o
OBJ_LIBNT += libnt/vdisk.o
OBJECTS += $(OBJ_LIBNT)
OBJECTS_i386 += $(patsubst %.o,%.i386.o,$(OBJ_LIBNT))
OBJECTS_x86_64 += $(patsubst %.o,%.x86_64.o,$(OBJ_LIBNT))
OBJECTS_i386_x86_64 += $(patsubst %.o,%.i386.x86_64.o,$(OBJ_LIBNT))
OBJECTS_arm64 += $(patsubst %.o,%.arm64.o,$(OBJ_LIBNT))
RM_FILES += libnt/*.s libnt/*.o

View File

13
posix/build.mk Normal file
View File

@ -0,0 +1,13 @@
# Objects
OBJ_POSIX := posix/stdio.o
OBJ_POSIX += posix/string.o
OBJ_POSIX += posix/vsprintf.o
OBJECTS += $(OBJ_POSIX)
OBJECTS_i386 += $(patsubst %.o,%.i386.o,$(OBJ_POSIX))
OBJECTS_x86_64 += $(patsubst %.o,%.x86_64.o,$(OBJ_POSIX))
OBJECTS_i386_x86_64 += $(patsubst %.o,%.i386.x86_64.o,$(OBJ_POSIX))
OBJECTS_arm64 += $(patsubst %.o,%.arm64.o,$(OBJ_POSIX))
RM_FILES += posix/*.s posix/*.o