X-Git-Url: https://code.delx.au/refind/blobdiff_plain/7e41f7799b358fdd955115c904e5862cb1efc44d..e0f6b77e5692ec112bb803202ae27f8c5d55de50:/refind/Makefile diff --git a/refind/Makefile b/refind/Makefile index 50a131b..eb98140 100644 --- a/refind/Makefile +++ b/refind/Makefile @@ -7,24 +7,34 @@ 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 LOCAL_CPPFLAGS = -I$(SRCDIR) -I$(SRCDIR)/../include -I$(SRCDIR)/../libeg -LOCAL_LDFLAGS = -L$(SRCDIR)/../libeg/$(LIBEG) +#LOCAL_LDFLAGS = -L$(SRCDIR)/../libeg/$(LIBEG) +LOCAL_LDFLAGS = -L$(SRCDIR)/../libeg/ LOCAL_LIBS = -leg -OBJS = main.o config.o menu.o screen.o icns.o lib.o driver_support.o -TARGET = refind.efi +OBJS = main.o config.o menu.o screen.o icns.o lib.o mok.o driver_support.o all: $(TARGET) include $(SRCDIR)/../Make.common +$(TARGET): $(SHLIB_TARGET) + $(OBJCOPY) -j .text -j .sdata -j .data -j .dynamic -j .dynsym -j .rel \ + -j .rela -j .reloc --target=$(FORMAT) $< $@ + # EOF # DO NOT DELETE