mirror of
https://github.com/limine-bootloader/limine
synced 2024-12-11 17:24:08 +03:00
asm: Reorganise assembly code to avoid symlink use
This commit is contained in:
parent
4925f7e3dd
commit
ffc461d3b9
@ -167,16 +167,22 @@ endif
|
||||
|
||||
C_FILES := $(shell find -L ./ -type f -name '*.c' | sort)
|
||||
ifeq ($(TARGET), bios)
|
||||
ASM_FILES := $(shell find -L ./ -type f -name '*.asm' | sort)
|
||||
OBJ := $(addprefix $(BUILDDIR)/, $(ASM_FILES:.asm=.o) $(C_FILES:.c=.o))
|
||||
ASM32_FILES := $(shell find -L ./ -type f -name '*.asm32' | sort)
|
||||
ASMB_FILES := $(shell find -L ./ -type f -name '*.asmb' | sort)
|
||||
|
||||
OBJ := $(addprefix $(BUILDDIR)/, $(ASM32_FILES:.asm32=.o) $(ASMB_FILES:.asmb=.o) $(C_FILES:.c=.o))
|
||||
endif
|
||||
ifeq ($(TARGET), uefi)
|
||||
ASM_FILES := $(shell find -L ./ -type f -name '*.asm64' | sort)
|
||||
OBJ := $(addprefix $(BUILDDIR)/, $(ASM_FILES:.asm64=.o) $(C_FILES:.c=.o))
|
||||
ASM64_FILES := $(shell find -L ./ -type f -name '*.asm64' | sort)
|
||||
ASM64U_FILES := $(shell find -L ./ -type f -name '*.asm64u' | sort)
|
||||
|
||||
OBJ := $(addprefix $(BUILDDIR)/, $(ASM64_FILES:.asm64=.o) $(ASM64U_FILES:.asm64u=.o) $(C_FILES:.c=.o))
|
||||
endif
|
||||
ifeq ($(TARGET), uefi32)
|
||||
ASM_FILES := $(shell find -L ./ -type f -name '*.asm32' | sort)
|
||||
OBJ := $(addprefix $(BUILDDIR)/, $(ASM_FILES:.asm32=.o) $(C_FILES:.c=.o))
|
||||
ASM32_FILES := $(shell find -L ./ -type f -name '*.asm32' | sort)
|
||||
ASM32U_FILES := $(shell find -L ./ -type f -name '*.asm32u' | sort)
|
||||
|
||||
OBJ := $(addprefix $(BUILDDIR)/, $(ASM32_FILES:.asm32=.o) $(ASM32U_FILES:.asm32u=.o) $(C_FILES:.c=.o))
|
||||
endif
|
||||
HEADER_DEPS := $(addprefix $(BUILDDIR)/, $(C_FILES:.c=.d))
|
||||
|
||||
@ -336,18 +342,27 @@ $(BUILDDIR)/%.32.o: %.32.c $(BUILDDIR)/gnu-efi
|
||||
endif
|
||||
|
||||
ifeq ($(TARGET), bios)
|
||||
$(BUILDDIR)/%.o: %.asm
|
||||
$(BUILDDIR)/%.o: %.asm32
|
||||
nasm $< -F dwarf -g -Werror -f elf32 -o $@
|
||||
|
||||
$(BUILDDIR)/%.o: %.asmb
|
||||
nasm $< -F dwarf -g -Werror -f elf32 -o $@
|
||||
endif
|
||||
|
||||
ifeq ($(TARGET), uefi)
|
||||
$(BUILDDIR)/%.o: %.asm64
|
||||
nasm $< -F dwarf -g -Werror -f elf64 -o $@
|
||||
|
||||
$(BUILDDIR)/%.o: %.asm64u
|
||||
nasm $< -F dwarf -g -Werror -f elf64 -o $@
|
||||
endif
|
||||
|
||||
ifeq ($(TARGET), uefi32)
|
||||
$(BUILDDIR)/%.o: %.asm32
|
||||
nasm $< -F dwarf -g -Werror -f elf32 -o $@
|
||||
|
||||
$(BUILDDIR)/%.o: %.asm32u
|
||||
nasm $< -F dwarf -g -Werror -f elf32 -o $@
|
||||
endif
|
||||
|
||||
clean:
|
||||
|
@ -1 +0,0 @@
|
||||
libgcc.s2.asm
|
@ -1,8 +0,0 @@
|
||||
extern lapic_eoi
|
||||
|
||||
global dummy_isr
|
||||
dummy_isr:
|
||||
pusha
|
||||
call lapic_eoi
|
||||
popa
|
||||
iretd
|
@ -1 +0,0 @@
|
||||
dummy_isr.asm
|
8
stage23/sys/dummy_isr.asm32
Normal file
8
stage23/sys/dummy_isr.asm32
Normal file
@ -0,0 +1,8 @@
|
||||
extern lapic_eoi
|
||||
|
||||
global dummy_isr
|
||||
dummy_isr:
|
||||
pusha
|
||||
call lapic_eoi
|
||||
popa
|
||||
iretd
|
Loading…
Reference in New Issue
Block a user