1#	$NetBSD: Makefile,v 1.4 2016/03/22 08:25:23 mrg Exp $
2
3LIB=	gnuefi
4LIBISPRIVATE?= yes
5
6GNUEFI_USE_CREAD?= no		# Read compressed kernels
7GNUEFI_INCLUDE_NET?= yes		# Netboot via TFTP, NFS
8GNUEFI_USE_LOADFILE?= no		# Generic executable loading support
9GNUEFI_ENABLE_LS_OP?= no		# Filesystems ls operation
10
11CPPFLAGS=	-I${GNUEFIDIR} ${GNUEFICPPFLAGS} ${GNUEFIMISCCPPFLAGS}
12
13.if ${MACHINE_ARCH} == "i386"
14GNUEFIARCH=ia32
15.else
16GNUEFIARCH=${MACHINE_ARCH}
17.endif
18
19.if defined(GNUEFI_EXTRADIR)
20.-include "${GNUEFI_EXTRADIR}/Makefile.inc"
21.endif
22
23.include <bsd.own.mk>
24
25.PATH.c: ${GNUEFIDIR} ${GNUEFIDIR}/../../external/bsd/gnu-efi/dist/lib/${GNUEFIARCH} ${GNUEFIDIR}/../../external/bsd/gnu-efi/dist/lib ${GNUEFIDIR}/../../external/bsd/gnu-efi/dist/lib/runtime
26
27SRCS+=	boxdraw.c smbios.c console.c crc.c data.c debug.c dpath.c \
28	error.c event.c guid.c hand.c hw.c init.c lock.c \
29	misc.c print.c sread.c str.c \
30	rtlock.c efirtlib.c rtstr.c vm.c rtdata.c \
31	initplat.c math.c
32
33COPTS.boxdraw.c= -Wno-missing-field-initializers
34COPTS.guid.c= -Wno-missing-field-initializers
35COPTS.smbios.c= -Wno-int-to-pointer-cast
36COPTS.dpath.c= -Wno-missing-prototypes
37COPTS.print.c= -Wno-missing-prototypes
38COPTS.hw.c= -Wno-shadow
39
40.include <bsd.lib.mk>
41
42lib${LIB}.o:: ${OBJS:O}
43	@echo building standard ${LIB} library
44	@rm -f lib${LIB}.o
45	@${LD} -r -o lib${LIB}.o `lorder ${OBJS} | tsort`
46
47CPPFLAGS+=	-Wno-pointer-sign
48