X-Git-Url: https://code.delx.au/refind/blobdiff_plain/e07b72471fa62945801b4a4e3bcac662a1b4888d..cc81100ca9d8e17fffcbffc85bd401fcbe445038:/Makefile diff --git a/Makefile b/Makefile index c0c1e43..2292c51 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,10 @@ # Makefile for rEFInd -CC=gcc -CXX=g++ + +# 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 . + CXXFLAGS=-O2 -fpic -D_REENTRANT -D_GNU_SOURCE -Wall -g NAMES=refind SRCS=$(NAMES:=.c) @@ -13,12 +17,32 @@ MOK_DIR=mok GPTSYNC_DIR=gptsync EFILIB_DIR=EfiLib +export EDK2BASE = /usr/local/UDK2014/MyWorkSpace +export GENFW = $(EDK2BASE)/BaseTools/Source/C/bin/GenFw +export prefix = /usr/bin/ +ifeq ($(ARCH),aarch64) + export CC = $(prefix)aarch64-linux-gnu-gcc + export AS = $(prefix)aarch64-linux-gnu-as + export LD = $(prefix)aarch64-linux-gnu-ld + export AR = $(prefix)aarch64-linux-gnu-ar + export RANLIB = $(prefix)aarch64-linux-gnu-ranlib + export OBJCOPY = $(prefix)aarch64-linux-gnu-objcopy +else + export CC = $(prefix)gcc + export AS = $(prefix)as + export LD = $(prefix)ld + export AR = $(prefix)ar + export RANLIB = $(prefix)ranlib + export OBJCOPY = $(prefix)objcopy +endif + # Build rEFInd, including libeg all: tiano gnuefi: +make -C $(LIBEG_DIR) +make -C $(MOK_DIR) + +make -C $(EFILIB_DIR) +make -C $(LOADER_DIR) +make -C $(GPTSYNC_DIR) gnuefi # +make -C $(FS_DIR) all_gnuefi @@ -34,8 +58,16 @@ tiano: +make AR_TARGET=libeg -C $(LIBEG_DIR) -f Make.tiano +make AR_TARGET=mok -C $(MOK_DIR) -f Make.tiano +make BUILDME=refind DLL_TARGET=refind -C $(LOADER_DIR) -f Make.tiano +ifneq ($(ARCH),aarch64) +make -C $(GPTSYNC_DIR) -f Make.tiano - +make -C $(FS_DIR) +endif +# +make -C $(FS_DIR) + +gptsync: + +make -C $(GPTSYNC_DIR) -f Make.tiano + +gptsync_gnuefi: + +make -C $(GPTSYNC_DIR) gnuefi clean: make -C $(LIBEG_DIR) clean @@ -53,10 +85,10 @@ clean: # binary packages (RPMs, Debian packages, etc.). (Gentoo could # use it in an ebuild, though....) You COULD, however, copy the # files to a directory somewhere (/usr/share/refind or whatever) -# and then call install.sh as part of the binary package +# and then call refind-install as part of the binary package # installation process. install: - ./install.sh + ./refind-install # DO NOT DELETE