]> code.delx.au - refind/blobdiff - refind/Makefile
Merge remote-tracking branch 'tianon/master'
[refind] / refind / Makefile
index 970c0ab23cd46fef02c132502ebacc785ed90f8d..2098554725148f6f66c10a1c07ba3b423628c0b4 100644 (file)
@@ -21,20 +21,29 @@ ifeq ($(ARCH),x86_64)
   TARGET = refind_x64.efi
 endif
 
-LOCAL_CPPFLAGS  = -I$(SRCDIR) -I$(SRCDIR)/../include -I$(SRCDIR)/../libeg
-#LOCAL_LDFLAGS   = -L$(SRCDIR)/../libeg/$(LIBEG)
-LOCAL_LDFLAGS   = -L$(SRCDIR)/../libeg/
-LOCAL_LIBS      = -leg
+ifeq ($(ARCH),aarch64)
+  LIBEG = build
+  TARGET = refind_aa64.efi
+endif
+
+LOCAL_CPPFLAGS  = -I$(SRCDIR) -I$(SRCDIR)/../include -I$(SRCDIR)/../libeg -I$(SRCDIR)/../mok
+LOCAL_LDFLAGS   = -L$(SRCDIR)/../libeg/ -L$(SRCDIR)/../mok/ -L$(SRCDIR)/../EfiLib/
+LOCAL_LIBS      = -leg -lmok -lEfiLib
 
-OBJS            = main.o config.o menu.o screen.o icns.o lib.o driver_support.o
+OBJS            = main.o mystrings.o apple.o line_edit.o config.o menu.o screen.o icns.o gpt.o crc32.o lib.o driver_support.o legacy.o
 
 all: $(TARGET)
 
 include $(SRCDIR)/../Make.common
 
+$(SHLIB_TARGET): $(OBJS)
+       $(LD) $(LOCAL_LDFLAGS) $(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) $< $@
+                  -j .rela -j .rel.* -j .rela.* -j .rel* -j .rela* \
+                  -j .reloc $(FORMAT) $< $@
+       chmod a-x $(TARGET)
 
 # EOF
 # DO NOT DELETE