blob: 1b95f589a4791205c9ee3501b78f0ff75025679f [file] [log] [blame]
Luc Verhaegen6f3fe852009-01-07 15:34:58 +01001MAKE = make
Peter Lemenkovffd1b812010-12-06 17:29:30 +01002CFLAGS ?= -g -fpack-struct -Wall -O0
Christoph Pfisterer9e038522012-09-13 15:08:32 +02003CC ?= gcc
Luc Verhaegen6f3fe852009-01-07 15:34:58 +01004
Christoph Pfisterer9e038522012-09-13 15:08:32 +02005all: bios_extract bcpvpd ami_slab xfv
Luc Verhaegen01e13002009-01-07 15:36:37 +01006
Stefan Reinauer6ed57e52010-04-24 01:15:17 +02007BIOS_EXTRACT_OBJS = lh5_extract.o ami.o award.o phoenix.o bios_extract.o compat.o
Luc Verhaegen838fe242009-06-17 00:48:02 +02008bios_extract: $(BIOS_EXTRACT_OBJS)
9 $(CC) $(CFLAGS) $(BIOS_EXTRACT_OBJS) -o bios_extract
Luc Verhaegen6f3fe852009-01-07 15:34:58 +010010
Luc Verhaegena2980652009-06-17 14:45:24 +020011BCPVPD_OBJS = lzss_extract.o bcpvpd.o
12bcpvpd: $(BCPVPD_OBJS)
13 $(CC) $(CFLAGS) $(BCPVPD_OBJS) -o bcpvpd
Luc Verhaegen1646a412009-06-16 08:22:14 +020014
Michael Karcher703c6b92010-01-14 16:23:23 +010015AMISLAB_OBJS = ami_slab.o
16ami_slab: $(AMISLAB_OBJS)
17 $(CC) $(CFLAGS) $(AMISLAB_OBJS) -o ami_slab
18
Christoph Pfisterer9e038522012-09-13 15:08:32 +020019XFV_OBJS = xfv/Decompress.o xfv/efidecomp.o
20xfv: $(XFV_OBJS)
21 $(CC) -I xfv/ $(CFLAGS) -o xfv/efidecomp $(XFV_OBJS)
22
Luc Verhaegen57741672009-06-16 23:34:21 +020023# just here to easily verify the functionality of the lh5 routine
24LH5_TEST_OBJS = lh5_extract.o lh5_test.o
25lh5_test: $(LH5_TEST_OBJS)
26 $(CC) $(CFLAGS) $(LH5_TEST_OBJS) -o lh5_test
Luc Verhaegen462b7762009-06-10 16:56:26 +020027
Denis 'GNUtoo' Cariklic615ea42017-03-01 15:27:36 +010028gitconfig:
29 [ -d .git ]
30 mkdir -p .git/hooks
31 for hook in commit-msg pre-commit ; do \
32 if [ util/gitconfig/$$hook -nt .git/hooks/$$hook -o \
33 ! -x .git/hooks/$$hook ]; then \
34 sed -e "s,%MAKE%,$(MAKE),g" util/gitconfig/$$hook > .git/hooks/$$hook; \
35 chmod +x .git/hooks/$$hook; \
36 fi; \
37 done
38 git config remote.origin.push HEAD:refs/for/master
39 (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 your.email@example.com\n'; exit 1)
40
Luc Verhaegen6f3fe852009-01-07 15:34:58 +010041clean:
Luc Verhaegen1646a412009-06-16 08:22:14 +020042 rm -f *.o
Luc Verhaegen838fe242009-06-17 00:48:02 +020043 rm -f bios_extract
Luc Verhaegen57741672009-06-16 23:34:21 +020044 rm -f bcpvpd
Luc Verhaegen1646a412009-06-16 08:22:14 +020045 rm -f lh5_test
Michael Karcher703c6b92010-01-14 16:23:23 +010046 rm -f ami_slab
Christoph Pfisterer9e038522012-09-13 15:08:32 +020047 rm -f xfv/efidecomp xfv/*.o
48
Denis 'GNUtoo' Cariklic615ea42017-03-01 15:27:36 +010049.PHONY: all bios_extract bcpvpd ami_slab efidecomp lh5_test clean gitconfig