X-Git-Url: https://code.delx.au/refind/blobdiff_plain/9b877e67c541f1c08950930a0ad8e0c6ee2ea2e9..63072e911e51d8960638fb086fc8ff0fe62ebc9d:/filesystems/Make.gnuefi diff --git a/filesystems/Make.gnuefi b/filesystems/Make.gnuefi index 1c7e950..6eab253 100644 --- a/filesystems/Make.gnuefi +++ b/filesystems/Make.gnuefi @@ -3,6 +3,11 @@ # Build control file for the EFI drivers, as built with GNU-EFI # +# This program is licensed under the terms of the GNU GPL, version 3, +# or (at your option) any later version. +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + SRCDIR = . VPATH = $(SRCDIR) @@ -19,7 +24,7 @@ endif ifeq ($(ARCH),ia32) LIBEG = build32 - ARCH_C_FLAGS = -m32 -malign-double + ARCH_C_FLAGS = -m32 FILENAME_CODE = ia32 LD_CODE = elf_i386 endif @@ -31,6 +36,14 @@ ifeq ($(ARCH),x86_64) LD_CODE = elf_x86_64 endif +ifeq ($(ARCH),aarch64) + LIBEG = build64 + ARCH_C_FLAGS = + FILENAME_CODE = aa64 + LD_CODE = elf_aarch64 + FORMAT_DRIVER = -O binary +endif + LOCAL_CPPFLAGS = -DFSTYPE=$(DRIVERNAME) $(ARCH_C_FLAGS) -I$(SRCDIR) -I$(SRCDIR)/../include -I$(SRCDIR)/../libeg OBJS = fsw_core.o fsw_efi.o fsw_efi_lib.o fsw_lib.o fsw_$(DRIVERNAME).o @@ -40,10 +53,15 @@ all: $(TARGET) include $(SRCDIR)/../Make.common +$(SHLIB_TARGET): $(OBJS) + $(LD) $(LOCAL_LDFLAGS) $(DRV_LDFLAGS) $(OBJS) -o $@ $(LOCAL_LIBS) $(LIBS) + $(TARGET): $(SHLIB_TARGET) $(OBJCOPY) -j .text -j .sdata -j .data -j .dynamic -j .dynsym -j .rel \ - -j .rela -j .reloc --target=$(FORMAT_DRIVER) $< $@ + -j .rela -j .rel.* -j .rela.* -j .rel* -j .rela* \ + -j .reloc $(FORMAT_DRIVER) $< $@ chmod a-x $(TARGET) + mkdir -p ../drivers_$(FILENAME_CODE) cp $(TARGET) ../drivers_$(FILENAME_CODE) # EOF