-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
105 lines (90 loc) · 3.13 KB
/
Copy pathMakefile
File metadata and controls
105 lines (90 loc) · 3.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
# Makefile for rEFInd
# 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/>.
LOADER_DIR=refind
FS_DIR=filesystems
LIBEG_DIR=libeg
MOK_DIR=mok
GPTSYNC_DIR=gptsync
EFILIB_DIR=EfiLib
export EDK2BASE=/usr/local/UDK2014/MyWorkSpace
export REFIND_VERSION='L"0.10.7"'
# The "all" target builds with the TianoCore library if possible, but falls
# back on the more easily-installed GNU-EFI library if TianoCore isn't
# installed at $(EDK2BASE)
all:
ifneq ($(wildcard $(EDK2BASE)/*),)
@echo "Found $(EDK2BASE); building with TianoCore"
+make tiano
else
@echo "Did not find $(EDK2BASE); building with GNU-EFI"
+make gnuefi
endif
# The "fs" target, like "all," attempts to build with TianoCore but falls
# back to GNU-EFI.
fs:
ifneq ($(wildcard $(EDK2BASE)/*),)
@echo "Found $(EDK2BASE); building with TianoCore"
+make fs_tiano
else
@echo "Did not find $(EDK2BASE); building with GNU-EFI"
+make fs_gnuefi
endif
# Likewise for GPTsync....
GPTsync:
ifneq ($(wildcard $(EDK2BASE)/*),)
@echo "Found $(EDK2BASE); building with TianoCore"
+make gptsync_tiano
else
@echo "Did not find $(EDK2BASE); building with GNU-EFI"
+make gptsync_gnuefi
endif
# Don't build gptsync under TianoCore by default because it errors out when
# using a cross-compiler on an x86-64 system. Because gptsync is pretty
# useless on ARM64, skipping it is no big deal....
tiano:
+make MAKEWITH=TIANO AR_TARGET=EfiLib -C $(EFILIB_DIR) -f Make.tiano
+make MAKEWITH=TIANO AR_TARGET=libeg -C $(LIBEG_DIR) -f Make.tiano
+make MAKEWITH=TIANO AR_TARGET=mok -C $(MOK_DIR) -f Make.tiano
+make MAKEWITH=TIANO BUILDME=refind DLL_TARGET=refind -C $(LOADER_DIR) -f Make.tiano
ifneq ($(ARCH),aarch64)
+make MAKEWITH=TIANO -C $(GPTSYNC_DIR) -f Make.tiano
endif
# +make MAKEWITH=TIANO -C $(FS_DIR)
gnuefi:
+make MAKEWITH=GNUEFI -C $(LIBEG_DIR)
+make MAKEWITH=GNUEFI -C $(MOK_DIR)
+make MAKEWITH=GNUEFI -C $(EFILIB_DIR)
+make MAKEWITH=GNUEFI -C $(LOADER_DIR)
+make MAKEWITH=GNUEFI -C $(GPTSYNC_DIR) gnuefi
# +make MAKEWITH=GNUEFI -C $(FS_DIR) all_gnuefi
fs_tiano:
+make MAKEWITH=TIANO -C $(FS_DIR)
fs_gnuefi:
+make MAKEWITH=GNUEFI -C $(FS_DIR) all_gnuefi
gptsync_tiano:
+make MAKEWITH=TIANO -C $(GPTSYNC_DIR) -f Make.tiano
gptsync_gnuefi:
+make MAKEWITH=GNUEFI -C $(GPTSYNC_DIR) gnuefi
clean:
make -C $(LIBEG_DIR) clean
make -C $(MOK_DIR) clean
make -C $(LOADER_DIR) clean
make -C $(EFILIB_DIR) clean
make -C $(FS_DIR) clean
make -C $(GPTSYNC_DIR) clean
rm -f include/*~
# NOTE TO DISTRIBUTION MAINTAINERS:
# The "install" target installs the program directly to the ESP
# and it modifies the *CURRENT COMPUTER's* NVRAM. Thus, you should
# *NOT* use this target as part of the build process for your
# 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 refind-install as part of the binary package
# installation process.
install:
./refind-install
# DO NOT DELETE