forked from martinezjavier/shim
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
61 lines (54 loc) · 1.68 KB
/
Makefile
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
#
# Makefile
# Peter Jones, 2019-01-23 15:35
#
default: all
EFI_ARCH ?= $(shell $(CC) -dumpmachine | cut -f1 -d- | \
sed \
-e s,aarch64,aa64, \
-e 's,arm.*,arm,' \
-e s,i[3456789]86,ia32, \
-e s,x86_64,x64, \
)
ifeq ($(MAKELEVEL),0)
TOPDIR != if [ "$$(git rev-parse --is-inside-work-tree)" = true ]; then echo ./$$(git rev-parse --show-cdup) ; else echo $(PWD) ; fi
BUILDDIR ?= $(TOPDIR)/build-$(EFI_ARCH)
endif
include $(TOPDIR)include/version.mk
export VERSION DASHRELEASE EFI_ARCH
all : | mkbuilddir
% : |
@if ! [ -d $(BUILDDIR)/ ] ; then $(MAKE) BUILDDIR=$(BUILDDIR) TOPDIR=$(TOPDIR) mkbuilddir ; fi
$(MAKE) TOPDIR=../$(TOPDIR) BUILDDIR=../$(BUILDDIR) -C $(BUILDDIR) -f Makefile $@
mkbuilddir :
@mkdir -p $(BUILDDIR)
@ln -f $(TOPDIR)/include/build.mk $(BUILDDIR)/Makefile
update :
git submodule update --init --recursive
cd $(TOPDIR)/edk2/ ; \
git submodule set-branch --branch shim-$(VERSION) CryptoPkg/Library/OpensslLib/openssl
cd $(TOPDIR) ; \
git submodule set-branch --branch shim-$(VERSION) edk2 ; \
git submodule sync --recursive
cd $(TOPDIR)/edk2/CryptoPkg/Library/OpensslLib/openssl ; \
git fetch origin ; \
git checkout shim-$(VERSION) ; \
git rebase origin/shim-$(VERSION)
cd $(TOPDIR)/edk2/CryptoPkg/Library/OpensslLib ; \
if ! git diff-index --quiet HEAD -- openssl ; then \
git commit -m "Update openssl" openssl ; \
fi
cd $(TOPDIR)/edk2 ; : \
git fetch origin ; \
git checkout shim-$(VERSION) ; \
git rebase origin/shim-$(VERSION)
cd $(TOPDIR) ; \
if ! git diff-index --quiet HEAD -- edk2 ; then \
git commit -m "Update edk2" edk2 ; \
fi
cd $(TOPDIR)/Cryptlib ; \
./update.sh
.PHONY: mkbuilddir update
.NOTPARALLEL:
# vim:ft=make
#