2023-02-19 12:07:21 +03:00
|
|
|
override MAKEFLAGS += -rR
|
|
|
|
|
2023-03-14 19:20:46 +03:00
|
|
|
include $(TOOLCHAIN_FILE)
|
2023-03-16 05:38:53 +03:00
|
|
|
export CC_FOR_TARGET
|
|
|
|
export LD_FOR_TARGET
|
|
|
|
export OBJDUMP_FOR_TARGET
|
|
|
|
export OBJCOPY_FOR_TARGET
|
|
|
|
export READELF_FOR_TARGET
|
2022-06-15 08:16:41 +03:00
|
|
|
|
2022-01-02 14:45:15 +03:00
|
|
|
TARGET ?=
|
|
|
|
BUILDDIR ?=
|
2021-03-08 05:05:39 +03:00
|
|
|
|
2022-01-22 05:10:25 +03:00
|
|
|
override SRCDIR := $(shell pwd -P)
|
2021-11-28 21:00:49 +03:00
|
|
|
|
2021-12-08 19:41:19 +03:00
|
|
|
override SPACE := $(subst ,, )
|
2021-11-28 21:00:49 +03:00
|
|
|
|
2021-11-28 21:14:34 +03:00
|
|
|
MKESCAPE = $(subst $(SPACE),\ ,$(1))
|
2021-11-28 21:00:49 +03:00
|
|
|
SHESCAPE = $(subst ','\'',$(1))
|
|
|
|
OBJESCAPE = $(subst .a ,.a' ',$(subst .o ,.o' ',$(call SHESCAPE,$(1))))
|
|
|
|
|
2022-08-15 18:41:04 +03:00
|
|
|
ifeq ($(call MKESCAPE,$(BUILDDIR)),)
|
|
|
|
$(error BUILDDIR not specified)
|
2021-03-08 05:05:39 +03:00
|
|
|
endif
|
2021-03-02 12:23:43 +03:00
|
|
|
|
2022-08-15 18:41:04 +03:00
|
|
|
ifeq ($(TARGET),bios)
|
2022-08-25 23:07:50 +03:00
|
|
|
override OBJCOPY2ELF_FLAGS := -B i386 -O elf32-i386
|
2022-08-15 18:41:04 +03:00
|
|
|
else ifeq ($(TARGET),uefi-x86-64)
|
2022-08-25 23:07:50 +03:00
|
|
|
override OBJCOPY2ELF_FLAGS := -B i386 -O elf64-x86-64
|
2022-08-15 18:41:04 +03:00
|
|
|
else ifeq ($(TARGET),uefi-ia32)
|
2022-08-25 23:07:50 +03:00
|
|
|
override OBJCOPY2ELF_FLAGS := -B i386 -O elf32-i386
|
2022-08-18 18:32:54 +03:00
|
|
|
else ifeq ($(TARGET),uefi-aarch64)
|
2022-08-25 23:07:50 +03:00
|
|
|
override OBJCOPY2ELF_FLAGS := -B aarch64 -O elf64-littleaarch64
|
2023-06-04 02:36:06 +03:00
|
|
|
else ifeq ($(TARGET),uefi-riscv64)
|
|
|
|
override OBJCOPY2ELF_FLAGS := -B riscv64 -O elf64-littleriscv
|
2021-03-02 12:23:43 +03:00
|
|
|
else
|
2022-08-15 18:41:04 +03:00
|
|
|
$(error Invalid target)
|
2021-03-02 12:23:43 +03:00
|
|
|
endif
|
|
|
|
|
2022-02-01 10:04:55 +03:00
|
|
|
COM_OUTPUT ?= false
|
|
|
|
E9_OUTPUT ?= false
|
2021-02-26 03:30:27 +03:00
|
|
|
|
2022-08-15 17:37:31 +03:00
|
|
|
override S2CFLAGS := -Os
|
2020-09-13 15:36:18 +03:00
|
|
|
|
2023-03-16 04:28:50 +03:00
|
|
|
override BASE_CFLAGS := $(CFLAGS_FOR_TARGET)
|
2022-09-02 12:01:13 +03:00
|
|
|
|
2023-03-16 04:28:50 +03:00
|
|
|
override CFLAGS_FOR_TARGET += \
|
2022-08-15 18:41:04 +03:00
|
|
|
-g \
|
2023-04-11 18:15:41 +03:00
|
|
|
-Wall \
|
|
|
|
-Wextra \
|
|
|
|
-Wshadow \
|
|
|
|
-Wvla \
|
|
|
|
$(WERROR_FLAG) \
|
2022-08-15 18:41:04 +03:00
|
|
|
-std=gnu11 \
|
2022-08-29 00:24:47 +03:00
|
|
|
-nostdinc \
|
2022-08-15 18:41:04 +03:00
|
|
|
-ffreestanding \
|
|
|
|
-fno-stack-protector \
|
|
|
|
-fno-stack-check \
|
|
|
|
-fno-omit-frame-pointer \
|
|
|
|
-fno-strict-aliasing \
|
2023-04-11 18:15:41 +03:00
|
|
|
-fno-lto
|
2023-02-25 03:38:26 +03:00
|
|
|
|
2023-03-16 04:28:50 +03:00
|
|
|
override CPPFLAGS_FOR_TARGET := \
|
2022-08-15 18:41:04 +03:00
|
|
|
-I../freestanding-headers \
|
|
|
|
-I'$(call SHESCAPE,$(BUILDDIR))/..' \
|
|
|
|
-I. \
|
2023-03-16 04:28:50 +03:00
|
|
|
$(CPPFLAGS_FOR_TARGET) \
|
2023-02-25 03:38:26 +03:00
|
|
|
-DCOM_OUTPUT=$(COM_OUTPUT) \
|
|
|
|
-DE9_OUTPUT=$(E9_OUTPUT) \
|
2023-03-23 03:02:58 +03:00
|
|
|
-MMD \
|
|
|
|
-MP
|
2022-08-15 18:41:04 +03:00
|
|
|
|
2023-06-10 20:23:50 +03:00
|
|
|
$(call MKESCAPE,$(BUILDDIR))/./flanterm/backends/fb.o: override CPPFLAGS_FOR_TARGET += -DFLANTERM_FB_DISABLE_BUMP_ALLOC
|
|
|
|
|
2022-08-15 18:41:04 +03:00
|
|
|
ifeq ($(TARGET),bios)
|
2023-03-16 04:28:50 +03:00
|
|
|
override CFLAGS_FOR_TARGET += \
|
2023-04-11 16:57:02 +03:00
|
|
|
-fno-PIE \
|
|
|
|
-fno-PIC \
|
2022-08-15 18:41:04 +03:00
|
|
|
-m32 \
|
|
|
|
-march=i686 \
|
|
|
|
-mabi=sysv \
|
2023-02-25 03:38:26 +03:00
|
|
|
-mno-80387
|
2023-03-16 04:28:50 +03:00
|
|
|
override CPPFLAGS_FOR_TARGET := \
|
|
|
|
$(CPPFLAGS_FOR_TARGET) \
|
2022-09-02 03:29:12 +03:00
|
|
|
-DBIOS
|
2022-08-18 18:32:54 +03:00
|
|
|
endif
|
|
|
|
|
2022-08-15 18:41:04 +03:00
|
|
|
ifeq ($(TARGET),uefi-x86-64)
|
2023-03-16 04:28:50 +03:00
|
|
|
override CFLAGS_FOR_TARGET += \
|
2023-04-11 16:57:02 +03:00
|
|
|
-fPIE \
|
2023-05-27 17:55:49 +03:00
|
|
|
-fshort-wchar \
|
2022-08-15 18:41:04 +03:00
|
|
|
-m64 \
|
|
|
|
-march=x86-64 \
|
|
|
|
-mabi=sysv \
|
2022-08-29 00:24:47 +03:00
|
|
|
-mno-80387 \
|
|
|
|
-mno-mmx \
|
|
|
|
-mno-sse \
|
|
|
|
-mno-sse2 \
|
2023-02-25 03:38:26 +03:00
|
|
|
-mno-red-zone
|
2023-03-16 04:28:50 +03:00
|
|
|
override CPPFLAGS_FOR_TARGET := \
|
2022-08-15 18:41:04 +03:00
|
|
|
-I'$(call SHESCAPE,$(BUILDDIR))/limine-efi/inc' \
|
2023-02-25 03:38:26 +03:00
|
|
|
-I'$(call SHESCAPE,$(BUILDDIR))/limine-efi/inc/x86_64' \
|
2023-03-16 04:28:50 +03:00
|
|
|
$(CPPFLAGS_FOR_TARGET) \
|
2023-05-29 00:53:34 +03:00
|
|
|
-DUEFI
|
2021-03-02 12:23:43 +03:00
|
|
|
endif
|
|
|
|
|
2022-08-15 18:41:04 +03:00
|
|
|
ifeq ($(TARGET),uefi-ia32)
|
2023-03-16 04:28:50 +03:00
|
|
|
override CFLAGS_FOR_TARGET += \
|
2023-04-11 16:57:02 +03:00
|
|
|
-fPIE \
|
2023-05-27 17:55:49 +03:00
|
|
|
-fshort-wchar \
|
2022-08-15 18:41:04 +03:00
|
|
|
-m32 \
|
|
|
|
-march=i686 \
|
|
|
|
-mabi=sysv \
|
2023-02-25 03:38:26 +03:00
|
|
|
-mno-80387
|
2023-03-16 04:28:50 +03:00
|
|
|
override CPPFLAGS_FOR_TARGET := \
|
2022-08-15 18:41:04 +03:00
|
|
|
-I'$(call SHESCAPE,$(BUILDDIR))/limine-efi/inc' \
|
2023-02-25 03:38:26 +03:00
|
|
|
-I'$(call SHESCAPE,$(BUILDDIR))/limine-efi/inc/ia32' \
|
2023-03-16 04:28:50 +03:00
|
|
|
$(CPPFLAGS_FOR_TARGET) \
|
2023-02-25 03:38:26 +03:00
|
|
|
-DUEFI
|
2021-07-20 14:35:43 +03:00
|
|
|
endif
|
|
|
|
|
2022-08-18 18:32:54 +03:00
|
|
|
ifeq ($(TARGET),uefi-aarch64)
|
2023-03-16 04:28:50 +03:00
|
|
|
override CFLAGS_FOR_TARGET += \
|
2023-04-11 16:57:02 +03:00
|
|
|
-fPIE \
|
2023-05-27 17:55:49 +03:00
|
|
|
-fshort-wchar \
|
2023-02-25 03:38:26 +03:00
|
|
|
-mgeneral-regs-only
|
2023-03-16 04:28:50 +03:00
|
|
|
override CPPFLAGS_FOR_TARGET := \
|
2022-08-18 18:32:54 +03:00
|
|
|
-I'$(call SHESCAPE,$(BUILDDIR))/limine-efi/inc' \
|
2023-02-25 03:38:26 +03:00
|
|
|
-I'$(call SHESCAPE,$(BUILDDIR))/limine-efi/inc/aarch64' \
|
2023-03-16 04:28:50 +03:00
|
|
|
$(CPPFLAGS_FOR_TARGET) \
|
2023-02-25 03:38:26 +03:00
|
|
|
-DUEFI
|
2022-08-18 18:32:54 +03:00
|
|
|
endif
|
|
|
|
|
2023-06-04 02:36:06 +03:00
|
|
|
ifeq ($(TARGET),uefi-riscv64)
|
|
|
|
ifeq ($(CC_FOR_TARGET_IS_CLANG),yes)
|
|
|
|
override RISCV_CFLAGS += -march=rv64imac -mabi=lp64
|
|
|
|
else
|
|
|
|
override RISCV_CFLAGS += -march=rv64imac_zicsr_zifencei -mabi=lp64
|
|
|
|
endif
|
|
|
|
|
|
|
|
override CFLAGS_FOR_TARGET += \
|
|
|
|
-fPIE \
|
|
|
|
-fshort-wchar \
|
|
|
|
$(RISCV_CFLAGS)
|
|
|
|
|
|
|
|
override CPPFLAGS_FOR_TARGET := \
|
|
|
|
-I'$(call SHESCAPE,$(BUILDDIR))/limine-efi/inc' \
|
|
|
|
-I'$(call SHESCAPE,$(BUILDDIR))/limine-efi/inc/riscv64' \
|
|
|
|
$(CPPFLAGS_FOR_TARGET) \
|
|
|
|
-DUEFI \
|
|
|
|
-D__riscv64
|
|
|
|
endif
|
|
|
|
|
2023-03-16 04:28:50 +03:00
|
|
|
override LDFLAGS_FOR_TARGET += \
|
2022-08-15 18:41:04 +03:00
|
|
|
-nostdlib \
|
|
|
|
-z max-page-size=0x1000
|
|
|
|
|
|
|
|
ifeq ($(TARGET),bios)
|
2023-03-16 04:28:50 +03:00
|
|
|
override LDFLAGS_FOR_TARGET += \
|
2022-08-29 00:24:47 +03:00
|
|
|
-m elf_i386 \
|
2022-08-15 18:41:04 +03:00
|
|
|
-static \
|
|
|
|
--build-id=sha1
|
2022-08-26 11:23:35 +03:00
|
|
|
|
2023-03-16 04:28:50 +03:00
|
|
|
ifeq ($(LD_FOR_TARGET_HAS_NO_PIE),yes)
|
|
|
|
override LDFLAGS_FOR_TARGET += -no-pie
|
2022-08-26 11:23:35 +03:00
|
|
|
endif
|
2021-03-02 12:23:43 +03:00
|
|
|
endif
|
2020-01-22 01:45:13 +03:00
|
|
|
|
2022-08-15 18:41:04 +03:00
|
|
|
ifeq ($(TARGET),uefi-x86-64)
|
2023-03-16 04:28:50 +03:00
|
|
|
override LDFLAGS_FOR_TARGET += \
|
2022-08-29 00:24:47 +03:00
|
|
|
-m elf_x86_64 \
|
2022-08-15 18:41:04 +03:00
|
|
|
-static \
|
|
|
|
-pie \
|
|
|
|
--no-dynamic-linker \
|
2022-08-29 00:24:47 +03:00
|
|
|
-z text
|
2021-04-02 17:45:14 +03:00
|
|
|
endif
|
|
|
|
|
2022-08-15 18:41:04 +03:00
|
|
|
ifeq ($(TARGET),uefi-ia32)
|
2023-03-16 04:28:50 +03:00
|
|
|
override LDFLAGS_FOR_TARGET += \
|
2022-08-29 00:24:47 +03:00
|
|
|
-m elf_i386 \
|
2022-08-15 18:41:04 +03:00
|
|
|
-static \
|
|
|
|
-pie \
|
|
|
|
--no-dynamic-linker \
|
2022-08-29 00:24:47 +03:00
|
|
|
-z text
|
2021-07-20 14:35:43 +03:00
|
|
|
endif
|
|
|
|
|
2022-08-18 18:32:54 +03:00
|
|
|
ifeq ($(TARGET),uefi-aarch64)
|
2023-03-16 04:28:50 +03:00
|
|
|
override LDFLAGS_FOR_TARGET += \
|
2022-08-29 00:24:47 +03:00
|
|
|
-m aarch64elf \
|
2022-08-18 18:32:54 +03:00
|
|
|
-static \
|
|
|
|
-pie \
|
|
|
|
--no-dynamic-linker \
|
2022-08-29 00:24:47 +03:00
|
|
|
-z text
|
2022-08-18 18:32:54 +03:00
|
|
|
endif
|
|
|
|
|
2023-06-04 02:36:06 +03:00
|
|
|
ifeq ($(TARGET),uefi-riscv64)
|
|
|
|
override LDFLAGS_FOR_TARGET += \
|
|
|
|
-m elf64lriscv \
|
|
|
|
-static \
|
|
|
|
-pie \
|
|
|
|
--no-dynamic-linker \
|
|
|
|
-z text
|
|
|
|
endif
|
|
|
|
|
2022-08-27 06:09:42 +03:00
|
|
|
override C_FILES := $(shell find . -type f -name '*.c')
|
2022-08-15 18:41:04 +03:00
|
|
|
ifeq ($(TARGET),bios)
|
2022-08-27 06:09:42 +03:00
|
|
|
override ASMX86_FILES := $(shell find . -type f -name '*.asm_x86')
|
|
|
|
override ASM32_FILES := $(shell find . -type f -name '*.asm_ia32')
|
|
|
|
override ASMB_FILES := $(shell find . -type f -name '*.asm_bios_ia32')
|
2021-10-22 16:45:47 +03:00
|
|
|
|
2022-08-15 18:41:04 +03:00
|
|
|
override OBJ := $(addprefix $(call MKESCAPE,$(BUILDDIR))/, $(C_FILES:.c=.o) $(ASM32_FILES:.asm_ia32=.o) $(ASMB_FILES:.asm_bios_ia32=.o) $(ASMX86_FILES:.asm_x86=.o))
|
|
|
|
override OBJ_S2 := $(filter %.s2.o,$(OBJ))
|
2021-03-02 12:23:43 +03:00
|
|
|
endif
|
2022-08-15 18:41:04 +03:00
|
|
|
ifeq ($(TARGET),uefi-x86-64)
|
2022-08-27 06:09:42 +03:00
|
|
|
override ASMX86_FILES := $(shell find . -type f -name '*.asm_x86')
|
|
|
|
override ASM64_FILES := $(shell find . -type f -name '*.asm_x86_64')
|
|
|
|
override ASM64U_FILES := $(shell find . -type f -name '*.asm_uefi_x86_64')
|
2021-10-22 16:45:47 +03:00
|
|
|
|
2022-08-15 18:41:04 +03:00
|
|
|
override OBJ := $(addprefix $(call MKESCAPE,$(BUILDDIR))/, $(C_FILES:.c=.o) $(ASM64_FILES:.asm_x86_64=.o) $(ASM64U_FILES:.asm_uefi_x86_64=.o) $(ASMX86_FILES:.asm_x86=.o))
|
2021-03-07 02:52:25 +03:00
|
|
|
endif
|
2022-08-15 18:41:04 +03:00
|
|
|
ifeq ($(TARGET),uefi-ia32)
|
2022-08-27 06:09:42 +03:00
|
|
|
override ASMX86_FILES := $(shell find . -type f -name '*.asm_x86')
|
|
|
|
override ASM32_FILES := $(shell find . -type f -name '*.asm_ia32')
|
|
|
|
override ASM32U_FILES := $(shell find . -type f -name '*.asm_uefi_ia32')
|
2021-10-22 16:45:47 +03:00
|
|
|
|
2022-08-15 18:41:04 +03:00
|
|
|
override OBJ := $(addprefix $(call MKESCAPE,$(BUILDDIR))/, $(C_FILES:.c=.o) $(ASM32_FILES:.asm_ia32=.o) $(ASM32U_FILES:.asm_uefi_ia32=.o) $(ASMX86_FILES:.asm_x86=.o))
|
2021-07-20 14:35:43 +03:00
|
|
|
endif
|
2022-08-18 18:32:54 +03:00
|
|
|
ifeq ($(TARGET),uefi-aarch64)
|
2022-08-27 06:09:42 +03:00
|
|
|
override ASM64_FILES := $(shell find . -type f -name '*.asm_aarch64')
|
|
|
|
override ASM64U_FILES := $(shell find . -type f -name '*.asm_uefi_aarch64')
|
2022-08-18 18:32:54 +03:00
|
|
|
|
|
|
|
override OBJ := $(addprefix $(call MKESCAPE,$(BUILDDIR))/, $(C_FILES:.c=.o) $(ASM64_FILES:.asm_aarch64=.o) $(ASM64U_FILES:.asm_uefi_aarch64=.o))
|
|
|
|
endif
|
2023-06-04 02:36:06 +03:00
|
|
|
ifeq ($(TARGET),uefi-riscv64)
|
|
|
|
override ASM64_FILES := $(shell find . -type f -name '*.asm_riscv64')
|
|
|
|
override ASM64U_FILES := $(shell find . -type f -name '*.asm_uefi_riscv64')
|
|
|
|
|
|
|
|
override OBJ := $(addprefix $(call MKESCAPE,$(BUILDDIR))/, $(C_FILES:.c=.o) $(ASM64_FILES:.asm_riscv64=.o) $(ASM64U_FILES:.asm_uefi_riscv64=.o))
|
|
|
|
endif
|
2022-08-18 18:32:54 +03:00
|
|
|
|
2021-12-08 19:41:19 +03:00
|
|
|
override HEADER_DEPS := $(addprefix $(call MKESCAPE,$(BUILDDIR))/, $(C_FILES:.c=.d))
|
2020-01-22 01:45:13 +03:00
|
|
|
|
2022-08-15 18:41:04 +03:00
|
|
|
.PHONY: all
|
|
|
|
|
|
|
|
ifeq ($(TARGET),bios)
|
2023-06-15 03:02:32 +03:00
|
|
|
all: $(call MKESCAPE,$(BUILDDIR))/limine-bios.sys $(call MKESCAPE,$(BUILDDIR))/stage2.bin.gz
|
2022-08-15 18:41:04 +03:00
|
|
|
else ifeq ($(TARGET),uefi-x86-64)
|
2021-12-08 19:41:19 +03:00
|
|
|
all: $(call MKESCAPE,$(BUILDDIR))/BOOTX64.EFI
|
2022-08-15 18:41:04 +03:00
|
|
|
else ifeq ($(TARGET),uefi-ia32)
|
2021-12-08 19:41:19 +03:00
|
|
|
all: $(call MKESCAPE,$(BUILDDIR))/BOOTIA32.EFI
|
2022-08-31 01:40:59 +03:00
|
|
|
else ifeq ($(TARGET),uefi-aarch64)
|
2022-08-18 18:32:54 +03:00
|
|
|
all: $(call MKESCAPE,$(BUILDDIR))/BOOTAA64.EFI
|
2023-06-04 02:36:06 +03:00
|
|
|
else ifeq ($(TARGET),uefi-riscv64)
|
|
|
|
all: $(call MKESCAPE,$(BUILDDIR))/BOOTRISCV64.EFI
|
2021-03-02 12:23:43 +03:00
|
|
|
endif
|
|
|
|
|
2022-08-15 18:41:04 +03:00
|
|
|
ifeq ($(TARGET),bios)
|
2021-03-08 02:50:23 +03:00
|
|
|
|
2021-11-28 21:00:49 +03:00
|
|
|
$(call MKESCAPE,$(BUILDDIR))/stage2.bin.gz: $(call MKESCAPE,$(BUILDDIR))/stage2.bin
|
|
|
|
gzip -n -9 < '$(call SHESCAPE,$<)' > '$(call SHESCAPE,$@)'
|
2021-02-21 01:04:06 +03:00
|
|
|
|
2023-06-15 03:02:32 +03:00
|
|
|
$(call MKESCAPE,$(BUILDDIR))/stage2.bin: $(call MKESCAPE,$(BUILDDIR))/limine-bios.sys
|
2023-03-16 04:28:50 +03:00
|
|
|
dd if='$(call SHESCAPE,$<)' bs=$$(( 0x$$("$(READELF_FOR_TARGET)" -S '$(call SHESCAPE,$(BUILDDIR))/limine.elf' | $(GREP) '\.text\.stage3' | $(SED) 's/^.*] //' | $(AWK) '{print $$3}' | $(SED) 's/^0*//') - 0xf000 )) count=1 of='$(call SHESCAPE,$@)' 2>/dev/null
|
2021-02-21 01:04:06 +03:00
|
|
|
|
2022-09-14 03:16:05 +03:00
|
|
|
$(call MKESCAPE,$(BUILDDIR))/stage2.map.o: $(call MKESCAPE,$(BUILDDIR))/limine_nomap.elf
|
2021-11-28 21:00:49 +03:00
|
|
|
cd '$(call SHESCAPE,$(BUILDDIR))' && \
|
2022-09-17 14:53:57 +03:00
|
|
|
'$(call SHESCAPE,$(SRCDIR))/gensyms.sh' '$(call SHESCAPE,$<)' stage2 32 '\.text\.stage2'
|
2023-03-16 04:28:50 +03:00
|
|
|
$(CC_FOR_TARGET) $(CFLAGS_FOR_TARGET) $(CPPFLAGS_FOR_TARGET) -c '$(call SHESCAPE,$(BUILDDIR))/stage2.map.S' -o '$(call SHESCAPE,$@)'
|
2022-08-13 21:32:06 +03:00
|
|
|
rm -f '$(call SHESCAPE,$(BUILDDIR))/stage2.map.S' '$(call SHESCAPE,$(BUILDDIR))/stage2.map.d'
|
2021-03-12 07:19:56 +03:00
|
|
|
|
2022-09-17 14:53:57 +03:00
|
|
|
$(call MKESCAPE,$(BUILDDIR))/full.map.o: $(call MKESCAPE,$(BUILDDIR))/limine_nos3map.elf
|
2021-11-28 21:00:49 +03:00
|
|
|
cd '$(call SHESCAPE,$(BUILDDIR))' && \
|
2022-04-20 05:00:00 +03:00
|
|
|
'$(call SHESCAPE,$(SRCDIR))/gensyms.sh' '$(call SHESCAPE,$<)' full 32 '\.text'
|
2023-03-16 04:28:50 +03:00
|
|
|
$(CC_FOR_TARGET) $(CFLAGS_FOR_TARGET) $(CPPFLAGS_FOR_TARGET) -c '$(call SHESCAPE,$(BUILDDIR))/full.map.S' -o '$(call SHESCAPE,$@)'
|
2022-08-13 21:32:06 +03:00
|
|
|
rm -f '$(call SHESCAPE,$(BUILDDIR))/full.map.S' '$(call SHESCAPE,$(BUILDDIR))/full.map.d'
|
2020-01-22 01:45:13 +03:00
|
|
|
|
2023-06-15 03:02:32 +03:00
|
|
|
$(call MKESCAPE,$(BUILDDIR))/limine-bios.sys: $(call MKESCAPE,$(BUILDDIR))/limine_stage2only.elf $(call MKESCAPE,$(BUILDDIR))/limine.elf
|
2023-03-16 04:28:50 +03:00
|
|
|
$(OBJCOPY_FOR_TARGET) -O binary '$(call SHESCAPE,$(BUILDDIR))/limine.elf' '$(call SHESCAPE,$@)'
|
2023-06-15 02:33:17 +03:00
|
|
|
chmod -x '$(call SHESCAPE,$@)'
|
2020-11-15 19:56:10 +03:00
|
|
|
|
2022-02-02 20:18:49 +03:00
|
|
|
$(call MKESCAPE,$(BUILDDIR))/linker_stage2only.ld: linker_bios.ld.in
|
2022-08-08 23:00:25 +03:00
|
|
|
$(MKDIR_P) '$(call SHESCAPE,$(BUILDDIR))'
|
2023-03-16 04:28:50 +03:00
|
|
|
$(CC_FOR_TARGET) -x c -E -P -undef -DLINKER_STAGE2ONLY linker_bios.ld.in -o '$(call SHESCAPE,$(BUILDDIR))/linker_stage2only.ld'
|
2022-02-02 20:18:49 +03:00
|
|
|
|
2022-07-18 22:02:44 +03:00
|
|
|
$(call MKESCAPE,$(BUILDDIR))/limine_stage2only.elf: $(OBJ_S2) ../libgcc-binaries/libgcc-i686.a
|
2022-02-02 20:18:49 +03:00
|
|
|
$(MAKE) '$(call SHESCAPE,$(BUILDDIR))/linker_stage2only.ld'
|
2023-03-16 04:28:50 +03:00
|
|
|
$(LD_FOR_TARGET) '$(call OBJESCAPE,$^)' $(LDFLAGS_FOR_TARGET) -T'$(call SHESCAPE,$(BUILDDIR))/linker_stage2only.ld' -o '$(call SHESCAPE,$@)' || \
|
2021-05-04 14:56:00 +03:00
|
|
|
( echo "This error may mean that stage 2 was trying to use stage 3 symbols before loading stage 3" && \
|
2021-02-25 13:28:14 +03:00
|
|
|
false )
|
2021-02-25 03:24:54 +03:00
|
|
|
|
2022-09-17 14:53:57 +03:00
|
|
|
$(call MKESCAPE,$(BUILDDIR))/linker_nos2map.ld: linker_bios.ld.in
|
|
|
|
$(MKDIR_P) '$(call SHESCAPE,$(BUILDDIR))'
|
2023-03-16 04:28:50 +03:00
|
|
|
$(CC_FOR_TARGET) -x c -E -P -undef -DLINKER_NOMAP -DLINKER_NOS2MAP linker_bios.ld.in -o '$(call SHESCAPE,$(BUILDDIR))/linker_nos2map.ld'
|
2022-09-17 14:53:57 +03:00
|
|
|
|
2023-05-03 20:36:47 +03:00
|
|
|
$(call MKESCAPE,$(BUILDDIR))/limine_nomap.elf: $(OBJ) ../libgcc-binaries/libgcc-i686.a
|
2022-09-17 14:53:57 +03:00
|
|
|
$(MAKE) '$(call SHESCAPE,$(BUILDDIR))/linker_nos2map.ld'
|
2023-03-16 04:28:50 +03:00
|
|
|
$(LD_FOR_TARGET) '$(call OBJESCAPE,$^)' $(LDFLAGS_FOR_TARGET) -T'$(call SHESCAPE,$(BUILDDIR))/linker_nos2map.ld' -o '$(call SHESCAPE,$@)'
|
|
|
|
$(OBJCOPY_FOR_TARGET) -O binary --only-section=.note.gnu.build-id '$(call SHESCAPE,$@)' '$(call SHESCAPE,$(BUILDDIR))/build-id.s2.bin'
|
2022-09-17 14:53:57 +03:00
|
|
|
cd '$(call SHESCAPE,$(BUILDDIR))' && \
|
2023-03-16 04:28:50 +03:00
|
|
|
$(OBJCOPY_FOR_TARGET) -I binary $(OBJCOPY2ELF_FLAGS) build-id.s2.bin build-id.s2.o
|
|
|
|
$(OBJCOPY_FOR_TARGET) -O binary --only-section=.note.gnu.build-id '$(call SHESCAPE,$@)' '$(call SHESCAPE,$(BUILDDIR))/build-id.s3.bin'
|
2022-09-17 14:53:57 +03:00
|
|
|
cd '$(call SHESCAPE,$(BUILDDIR))' && \
|
2023-03-16 04:28:50 +03:00
|
|
|
$(OBJCOPY_FOR_TARGET) -I binary $(OBJCOPY2ELF_FLAGS) build-id.s3.bin build-id.s3.o
|
|
|
|
$(LD_FOR_TARGET) '$(call OBJESCAPE,$^)' '$(call SHESCAPE,$(BUILDDIR))/build-id.s2.o' '$(call SHESCAPE,$(BUILDDIR))/build-id.s3.o' $(LDFLAGS_FOR_TARGET) -T'$(call SHESCAPE,$(BUILDDIR))/linker_nos2map.ld' -o '$(call SHESCAPE,$@)'
|
2022-09-17 14:53:57 +03:00
|
|
|
|
2022-02-02 20:18:49 +03:00
|
|
|
$(call MKESCAPE,$(BUILDDIR))/linker_nomap.ld: linker_bios.ld.in
|
2022-08-08 23:00:25 +03:00
|
|
|
$(MKDIR_P) '$(call SHESCAPE,$(BUILDDIR))'
|
2023-03-16 04:28:50 +03:00
|
|
|
$(CC_FOR_TARGET) -x c -E -P -undef -DLINKER_NOMAP linker_bios.ld.in -o '$(call SHESCAPE,$(BUILDDIR))/linker_nomap.ld'
|
2022-02-02 20:18:49 +03:00
|
|
|
|
2023-05-03 20:36:47 +03:00
|
|
|
$(call MKESCAPE,$(BUILDDIR))/limine_nos3map.elf: $(OBJ) ../libgcc-binaries/libgcc-i686.a $(call MKESCAPE,$(BUILDDIR))/stage2.map.o
|
2022-02-02 20:18:49 +03:00
|
|
|
$(MAKE) '$(call SHESCAPE,$(BUILDDIR))/linker_nomap.ld'
|
2023-03-16 04:28:50 +03:00
|
|
|
$(LD_FOR_TARGET) '$(call OBJESCAPE,$^)' $(LDFLAGS_FOR_TARGET) -T'$(call SHESCAPE,$(BUILDDIR))/linker_nomap.ld' -o '$(call SHESCAPE,$@)'
|
|
|
|
$(OBJCOPY_FOR_TARGET) -O binary --only-section=.note.gnu.build-id '$(call SHESCAPE,$@)' '$(call SHESCAPE,$(BUILDDIR))/build-id.s2.bin'
|
2022-05-20 21:02:14 +03:00
|
|
|
cd '$(call SHESCAPE,$(BUILDDIR))' && \
|
2023-03-16 04:28:50 +03:00
|
|
|
$(OBJCOPY_FOR_TARGET) -I binary $(OBJCOPY2ELF_FLAGS) build-id.s2.bin build-id.s2.o
|
|
|
|
$(OBJCOPY_FOR_TARGET) -O binary --only-section=.note.gnu.build-id '$(call SHESCAPE,$@)' '$(call SHESCAPE,$(BUILDDIR))/build-id.s3.bin'
|
2022-05-20 21:02:14 +03:00
|
|
|
cd '$(call SHESCAPE,$(BUILDDIR))' && \
|
2023-03-16 04:28:50 +03:00
|
|
|
$(OBJCOPY_FOR_TARGET) -I binary $(OBJCOPY2ELF_FLAGS) build-id.s3.bin build-id.s3.o
|
|
|
|
$(LD_FOR_TARGET) '$(call OBJESCAPE,$^)' '$(call SHESCAPE,$(BUILDDIR))/build-id.s2.o' '$(call SHESCAPE,$(BUILDDIR))/build-id.s3.o' $(LDFLAGS_FOR_TARGET) -T'$(call SHESCAPE,$(BUILDDIR))/linker_nomap.ld' -o '$(call SHESCAPE,$@)'
|
2022-02-02 20:18:49 +03:00
|
|
|
|
|
|
|
$(call MKESCAPE,$(BUILDDIR))/linker.ld: linker_bios.ld.in
|
2022-08-08 23:00:25 +03:00
|
|
|
$(MKDIR_P) '$(call SHESCAPE,$(BUILDDIR))'
|
2023-03-16 04:28:50 +03:00
|
|
|
$(CC_FOR_TARGET) -x c -E -P -undef linker_bios.ld.in -o '$(call SHESCAPE,$(BUILDDIR))/linker.ld'
|
2021-03-12 07:19:56 +03:00
|
|
|
|
2023-05-03 20:36:47 +03:00
|
|
|
$(call MKESCAPE,$(BUILDDIR))/limine.elf: $(OBJ) ../libgcc-binaries/libgcc-i686.a $(call MKESCAPE,$(BUILDDIR))/stage2.map.o $(call MKESCAPE,$(BUILDDIR))/full.map.o
|
2022-02-02 20:18:49 +03:00
|
|
|
$(MAKE) '$(call SHESCAPE,$(BUILDDIR))/linker.ld'
|
2023-03-16 04:28:50 +03:00
|
|
|
$(LD_FOR_TARGET) '$(call OBJESCAPE,$^)' $(LDFLAGS_FOR_TARGET) -T'$(call SHESCAPE,$(BUILDDIR))/linker.ld' -o '$(call SHESCAPE,$@)'
|
|
|
|
$(OBJCOPY_FOR_TARGET) -O binary --only-section=.note.gnu.build-id '$(call SHESCAPE,$@)' '$(call SHESCAPE,$(BUILDDIR))/build-id.s2.bin'
|
2021-11-28 21:00:49 +03:00
|
|
|
cd '$(call SHESCAPE,$(BUILDDIR))' && \
|
2023-03-16 04:28:50 +03:00
|
|
|
$(OBJCOPY_FOR_TARGET) -I binary $(OBJCOPY2ELF_FLAGS) build-id.s2.bin build-id.s2.o
|
|
|
|
$(OBJCOPY_FOR_TARGET) -O binary --only-section=.note.gnu.build-id '$(call SHESCAPE,$@)' '$(call SHESCAPE,$(BUILDDIR))/build-id.s3.bin'
|
2021-11-28 21:00:49 +03:00
|
|
|
cd '$(call SHESCAPE,$(BUILDDIR))' && \
|
2023-03-16 04:28:50 +03:00
|
|
|
$(OBJCOPY_FOR_TARGET) -I binary $(OBJCOPY2ELF_FLAGS) build-id.s3.bin build-id.s3.o
|
|
|
|
$(LD_FOR_TARGET) '$(call OBJESCAPE,$^)' '$(call SHESCAPE,$(BUILDDIR))/build-id.s2.o' '$(call SHESCAPE,$(BUILDDIR))/build-id.s3.o' $(LDFLAGS_FOR_TARGET) -T'$(call SHESCAPE,$(BUILDDIR))/linker.ld' -o '$(call SHESCAPE,$@)'
|
2022-02-02 20:18:49 +03:00
|
|
|
|
2021-03-08 02:50:23 +03:00
|
|
|
endif
|
2021-03-03 23:40:55 +03:00
|
|
|
|
2022-06-14 06:58:34 +03:00
|
|
|
$(call MKESCAPE,$(BUILDDIR))/limine-efi: ../limine-efi/*
|
2022-08-08 23:00:25 +03:00
|
|
|
$(MKDIR_P) '$(call SHESCAPE,$(BUILDDIR))'
|
2022-06-14 06:58:34 +03:00
|
|
|
cp -r ../limine-efi '$(call SHESCAPE,$(BUILDDIR))/'
|
2021-07-20 14:35:43 +03:00
|
|
|
|
2022-08-15 18:41:04 +03:00
|
|
|
ifeq ($(TARGET),uefi-x86-64)
|
2021-03-02 08:05:14 +03:00
|
|
|
|
2022-02-03 12:38:43 +03:00
|
|
|
$(call MKESCAPE,$(BUILDDIR))/full.map.o: $(call MKESCAPE,$(BUILDDIR))/limine_nomap.elf
|
2021-11-28 21:00:49 +03:00
|
|
|
cd '$(call SHESCAPE,$(BUILDDIR))' && \
|
2022-04-25 00:30:28 +03:00
|
|
|
'$(call SHESCAPE,$(SRCDIR))/gensyms.sh' '$(call SHESCAPE,$<)' full 64 '\.text'
|
2023-03-16 04:28:50 +03:00
|
|
|
$(CC_FOR_TARGET) $(CFLAGS_FOR_TARGET) $(CPPFLAGS_FOR_TARGET) -c '$(call SHESCAPE,$(BUILDDIR))/full.map.S' -o '$(call SHESCAPE,$@)'
|
2022-08-13 21:32:06 +03:00
|
|
|
rm -f '$(call SHESCAPE,$(BUILDDIR))/full.map.S' '$(call SHESCAPE,$(BUILDDIR))/full.map.d'
|
2021-04-08 02:15:35 +03:00
|
|
|
|
2022-02-03 12:38:43 +03:00
|
|
|
$(call MKESCAPE,$(BUILDDIR))/BOOTX64.EFI: $(call MKESCAPE,$(BUILDDIR))/limine.elf
|
2023-03-16 04:28:50 +03:00
|
|
|
$(OBJCOPY_FOR_TARGET) -O binary '$(call SHESCAPE,$<)' '$(call SHESCAPE,$@)'
|
2023-06-15 02:33:17 +03:00
|
|
|
chmod -x '$(call SHESCAPE,$@)'
|
2021-03-04 07:15:20 +03:00
|
|
|
|
2023-06-12 06:57:47 +03:00
|
|
|
$(call MKESCAPE,$(BUILDDIR))/limine-efi/gnuefi/crt0-efi-x86_64.S.o $(call MKESCAPE,$(BUILDDIR))/limine-efi/gnuefi/reloc_x86_64.c.o: $(call MKESCAPE,$(BUILDDIR))/limine-efi
|
2022-06-14 06:58:34 +03:00
|
|
|
$(MAKE) -C '$(call SHESCAPE,$(BUILDDIR))/limine-efi/gnuefi' \
|
2023-03-16 04:28:50 +03:00
|
|
|
CC="$(CC_FOR_TARGET)" \
|
2022-09-02 12:01:13 +03:00
|
|
|
CFLAGS="$(BASE_CFLAGS)" \
|
|
|
|
CPPFLAGS='-nostdinc -I$(call SHESCAPE,$(SRCDIR))/../freestanding-headers' \
|
2022-01-17 02:20:59 +03:00
|
|
|
ARCH=x86_64
|
2021-06-30 22:58:11 +03:00
|
|
|
|
2022-06-15 04:25:36 +03:00
|
|
|
$(call MKESCAPE,$(BUILDDIR))/linker_nomap.ld: linker_uefi_x86_64.ld.in
|
2022-08-08 23:00:25 +03:00
|
|
|
$(MKDIR_P) '$(call SHESCAPE,$(BUILDDIR))'
|
2023-03-16 04:28:50 +03:00
|
|
|
$(CC_FOR_TARGET) -x c -E -P -undef -DLINKER_NOMAP linker_uefi_x86_64.ld.in -o '$(call SHESCAPE,$(BUILDDIR))/linker_nomap.ld'
|
2022-02-02 20:18:49 +03:00
|
|
|
|
2023-06-12 06:57:47 +03:00
|
|
|
$(call MKESCAPE,$(BUILDDIR))/limine_nomap.elf: $(call MKESCAPE,$(BUILDDIR))/limine-efi/gnuefi/crt0-efi-x86_64.S.o $(call MKESCAPE,$(BUILDDIR))/limine-efi/gnuefi/reloc_x86_64.c.o $(OBJ) ../libgcc-binaries/libgcc-x86_64-no-red-zone.a
|
2022-02-02 20:18:49 +03:00
|
|
|
$(MAKE) '$(call SHESCAPE,$(BUILDDIR))/linker_nomap.ld'
|
2023-03-16 04:28:50 +03:00
|
|
|
$(LD_FOR_TARGET) \
|
2022-02-02 20:18:49 +03:00
|
|
|
-T'$(call SHESCAPE,$(BUILDDIR))/linker_nomap.ld' \
|
2023-03-16 04:28:50 +03:00
|
|
|
'$(call OBJESCAPE,$^)' $(LDFLAGS_FOR_TARGET) -o '$(call SHESCAPE,$@)'
|
2021-04-08 02:15:35 +03:00
|
|
|
|
2022-06-15 04:25:36 +03:00
|
|
|
$(call MKESCAPE,$(BUILDDIR))/linker.ld: linker_uefi_x86_64.ld.in
|
2022-08-08 23:00:25 +03:00
|
|
|
$(MKDIR_P) '$(call SHESCAPE,$(BUILDDIR))'
|
2023-03-16 04:28:50 +03:00
|
|
|
$(CC_FOR_TARGET) -x c -E -P -undef linker_uefi_x86_64.ld.in -o '$(call SHESCAPE,$(BUILDDIR))/linker.ld'
|
2022-02-02 20:18:49 +03:00
|
|
|
|
2023-06-12 06:57:47 +03:00
|
|
|
$(call MKESCAPE,$(BUILDDIR))/limine.elf: $(call MKESCAPE,$(BUILDDIR))/limine-efi/gnuefi/crt0-efi-x86_64.S.o $(call MKESCAPE,$(BUILDDIR))/limine-efi/gnuefi/reloc_x86_64.c.o $(OBJ) ../libgcc-binaries/libgcc-x86_64-no-red-zone.a $(call MKESCAPE,$(BUILDDIR))/full.map.o
|
2022-02-02 20:18:49 +03:00
|
|
|
$(MAKE) '$(call SHESCAPE,$(BUILDDIR))/linker.ld'
|
2023-03-16 04:28:50 +03:00
|
|
|
$(LD_FOR_TARGET) \
|
2022-02-02 20:18:49 +03:00
|
|
|
-T'$(call SHESCAPE,$(BUILDDIR))/linker.ld' \
|
2023-03-16 04:28:50 +03:00
|
|
|
'$(call OBJESCAPE,$^)' $(LDFLAGS_FOR_TARGET) -o '$(call SHESCAPE,$@)'
|
2021-03-08 02:50:23 +03:00
|
|
|
|
|
|
|
endif
|
2020-01-22 01:45:13 +03:00
|
|
|
|
2022-08-18 18:32:54 +03:00
|
|
|
ifeq ($(TARGET),uefi-aarch64)
|
|
|
|
|
|
|
|
$(call MKESCAPE,$(BUILDDIR))/full.map.o: $(call MKESCAPE,$(BUILDDIR))/limine_nomap.elf
|
|
|
|
cd '$(call SHESCAPE,$(BUILDDIR))' && \
|
|
|
|
'$(call SHESCAPE,$(SRCDIR))/gensyms.sh' '$(call SHESCAPE,$<)' full 64 '\.text'
|
2023-03-16 04:28:50 +03:00
|
|
|
$(CC_FOR_TARGET) $(CFLAGS_FOR_TARGET) $(CPPFLAGS_FOR_TARGET) -c '$(call SHESCAPE,$(BUILDDIR))/full.map.S' -o '$(call SHESCAPE,$@)'
|
2022-08-18 18:32:54 +03:00
|
|
|
rm -f '$(call SHESCAPE,$(BUILDDIR))/full.map.S' '$(call SHESCAPE,$(BUILDDIR))/full.map.d'
|
|
|
|
|
|
|
|
$(call MKESCAPE,$(BUILDDIR))/BOOTAA64.EFI: $(call MKESCAPE,$(BUILDDIR))/limine.elf
|
2023-03-16 04:28:50 +03:00
|
|
|
$(OBJCOPY_FOR_TARGET) -O binary '$(call SHESCAPE,$<)' '$(call SHESCAPE,$@)'
|
2023-06-15 02:33:17 +03:00
|
|
|
chmod -x '$(call SHESCAPE,$@)'
|
2022-08-18 18:32:54 +03:00
|
|
|
|
2023-06-12 06:57:47 +03:00
|
|
|
$(call MKESCAPE,$(BUILDDIR))/limine-efi/gnuefi/crt0-efi-aarch64.S.o $(call MKESCAPE,$(BUILDDIR))/limine-efi/gnuefi/reloc_aarch64.c.o: $(call MKESCAPE,$(BUILDDIR))/limine-efi
|
2022-08-18 18:32:54 +03:00
|
|
|
$(MAKE) -C '$(call SHESCAPE,$(BUILDDIR))/limine-efi/gnuefi' \
|
2023-03-16 04:28:50 +03:00
|
|
|
CC="$(CC_FOR_TARGET)" \
|
2022-09-02 12:01:13 +03:00
|
|
|
CFLAGS="$(BASE_CFLAGS)" \
|
|
|
|
CPPFLAGS='-nostdinc -I$(call SHESCAPE,$(SRCDIR))/../freestanding-headers' \
|
2022-08-18 18:32:54 +03:00
|
|
|
ARCH=aarch64
|
|
|
|
|
|
|
|
$(call MKESCAPE,$(BUILDDIR))/linker_nomap.ld: linker_uefi_aarch64.ld.in
|
|
|
|
$(MKDIR_P) '$(call SHESCAPE,$(BUILDDIR))'
|
2023-03-16 04:28:50 +03:00
|
|
|
$(CC_FOR_TARGET) -x c -E -P -undef -DLINKER_NOMAP linker_uefi_aarch64.ld.in -o '$(call SHESCAPE,$(BUILDDIR))/linker_nomap.ld'
|
2022-08-18 18:32:54 +03:00
|
|
|
|
2023-06-12 06:57:47 +03:00
|
|
|
$(call MKESCAPE,$(BUILDDIR))/limine_nomap.elf: $(call MKESCAPE,$(BUILDDIR))/limine-efi/gnuefi/crt0-efi-aarch64.S.o $(call MKESCAPE,$(BUILDDIR))/limine-efi/gnuefi/reloc_aarch64.c.o $(OBJ) ../libgcc-binaries/libgcc-aarch64.a
|
2022-08-18 18:32:54 +03:00
|
|
|
$(MAKE) '$(call SHESCAPE,$(BUILDDIR))/linker_nomap.ld'
|
2023-03-16 04:28:50 +03:00
|
|
|
$(LD_FOR_TARGET) \
|
2022-08-18 18:32:54 +03:00
|
|
|
-T'$(call SHESCAPE,$(BUILDDIR))/linker_nomap.ld' \
|
2023-03-16 04:28:50 +03:00
|
|
|
'$(call OBJESCAPE,$^)' $(LDFLAGS_FOR_TARGET) -o '$(call SHESCAPE,$@)'
|
2022-08-18 18:32:54 +03:00
|
|
|
|
|
|
|
$(call MKESCAPE,$(BUILDDIR))/linker.ld: linker_uefi_aarch64.ld.in
|
|
|
|
$(MKDIR_P) '$(call SHESCAPE,$(BUILDDIR))'
|
2023-03-16 04:28:50 +03:00
|
|
|
$(CC_FOR_TARGET) -x c -E -P -undef linker_uefi_aarch64.ld.in -o '$(call SHESCAPE,$(BUILDDIR))/linker.ld'
|
2022-08-18 18:32:54 +03:00
|
|
|
|
2023-06-12 06:57:47 +03:00
|
|
|
$(call MKESCAPE,$(BUILDDIR))/limine.elf: $(call MKESCAPE,$(BUILDDIR))/limine-efi/gnuefi/crt0-efi-aarch64.S.o $(call MKESCAPE,$(BUILDDIR))/limine-efi/gnuefi/reloc_aarch64.c.o $(OBJ) ../libgcc-binaries/libgcc-aarch64.a $(call MKESCAPE,$(BUILDDIR))/full.map.o
|
2022-08-18 18:32:54 +03:00
|
|
|
$(MAKE) '$(call SHESCAPE,$(BUILDDIR))/linker.ld'
|
2023-03-16 04:28:50 +03:00
|
|
|
$(LD_FOR_TARGET) \
|
2022-08-18 18:32:54 +03:00
|
|
|
-T'$(call SHESCAPE,$(BUILDDIR))/linker.ld' \
|
2023-03-16 04:28:50 +03:00
|
|
|
'$(call OBJESCAPE,$^)' $(LDFLAGS_FOR_TARGET) -o '$(call SHESCAPE,$@)'
|
2022-08-18 18:32:54 +03:00
|
|
|
endif
|
|
|
|
|
2023-06-04 02:36:06 +03:00
|
|
|
ifeq ($(TARGET),uefi-riscv64)
|
|
|
|
|
|
|
|
$(call MKESCAPE,$(BUILDDIR))/full.map.o: $(call MKESCAPE,$(BUILDDIR))/limine_nomap.elf
|
|
|
|
cd '$(call SHESCAPE,$(BUILDDIR))' && \
|
|
|
|
'$(call SHESCAPE,$(SRCDIR))/gensyms.sh' '$(call SHESCAPE,$<)' full 64 '\.text'
|
|
|
|
$(CC_FOR_TARGET) $(CFLAGS_FOR_TARGET) $(CPPFLAGS_FOR_TARGET) -c '$(call SHESCAPE,$(BUILDDIR))/full.map.S' -o '$(call SHESCAPE,$@)'
|
|
|
|
rm -f '$(call SHESCAPE,$(BUILDDIR))/full.map.S' '$(call SHESCAPE,$(BUILDDIR))/full.map.d'
|
|
|
|
|
|
|
|
$(call MKESCAPE,$(BUILDDIR))/BOOTRISCV64.EFI: $(call MKESCAPE,$(BUILDDIR))/limine.elf
|
|
|
|
$(OBJCOPY_FOR_TARGET) -O binary '$(call SHESCAPE,$<)' '$(call SHESCAPE,$@)'
|
2023-06-15 02:33:17 +03:00
|
|
|
chmod -x '$(call SHESCAPE,$@)'
|
2023-06-04 02:36:06 +03:00
|
|
|
|
2023-06-12 06:57:47 +03:00
|
|
|
$(call MKESCAPE,$(BUILDDIR))/limine-efi/gnuefi/crt0-efi-riscv64.S.o $(call MKESCAPE,$(BUILDDIR))/limine-efi/gnuefi/reloc_riscv64.c.o: $(call MKESCAPE,$(BUILDDIR))/limine-efi
|
2023-06-04 02:36:06 +03:00
|
|
|
$(MAKE) -C '$(call SHESCAPE,$(BUILDDIR))/limine-efi/gnuefi' \
|
|
|
|
CC="$(CC_FOR_TARGET)" \
|
|
|
|
CFLAGS="$(BASE_CFLAGS) $(RISCV_CFLAGS)" \
|
|
|
|
CPPFLAGS='-nostdinc -I$(call SHESCAPE,$(SRCDIR))/../freestanding-headers' \
|
|
|
|
ARCH=riscv64
|
|
|
|
|
|
|
|
$(call MKESCAPE,$(BUILDDIR))/linker_nomap.ld: linker_uefi_riscv64.ld.in
|
|
|
|
$(MKDIR_P) '$(call SHESCAPE,$(BUILDDIR))'
|
|
|
|
$(CC_FOR_TARGET) -x c -E -P -undef -DLINKER_NOMAP linker_uefi_riscv64.ld.in -o '$(call SHESCAPE,$(BUILDDIR))/linker_nomap.ld'
|
|
|
|
|
2023-06-12 06:57:47 +03:00
|
|
|
$(call MKESCAPE,$(BUILDDIR))/limine_nomap.elf: $(call MKESCAPE,$(BUILDDIR))/limine-efi/gnuefi/crt0-efi-riscv64.S.o $(call MKESCAPE,$(BUILDDIR))/limine-efi/gnuefi/reloc_riscv64.c.o $(OBJ) ../libgcc-binaries/libgcc-riscv64-softfloat.a
|
2023-06-04 02:36:06 +03:00
|
|
|
$(MAKE) '$(call SHESCAPE,$(BUILDDIR))/linker_nomap.ld'
|
|
|
|
$(LD_FOR_TARGET) \
|
|
|
|
-T'$(call SHESCAPE,$(BUILDDIR))/linker_nomap.ld' \
|
|
|
|
'$(call OBJESCAPE,$^)' $(LDFLAGS_FOR_TARGET) -o '$(call SHESCAPE,$@)'
|
|
|
|
|
|
|
|
$(call MKESCAPE,$(BUILDDIR))/linker.ld: linker_uefi_riscv64.ld.in
|
|
|
|
$(MKDIR_P) '$(call SHESCAPE,$(BUILDDIR))'
|
|
|
|
$(CC_FOR_TARGET) -x c -E -P -undef linker_uefi_riscv64.ld.in -o '$(call SHESCAPE,$(BUILDDIR))/linker.ld'
|
|
|
|
|
2023-06-12 06:57:47 +03:00
|
|
|
$(call MKESCAPE,$(BUILDDIR))/limine.elf: $(call MKESCAPE,$(BUILDDIR))/limine-efi/gnuefi/crt0-efi-riscv64.S.o $(call MKESCAPE,$(BUILDDIR))/limine-efi/gnuefi/reloc_riscv64.c.o $(OBJ) ../libgcc-binaries/libgcc-riscv64-softfloat.a $(call MKESCAPE,$(BUILDDIR))/full.map.o
|
2023-06-04 02:36:06 +03:00
|
|
|
$(MAKE) '$(call SHESCAPE,$(BUILDDIR))/linker.ld'
|
|
|
|
$(LD_FOR_TARGET) \
|
|
|
|
-T'$(call SHESCAPE,$(BUILDDIR))/linker.ld' \
|
|
|
|
'$(call OBJESCAPE,$^)' $(LDFLAGS_FOR_TARGET) -o '$(call SHESCAPE,$@)'
|
|
|
|
endif
|
|
|
|
|
2022-08-15 18:41:04 +03:00
|
|
|
ifeq ($(TARGET),uefi-ia32)
|
2021-07-20 14:35:43 +03:00
|
|
|
|
2022-02-03 12:38:43 +03:00
|
|
|
$(call MKESCAPE,$(BUILDDIR))/full.map.o: $(call MKESCAPE,$(BUILDDIR))/limine_nomap.elf
|
2021-11-28 21:00:49 +03:00
|
|
|
cd '$(call SHESCAPE,$(BUILDDIR))' && \
|
2022-04-25 00:30:28 +03:00
|
|
|
'$(call SHESCAPE,$(SRCDIR))/gensyms.sh' '$(call SHESCAPE,$<)' full 32 '\.text'
|
2023-03-16 04:28:50 +03:00
|
|
|
$(CC_FOR_TARGET) $(CFLAGS_FOR_TARGET) $(CPPFLAGS_FOR_TARGET) -c '$(call SHESCAPE,$(BUILDDIR))/full.map.S' -o '$(call SHESCAPE,$@)'
|
2022-08-13 21:32:06 +03:00
|
|
|
rm -f '$(call SHESCAPE,$(BUILDDIR))/full.map.S' '$(call SHESCAPE,$(BUILDDIR))/full.map.d'
|
2021-07-20 14:35:43 +03:00
|
|
|
|
2022-02-03 12:38:43 +03:00
|
|
|
$(call MKESCAPE,$(BUILDDIR))/BOOTIA32.EFI: $(call MKESCAPE,$(BUILDDIR))/limine.elf
|
2023-03-16 04:28:50 +03:00
|
|
|
$(OBJCOPY_FOR_TARGET) -O binary '$(call SHESCAPE,$<)' '$(call SHESCAPE,$@)'
|
2023-06-15 02:33:17 +03:00
|
|
|
chmod -x '$(call SHESCAPE,$@)'
|
2021-07-20 14:35:43 +03:00
|
|
|
|
2023-06-12 06:57:47 +03:00
|
|
|
$(call MKESCAPE,$(BUILDDIR))/limine-efi/gnuefi/crt0-efi-ia32.S.o $(call MKESCAPE,$(BUILDDIR))/limine-efi/gnuefi/reloc_ia32.c.o: $(call MKESCAPE,$(BUILDDIR))/limine-efi
|
2022-06-14 06:58:34 +03:00
|
|
|
$(MAKE) -C '$(call SHESCAPE,$(BUILDDIR))/limine-efi/gnuefi' \
|
2023-03-16 04:28:50 +03:00
|
|
|
CC="$(CC_FOR_TARGET)" \
|
2022-09-02 12:01:13 +03:00
|
|
|
CFLAGS="$(BASE_CFLAGS)" \
|
|
|
|
CPPFLAGS='-nostdinc -I$(call SHESCAPE,$(SRCDIR))/../freestanding-headers' \
|
2022-01-17 02:20:59 +03:00
|
|
|
ARCH=ia32
|
2021-07-20 14:35:43 +03:00
|
|
|
|
2022-06-15 04:25:36 +03:00
|
|
|
$(call MKESCAPE,$(BUILDDIR))/linker_nomap.ld: linker_uefi_ia32.ld.in
|
2022-08-08 23:00:25 +03:00
|
|
|
$(MKDIR_P) '$(call SHESCAPE,$(BUILDDIR))'
|
2023-03-16 04:28:50 +03:00
|
|
|
$(CC_FOR_TARGET) -x c -E -P -undef -DLINKER_NOMAP linker_uefi_ia32.ld.in -o '$(call SHESCAPE,$(BUILDDIR))/linker_nomap.ld'
|
2022-02-02 20:18:49 +03:00
|
|
|
|
2023-06-12 06:57:47 +03:00
|
|
|
$(call MKESCAPE,$(BUILDDIR))/limine_nomap.elf: $(call MKESCAPE,$(BUILDDIR))/limine-efi/gnuefi/crt0-efi-ia32.S.o $(call MKESCAPE,$(BUILDDIR))/limine-efi/gnuefi/reloc_ia32.c.o $(OBJ) ../libgcc-binaries/libgcc-i686.a
|
2022-02-02 20:18:49 +03:00
|
|
|
$(MAKE) '$(call SHESCAPE,$(BUILDDIR))/linker_nomap.ld'
|
2023-03-16 04:28:50 +03:00
|
|
|
$(LD_FOR_TARGET) \
|
2022-02-02 20:18:49 +03:00
|
|
|
-T'$(call SHESCAPE,$(BUILDDIR))/linker_nomap.ld' \
|
2023-03-16 04:28:50 +03:00
|
|
|
'$(call OBJESCAPE,$^)' $(LDFLAGS_FOR_TARGET) -o '$(call SHESCAPE,$@)'
|
2021-07-20 14:35:43 +03:00
|
|
|
|
2022-06-15 04:25:36 +03:00
|
|
|
$(call MKESCAPE,$(BUILDDIR))/linker.ld: linker_uefi_ia32.ld.in
|
2022-08-08 23:00:25 +03:00
|
|
|
$(MKDIR_P) '$(call SHESCAPE,$(BUILDDIR))'
|
2023-03-16 04:28:50 +03:00
|
|
|
$(CC_FOR_TARGET) -x c -E -P -undef linker_uefi_ia32.ld.in -o '$(call SHESCAPE,$(BUILDDIR))/linker.ld'
|
2022-02-02 20:18:49 +03:00
|
|
|
|
2023-06-12 06:57:47 +03:00
|
|
|
$(call MKESCAPE,$(BUILDDIR))/limine.elf: $(call MKESCAPE,$(BUILDDIR))/limine-efi/gnuefi/crt0-efi-ia32.S.o $(call MKESCAPE,$(BUILDDIR))/limine-efi/gnuefi/reloc_ia32.c.o $(OBJ) ../libgcc-binaries/libgcc-i686.a $(call MKESCAPE,$(BUILDDIR))/full.map.o
|
2022-02-02 20:18:49 +03:00
|
|
|
$(MAKE) '$(call SHESCAPE,$(BUILDDIR))/linker.ld'
|
2023-03-16 04:28:50 +03:00
|
|
|
$(LD_FOR_TARGET) \
|
2022-02-02 20:18:49 +03:00
|
|
|
-T'$(call SHESCAPE,$(BUILDDIR))/linker.ld' \
|
2023-03-16 04:28:50 +03:00
|
|
|
'$(call OBJESCAPE,$^)' $(LDFLAGS_FOR_TARGET) -o '$(call SHESCAPE,$@)'
|
2021-07-20 14:35:43 +03:00
|
|
|
|
|
|
|
endif
|
|
|
|
|
2020-09-21 13:46:42 +03:00
|
|
|
-include $(HEADER_DEPS)
|
|
|
|
|
2022-08-15 18:41:04 +03:00
|
|
|
ifeq ($(TARGET),uefi-x86-64)
|
2023-05-03 20:36:47 +03:00
|
|
|
$(call MKESCAPE,$(BUILDDIR))/%.o: %.c $(call MKESCAPE,$(BUILDDIR))/limine-efi
|
2022-08-08 23:00:25 +03:00
|
|
|
$(MKDIR_P) "$$(dirname '$(call SHESCAPE,$@)')"
|
2023-03-16 04:28:50 +03:00
|
|
|
$(CC_FOR_TARGET) $(CFLAGS_FOR_TARGET) $(CPPFLAGS_FOR_TARGET) -c '$(call SHESCAPE,$<)' -o '$(call SHESCAPE,$@)'
|
2021-09-21 16:02:37 +03:00
|
|
|
endif
|
|
|
|
|
2022-08-31 01:40:59 +03:00
|
|
|
ifeq ($(TARGET),uefi-aarch64)
|
2023-05-03 20:36:47 +03:00
|
|
|
$(call MKESCAPE,$(BUILDDIR))/%.o: %.c $(call MKESCAPE,$(BUILDDIR))/limine-efi
|
2022-08-18 18:32:54 +03:00
|
|
|
$(MKDIR_P) "$$(dirname '$(call SHESCAPE,$@)')"
|
2023-03-16 04:28:50 +03:00
|
|
|
$(CC_FOR_TARGET) $(CFLAGS_FOR_TARGET) $(CPPFLAGS_FOR_TARGET) -c '$(call SHESCAPE,$<)' -o '$(call SHESCAPE,$@)'
|
2022-08-18 18:32:54 +03:00
|
|
|
endif
|
|
|
|
|
2023-06-04 02:36:06 +03:00
|
|
|
ifeq ($(TARGET),uefi-riscv64)
|
|
|
|
$(call MKESCAPE,$(BUILDDIR))/%.o: %.c $(call MKESCAPE,$(BUILDDIR))/limine-efi
|
|
|
|
$(MKDIR_P) "$$(dirname '$(call SHESCAPE,$@)')"
|
|
|
|
$(CC_FOR_TARGET) $(CFLAGS_FOR_TARGET) $(CPPFLAGS_FOR_TARGET) -c '$(call SHESCAPE,$<)' -o '$(call SHESCAPE,$@)'
|
|
|
|
endif
|
|
|
|
|
2022-08-15 18:41:04 +03:00
|
|
|
ifeq ($(TARGET),uefi-ia32)
|
2023-05-03 20:36:47 +03:00
|
|
|
$(call MKESCAPE,$(BUILDDIR))/%.o: %.c $(call MKESCAPE,$(BUILDDIR))/limine-efi
|
2022-08-08 23:00:25 +03:00
|
|
|
$(MKDIR_P) "$$(dirname '$(call SHESCAPE,$@)')"
|
2023-03-16 04:28:50 +03:00
|
|
|
$(CC_FOR_TARGET) $(CFLAGS_FOR_TARGET) $(CPPFLAGS_FOR_TARGET) -c '$(call SHESCAPE,$<)' -o '$(call SHESCAPE,$@)'
|
2021-09-21 16:02:37 +03:00
|
|
|
endif
|
|
|
|
|
2022-08-15 18:41:04 +03:00
|
|
|
ifeq ($(TARGET),bios)
|
2023-05-03 20:36:47 +03:00
|
|
|
$(call MKESCAPE,$(BUILDDIR))/%.o: %.c
|
2022-08-08 23:00:25 +03:00
|
|
|
$(MKDIR_P) "$$(dirname '$(call SHESCAPE,$@)')"
|
2023-03-16 04:28:50 +03:00
|
|
|
$(CC_FOR_TARGET) $(CFLAGS_FOR_TARGET) $(CPPFLAGS_FOR_TARGET) -c '$(call SHESCAPE,$<)' -o '$(call SHESCAPE,$@)'
|
2021-09-21 16:02:37 +03:00
|
|
|
endif
|
2020-01-22 01:45:13 +03:00
|
|
|
|
2021-03-13 11:48:11 +03:00
|
|
|
-include $(HEADER_DEPS)
|
|
|
|
|
2022-08-15 18:41:04 +03:00
|
|
|
ifeq ($(TARGET),bios)
|
2021-11-28 21:00:49 +03:00
|
|
|
$(call MKESCAPE,$(BUILDDIR))/%.s2.o: %.s2.c
|
2022-08-08 23:00:25 +03:00
|
|
|
$(MKDIR_P) "$$(dirname '$(call SHESCAPE,$@)')"
|
2023-03-16 04:28:50 +03:00
|
|
|
$(CC_FOR_TARGET) $(CFLAGS_FOR_TARGET) $(S2CFLAGS) $(CPPFLAGS_FOR_TARGET) -c '$(call SHESCAPE,$<)' -o '$(call SHESCAPE,$@)'
|
2021-03-05 01:12:40 +03:00
|
|
|
endif
|
|
|
|
|
2021-03-13 11:48:11 +03:00
|
|
|
-include $(HEADER_DEPS)
|
|
|
|
|
2022-08-15 18:41:04 +03:00
|
|
|
ifeq ($(TARGET),bios)
|
2022-06-15 04:25:36 +03:00
|
|
|
$(call MKESCAPE,$(BUILDDIR))/%.o: %.asm_ia32
|
2022-08-08 23:00:25 +03:00
|
|
|
$(MKDIR_P) "$$(dirname '$(call SHESCAPE,$@)')"
|
2023-04-18 13:41:01 +03:00
|
|
|
nasm '$(call SHESCAPE,$<)' -F dwarf -g -Wall $(WERROR_FLAG) -f elf32 -o '$(call SHESCAPE,$@)'
|
2021-10-22 16:45:47 +03:00
|
|
|
|
2022-06-15 04:25:36 +03:00
|
|
|
$(call MKESCAPE,$(BUILDDIR))/%.o: %.asm_bios_ia32
|
2022-08-08 23:00:25 +03:00
|
|
|
$(MKDIR_P) "$$(dirname '$(call SHESCAPE,$@)')"
|
2023-04-18 13:41:01 +03:00
|
|
|
nasm '$(call SHESCAPE,$<)' -F dwarf -g -Wall $(WERROR_FLAG) -f elf32 -o '$(call SHESCAPE,$@)'
|
2022-06-28 09:47:40 +03:00
|
|
|
|
|
|
|
$(call MKESCAPE,$(BUILDDIR))/%.o: %.asm_x86
|
2022-08-08 23:00:25 +03:00
|
|
|
$(MKDIR_P) "$$(dirname '$(call SHESCAPE,$@)')"
|
2023-04-18 13:41:01 +03:00
|
|
|
nasm '$(call SHESCAPE,$<)' -F dwarf -g -Wall $(WERROR_FLAG) -f elf32 -o '$(call SHESCAPE,$@)'
|
2021-07-06 00:28:04 +03:00
|
|
|
endif
|
2021-03-13 11:48:11 +03:00
|
|
|
|
2022-08-15 18:41:04 +03:00
|
|
|
ifeq ($(TARGET),uefi-x86-64)
|
2022-06-15 04:25:36 +03:00
|
|
|
$(call MKESCAPE,$(BUILDDIR))/%.o: %.asm_x86_64
|
2022-08-08 23:00:25 +03:00
|
|
|
$(MKDIR_P) "$$(dirname '$(call SHESCAPE,$@)')"
|
2023-04-18 13:41:01 +03:00
|
|
|
nasm '$(call SHESCAPE,$<)' -F dwarf -g -Wall $(WERROR_FLAG) -f elf64 -o '$(call SHESCAPE,$@)'
|
2021-10-22 16:45:47 +03:00
|
|
|
|
2022-06-15 04:25:36 +03:00
|
|
|
$(call MKESCAPE,$(BUILDDIR))/%.o: %.asm_uefi_x86_64
|
2022-08-08 23:00:25 +03:00
|
|
|
$(MKDIR_P) "$$(dirname '$(call SHESCAPE,$@)')"
|
2023-04-18 13:41:01 +03:00
|
|
|
nasm '$(call SHESCAPE,$<)' -F dwarf -g -Wall $(WERROR_FLAG) -f elf64 -o '$(call SHESCAPE,$@)'
|
2022-06-28 09:47:40 +03:00
|
|
|
|
|
|
|
$(call MKESCAPE,$(BUILDDIR))/%.o: %.asm_x86
|
2022-08-08 23:00:25 +03:00
|
|
|
$(MKDIR_P) "$$(dirname '$(call SHESCAPE,$@)')"
|
2023-04-18 13:41:01 +03:00
|
|
|
nasm '$(call SHESCAPE,$<)' -F dwarf -g -Wall $(WERROR_FLAG) -f elf64 -o '$(call SHESCAPE,$@)'
|
2021-07-06 00:28:04 +03:00
|
|
|
endif
|
2020-09-04 02:37:24 +03:00
|
|
|
|
2022-08-31 01:40:59 +03:00
|
|
|
ifeq ($(TARGET),uefi-aarch64)
|
2022-08-18 18:32:54 +03:00
|
|
|
$(call MKESCAPE,$(BUILDDIR))/%.o: %.asm_aarch64
|
|
|
|
$(MKDIR_P) "$$(dirname '$(call SHESCAPE,$@)')"
|
2023-03-16 04:28:50 +03:00
|
|
|
$(CC_FOR_TARGET) $(CFLAGS_FOR_TARGET) $(CPPFLAGS_FOR_TARGET) -x assembler-with-cpp -c '$(call SHESCAPE,$<)' -o '$(call SHESCAPE,$@)'
|
2022-08-18 18:32:54 +03:00
|
|
|
|
|
|
|
$(call MKESCAPE,$(BUILDDIR))/%.o: %.asm_uefi_aarch64
|
|
|
|
$(MKDIR_P) "$$(dirname '$(call SHESCAPE,$@)')"
|
2023-03-16 04:28:50 +03:00
|
|
|
$(CC_FOR_TARGET) $(CFLAGS_FOR_TARGET) $(CPPFLAGS_FOR_TARGET) -x assembler-with-cpp -c '$(call SHESCAPE,$<)' -o '$(call SHESCAPE,$@)'
|
2022-08-18 18:32:54 +03:00
|
|
|
endif
|
|
|
|
|
2023-06-04 02:36:06 +03:00
|
|
|
ifeq ($(TARGET),uefi-riscv64)
|
|
|
|
$(call MKESCAPE,$(BUILDDIR))/%.o: %.asm_riscv64
|
|
|
|
$(MKDIR_P) "$$(dirname '$(call SHESCAPE,$@)')"
|
|
|
|
$(CC_FOR_TARGET) $(CFLAGS_FOR_TARGET) $(CPPFLAGS_FOR_TARGET) -x assembler-with-cpp -c '$(call SHESCAPE,$<)' -o '$(call SHESCAPE,$@)'
|
|
|
|
|
|
|
|
$(call MKESCAPE,$(BUILDDIR))/%.o: %.asm_uefi_riscv64
|
|
|
|
$(MKDIR_P) "$$(dirname '$(call SHESCAPE,$@)')"
|
|
|
|
$(CC_FOR_TARGET) $(CFLAGS_FOR_TARGET) $(CPPFLAGS_FOR_TARGET) -x assembler-with-cpp -c '$(call SHESCAPE,$<)' -o '$(call SHESCAPE,$@)'
|
|
|
|
endif
|
|
|
|
|
2022-08-15 18:41:04 +03:00
|
|
|
ifeq ($(TARGET),uefi-ia32)
|
2022-06-15 04:25:36 +03:00
|
|
|
$(call MKESCAPE,$(BUILDDIR))/%.o: %.asm_ia32
|
2022-08-08 23:00:25 +03:00
|
|
|
$(MKDIR_P) "$$(dirname '$(call SHESCAPE,$@)')"
|
2023-04-18 13:41:01 +03:00
|
|
|
nasm '$(call SHESCAPE,$<)' -F dwarf -g -Wall $(WERROR_FLAG) -f elf32 -o '$(call SHESCAPE,$@)'
|
2021-10-22 16:45:47 +03:00
|
|
|
|
2022-06-15 04:25:36 +03:00
|
|
|
$(call MKESCAPE,$(BUILDDIR))/%.o: %.asm_uefi_ia32
|
2022-08-08 23:00:25 +03:00
|
|
|
$(MKDIR_P) "$$(dirname '$(call SHESCAPE,$@)')"
|
2023-04-18 13:41:01 +03:00
|
|
|
nasm '$(call SHESCAPE,$<)' -F dwarf -g -Wall $(WERROR_FLAG) -f elf32 -o '$(call SHESCAPE,$@)'
|
2022-06-28 09:47:40 +03:00
|
|
|
|
|
|
|
$(call MKESCAPE,$(BUILDDIR))/%.o: %.asm_x86
|
2022-08-08 23:00:25 +03:00
|
|
|
$(MKDIR_P) "$$(dirname '$(call SHESCAPE,$@)')"
|
2023-04-18 13:41:01 +03:00
|
|
|
nasm '$(call SHESCAPE,$<)' -F dwarf -g -Wall $(WERROR_FLAG) -f elf32 -o '$(call SHESCAPE,$@)'
|
2021-07-20 14:35:43 +03:00
|
|
|
endif
|