3 # Build control file for the rEFInd boot menu
5 # This program is licensed under the terms of the GNU GPL, version 3,
6 # or (at your option) any later version.
7 # You should have received a copy of the GNU General Public License
8 # along with this program. If not, see <http://www.gnu.org/licenses/>.
14 ARCH
= $(shell uname
-m | sed s
,i
[3456789]86,ia32
,)
20 TARGET
= refind_ia32.efi
25 TARGET
= refind_x64.efi
28 ifeq ($(ARCH
),aarch64
)
30 TARGET
= refind_aa64.efi
33 LOCAL_CPPFLAGS
= -I
$(SRCDIR
) -I
$(SRCDIR
)/..
/include -I
$(SRCDIR
)/..
/libeg
-I
$(SRCDIR
)/..
/mok
34 LOCAL_LDFLAGS
= -L
$(SRCDIR
)/..
/libeg
/ -L
$(SRCDIR
)/..
/mok
/ -L
$(SRCDIR
)/..
/EfiLib
/
35 LOCAL_LIBS
= -leg
-lmok
-lEfiLib
37 OBJS
= main.o mystrings.o apple.o line_edit.o config.o menu.o screen.o icns.o gpt.o crc32.o lib.o driver_support.o legacy.o
41 include $(SRCDIR
)/..
/Make.common
43 $(SHLIB_TARGET
): $(OBJS
)
44 $(LD
) $(LOCAL_LDFLAGS
) $(LDFLAGS
) $(OBJS
) -o
$@
$(LOCAL_LIBS
) $(LIBS
)
46 $(TARGET
): $(SHLIB_TARGET
)
47 $(OBJCOPY
) -j .text
-j .sdata
-j .data
-j .dynamic
-j .dynsym
-j .rel \
48 -j .rela
-j .rel.
* -j .rela.
* -j .rel
* -j .rela
* \
49 -j .reloc
$(FORMAT
) $< $@