mirror of
https://github.com/limine-bootloader/limine
synced 2025-03-14 13:32:56 +03:00
build: Add more granular configure options
This commit is contained in:
parent
e898ef0425
commit
92eef3feec
@ -17,6 +17,9 @@ override PATH := @PATH@
|
||||
export PATH
|
||||
|
||||
override BUILD_ELTORITO_EFI := @BUILD_ELTORITO_EFI@
|
||||
override BUILD_PXE := @BUILD_PXE@
|
||||
override BUILD_CD := @BUILD_CD@
|
||||
override BUILD_LIMINE_INSTALL := @BUILD_LIMINE_INSTALL@
|
||||
|
||||
WERROR ?= @WERROR@
|
||||
export WERROR
|
||||
@ -77,7 +80,7 @@ export LIMINE_COPYRIGHT
|
||||
override STAGE1_FILES := $(shell find '$(call SHESCAPE,$(SRCDIR))/stage1' -type f -name '*.asm')
|
||||
|
||||
.PHONY: all
|
||||
all: limine-uefi limine-bios
|
||||
all: @BUILD_UEFI@ @BUILD_BIOS@
|
||||
|
||||
.PHONY: limine-hdd.h
|
||||
limine-hdd.h: $(call MKESCAPE,$(BINDIR))/limine-hdd.h
|
||||
@ -125,15 +128,21 @@ uninstall:
|
||||
$(call MKESCAPE,$(BUILDDIR))/stage1.stamp: $(STAGE1_FILES) $(call MKESCAPE,$(BUILDDIR))/decompressor-build/decompressor.bin $(call MKESCAPE,$(BUILDDIR))/common-bios/stage2.bin.gz
|
||||
mkdir -p '$(call SHESCAPE,$(BINDIR))'
|
||||
cd '$(call SHESCAPE,$(SRCDIR))/stage1/hdd' && nasm bootsect.asm @WERROR@ -fbin -DBUILDDIR="'"'$(call NASMESCAPE,$(BUILDDIR))'"'" -o '$(call SHESCAPE,$(BINDIR))/limine-hdd.bin'
|
||||
ifneq ($(BUILD_CD), no)
|
||||
cd '$(call SHESCAPE,$(SRCDIR))/stage1/cd' && nasm bootsect.asm @WERROR@ -fbin -DBUILDDIR="'"'$(call NASMESCAPE,$(BUILDDIR))'"'" -o '$(call SHESCAPE,$(BINDIR))/limine-cd.bin'
|
||||
endif
|
||||
ifneq ($(BUILD_PXE), no)
|
||||
cd '$(call SHESCAPE,$(SRCDIR))/stage1/pxe' && nasm bootsect.asm @WERROR@ -fbin -DBUILDDIR="'"'$(call NASMESCAPE,$(BUILDDIR))'"'" -o '$(call SHESCAPE,$(BINDIR))/limine-pxe.bin'
|
||||
endif
|
||||
cp '$(call SHESCAPE,$(BUILDDIR))/common-bios/limine.sys' '$(call SHESCAPE,$(BINDIR))/'
|
||||
touch '$(call SHESCAPE,$(BUILDDIR))/stage1.stamp'
|
||||
|
||||
.PHONY: limine-bios
|
||||
limine-bios: common-bios decompressor
|
||||
$(MAKE) '$(call SHESCAPE,$(BUILDDIR))/stage1.stamp'
|
||||
ifneq ($(BUILD_LIMINE_INSTALL), no)
|
||||
$(MAKE) limine-install
|
||||
endif
|
||||
|
||||
.PHONY: limine-eltorito-efi
|
||||
limine-eltorito-efi:
|
||||
@ -151,7 +160,7 @@ ifneq ($(BUILD_ELTORITO_EFI), no)
|
||||
endif
|
||||
|
||||
.PHONY: limine-uefi
|
||||
limine-uefi: limine-uefi32 limine-uefi64
|
||||
limine-uefi: @BUILD_UEFI32@ @BUILD_UEFI64@
|
||||
$(MAKE) limine-eltorito-efi
|
||||
|
||||
.PHONY: limine-uefi64
|
||||
|
80
configure.ac
80
configure.ac
@ -46,6 +46,86 @@ if ! test "x$GZIP_FOUND" = "xyes"; then
|
||||
AC_MSG_ERROR([gzip not found, please install gzip before configuring])
|
||||
fi
|
||||
|
||||
BUILD_BIOS="default"
|
||||
|
||||
AC_ARG_ENABLE([bios],
|
||||
AS_HELP_STRING([--disable-bios], [disable building the BIOS port]),
|
||||
BUILD_BIOS="$enableval")
|
||||
|
||||
if test "x$BUILD_BIOS" = "xno"; then
|
||||
BUILD_BIOS=""
|
||||
else
|
||||
BUILD_BIOS="limine-bios"
|
||||
fi
|
||||
|
||||
AC_SUBST(BUILD_BIOS, [$BUILD_BIOS])
|
||||
|
||||
BUILD_LIMINE_INSTALL="default"
|
||||
|
||||
AC_ARG_ENABLE([limine-install],
|
||||
AS_HELP_STRING([--disable-limine-install], [disable building limine-install]),
|
||||
BUILD_LIMINE_INSTALL="$enableval")
|
||||
|
||||
AC_SUBST(BUILD_LIMINE_INSTALL, [$BUILD_LIMINE_INSTALL])
|
||||
|
||||
BUILD_CD="default"
|
||||
|
||||
AC_ARG_ENABLE([bios-cd],
|
||||
AS_HELP_STRING([--disable-bios-cd], [disable building the BIOS CD image]),
|
||||
BUILD_CD="$enableval")
|
||||
|
||||
AC_SUBST(BUILD_CD, [$BUILD_CD])
|
||||
|
||||
BUILD_PXE="default"
|
||||
|
||||
AC_ARG_ENABLE([bios-pxe],
|
||||
AS_HELP_STRING([--disable-bios-pxe], [disable building the BIOS PXE image]),
|
||||
BUILD_PXE="$enableval")
|
||||
|
||||
AC_SUBST(BUILD_PXE, [$BUILD_PXE])
|
||||
|
||||
BUILD_UEFI="default"
|
||||
|
||||
AC_ARG_ENABLE([uefi],
|
||||
AS_HELP_STRING([--disable-uefi], [disable building both UEFI ports]),
|
||||
BUILD_UEFI="$enableval")
|
||||
|
||||
if test "x$BUILD_UEFI" = "xno"; then
|
||||
BUILD_UEFI=""
|
||||
else
|
||||
BUILD_UEFI="limine-uefi"
|
||||
fi
|
||||
|
||||
AC_SUBST(BUILD_UEFI, [$BUILD_UEFI])
|
||||
|
||||
BUILD_UEFI32="default"
|
||||
|
||||
AC_ARG_ENABLE([uefi32],
|
||||
AS_HELP_STRING([--disable-uefi32], [disable building the 32-bit UEFI port]),
|
||||
BUILD_UEFI32="$enableval")
|
||||
|
||||
if test "x$BUILD_UEFI32" = "xno"; then
|
||||
BUILD_UEFI32=""
|
||||
else
|
||||
BUILD_UEFI32="limine-uefi32"
|
||||
fi
|
||||
|
||||
AC_SUBST(BUILD_UEFI32, [$BUILD_UEFI32])
|
||||
|
||||
BUILD_UEFI64="default"
|
||||
|
||||
AC_ARG_ENABLE([uefi64],
|
||||
AS_HELP_STRING([--disable-uefi64], [disable building the 64-bit UEFI port]),
|
||||
BUILD_UEFI64="$enableval")
|
||||
|
||||
if test "x$BUILD_UEFI64" = "xno"; then
|
||||
BUILD_UEFI64=""
|
||||
else
|
||||
BUILD_UEFI64="limine-uefi64"
|
||||
fi
|
||||
|
||||
AC_SUBST(BUILD_UEFI64, [$BUILD_UEFI64])
|
||||
|
||||
BUILD_ELTORITO_EFI="default"
|
||||
|
||||
AC_ARG_ENABLE([eltorito-efi],
|
||||
|
Loading…
x
Reference in New Issue
Block a user