]> code.delx.au - refind/blobdiff - refind/Makefile
More documentation of copyrights and licenses.
[refind] / refind / Makefile
index 506ee116928b5c3b91b72e4fba4a3dd155a33d0b..6fe0b5bcd4790e9efc5e443e0c57c2fc6a2b2e99 100644 (file)
@@ -2,6 +2,10 @@
 # refind/Makefile
 # Build control file for the rEFInd boot menu
 #
+# 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 <http://www.gnu.org/licenses/>.
 
 SRCDIR = .
 
@@ -21,20 +25,28 @@ ifeq ($(ARCH),x86_64)
   TARGET = refind_x64.efi
 endif
 
+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/
-LOCAL_LIBS      = -leg -lmok
+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 gpt.o lib.o driver_support.o
-#OBJS            = main.o config.o menu.o screen.o icns.o lib.o mok.o driver_support.o variables.o sha256.o pecoff.o simple_file.o security_policy.o guid.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