X-Git-Url: https://code.delx.au/refind/blobdiff_plain/a0bab7e95672ae7438f7fdb806b9b167a5b04e07..b04a842814ccc991ed93a52acbd7ac27768be686:/refind/Makefile diff --git a/refind/Makefile b/refind/Makefile index 844c443..88fbc40 100644 --- a/refind/Makefile +++ b/refind/Makefile @@ -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 . SRCDIR = . @@ -21,20 +25,36 @@ ifeq ($(ARCH),x86_64) TARGET = refind_x64.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 +ifeq ($(ARCH),aarch64) + LIBEG = build + TARGET = refind_aa64.efi +endif -OBJS = main.o config.o menu.o screen.o icns.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 +LOCAL_GNUEFI_CFLAGS = -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 -all: $(TARGET) +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 include $(SRCDIR)/../Make.common +all: $(TARGET) + +$(SHLIB_TARGET): $(OBJS) + $(LD) $(LOCAL_LDFLAGS) $(GNUEFI_LDFLAGS) $(SUBSYSTEM_LDFLAG) $(OBJS) \ + -o $@ $(LOCAL_LIBS) $(GNUEFI_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) + +clean: + rm -f $(TARGET) *~ *.so $(OBJS) *.efi *.obj refind_*.txt \ + refind_*.dll *.lib -# EOF -# DO NOT DELETE