Make apps link against the local gnuefi and crt objects

Signed-off-by: Richard Hughes <richard@hughsie.com>
This commit is contained in:
Soop 2024-03-18 13:09:11 +00:00 committed by Nigel Croxon
parent e2355ed7fb
commit 13ac2e8b3f

View File

@ -46,14 +46,14 @@ CDIR=$(TOPDIR)/..
LINUX_HEADERS = /usr/src/sys/build
APPSDIR = $(LIBDIR)/gnuefi/apps
CPPFLAGS += -D__KERNEL__ -I$(LINUX_HEADERS)/include
CRTOBJS = ../gnuefi/crt0-efi-$(ARCH).o
CRTOBJS = $(TOPDIR)/$(ARCH)/gnuefi/crt0-efi-$(ARCH).o
LDSCRIPT = $(TOPDIR)/gnuefi/elf_$(ARCH)_efi.lds
ifneq (,$(findstring FreeBSD,$(OS)))
LDSCRIPT = $(TOPDIR)/gnuefi/elf_$(ARCH)_fbsd_efi.lds
endif
LDFLAGS += -shared -Bsymbolic -L../lib -L../gnuefi $(CRTOBJS)
LDFLAGS += -shared -Bsymbolic -L$(TOPDIR)/$(ARCH)/lib -L$(TOPDIR)/$(ARCH)/gnuefi $(CRTOBJS)
LOADLIBES += -lefi -lgnuefi
LOADLIBES += $(LIBGCC)