X-Git-Url: https://code.delx.au/refind/blobdiff_plain/6ddfd09a30d788c784840b1f6dfc3d9281b33726..37c98e1a4e30f80d6a7f7158bc27c81a1c3cac37:/refind/Makefile diff --git a/refind/Makefile b/refind/Makefile index 4c40c48..6fe0b5b 100644 --- a/refind/Makefile +++ b/refind/Makefile @@ -2,29 +2,52 @@ # 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 = . VPATH = $(SRCDIR) +ARCH = $(shell uname -m | sed s,i[3456789]86,ia32,) + +TARGET = refind.efi + ifeq ($(ARCH),ia32) LIBEG = build32 + TARGET = refind_ia32.efi endif ifeq ($(ARCH),x86_64) LIBEG = build64 + 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 -DDEBIAN_VERSION="L\"$(DEBVER)\"" -LOCAL_LDFLAGS = -L$(SRCDIR)/../libeg/$(LIBEG) -LOCAL_LIBS = -leg +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 -TARGET = refind.efi +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 .rel.* -j .rela.* -j .rel* -j .rela* \ + -j .reloc $(FORMAT) $< $@ + chmod a-x $(TARGET) + # EOF # DO NOT DELETE