-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathMakefile
52 lines (42 loc) · 1.75 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
MAKE = make
CFLAGS ?= -g -fpack-struct -Wall -O0
CC ?= gcc
all: bios_extract bcpvpd ami_slab xfv
SRCDIR = src
BIOS_EXTRACT_OBJS = $(SRCDIR)/lh5_extract.o $(SRCDIR)/ami.o $(SRCDIR)/award.o \
$(SRCDIR)/phoenix.o $(SRCDIR)/bios_extract.o $(SRCDIR)/compat.o
bios_extract: $(BIOS_EXTRACT_OBJS)
$(CC) $(CFLAGS) $(BIOS_EXTRACT_OBJS) -o bios_extract
BCPVPD_OBJS = $(SRCDIR)/lzss_extract.o $(SRCDIR)/bcpvpd.o
bcpvpd: $(BCPVPD_OBJS)
$(CC) $(CFLAGS) $(BCPVPD_OBJS) -o bcpvpd
AMISLAB_OBJS = $(SRCDIR)/ami_slab.o
ami_slab: $(AMISLAB_OBJS)
$(CC) $(CFLAGS) $(AMISLAB_OBJS) -o ami_slab
XFV_OBJS = xfv/Decompress.o xfv/efidecomp.o
xfv: $(XFV_OBJS)
$(CC) -I xfv/ $(CFLAGS) -o xfv/efidecomp $(XFV_OBJS)
# just here to easily verify the functionality of the lh5 routine
LH5_TEST_OBJS = $(SRCDIR)/lh5_extract.o $(SRCDIR)/lh5_test.o
lh5_test: $(LH5_TEST_OBJS)
$(CC) $(CFLAGS) $(LH5_TEST_OBJS) -o lh5_test
gitconfig:
[ -d .git ]
mkdir -p .git/hooks
for hook in commit-msg pre-commit ; do \
if [ util/gitconfig/$$hook -nt .git/hooks/$$hook -o \
! -x .git/hooks/$$hook ]; then \
sed -e "s,%MAKE%,$(MAKE),g" util/gitconfig/$$hook > .git/hooks/$$hook; \
chmod +x .git/hooks/$$hook; \
fi; \
done
git config remote.origin.push HEAD:refs/for/master
(git config --global --includes user.name >/dev/null && git config --global --includes user.email >/dev/null) || (printf 'Please configure your name and email in git:\n\n git config --global user.name "Your Name Comes Here"\n git config --global user.email [email protected]\n'; exit 1)
clean:
rm -f $(SRCDIR)/*.o
rm -f bios_extract
rm -f bcpvpd
rm -f lh5_test
rm -f ami_slab
rm -f xfv/efidecomp xfv/*.o
.PHONY: all bios_extract bcpvpd ami_slab efidecomp lh5_test clean gitconfig