[BACK]Return to Makefile CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / sys / lib / libgnuefi

File: [cvs.NetBSD.org] / src / sys / lib / libgnuefi / Makefile (download)

Revision 1.6, Fri Feb 3 17:28:58 2017 UTC (3 years, 11 months ago) by roy
Branch: MAIN
CVS Tags: tls-maxphys-base-20171202, thorpej-futex-base, thorpej-futex, prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, phil-wifi-base, phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, phil-wifi-20191119, phil-wifi-20190609, phil-wifi, pgoyette-localcount-20170426, pgoyette-localcount-20170320, pgoyette-compat-merge-20190127, pgoyette-compat-base, pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728, pgoyette-compat-0625, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315, pgoyette-compat, perseant-stdc-iso10646-base, perseant-stdc-iso10646, nick-nhusb-base-20170825, nick-nhusb-base-20170204, netbsd-9-base, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1, netbsd-9, netbsd-8-base, netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1, netbsd-8, matt-nb8-mediatek-base, matt-nb8-mediatek, jdolecek-ncq-base, jdolecek-ncq, isaki-audio2-base, isaki-audio2, is-mlppp-base, is-mlppp, bouyer-xenpvh-base2, bouyer-xenpvh-base1, bouyer-xenpvh-base, bouyer-xenpvh, bouyer-socketcan-base1, ad-namecache-base3, ad-namecache-base2, ad-namecache-base1, ad-namecache-base, ad-namecache, HEAD
Changes since 1.5: +4 -5 lines

Fix build with clang.

#	$NetBSD: Makefile,v 1.6 2017/02/03 17:28:58 roy Exp $

LIB=	gnuefi
LIBISPRIVATE?= yes

GNUEFI_USE_CREAD?= no		# Read compressed kernels
GNUEFI_INCLUDE_NET?= yes		# Netboot via TFTP, NFS
GNUEFI_USE_LOADFILE?= no		# Generic executable loading support
GNUEFI_ENABLE_LS_OP?= no		# Filesystems ls operation

GNUEFIDIST=	${GNUEFIDIR}/../../external/bsd/gnu-efi/dist

CPPFLAGS=	-I${GNUEFIDIR} ${GNUEFICPPFLAGS} ${GNUEFIMISCCPPFLAGS}

.if defined(GNUEFI_EXTRADIR)
.-include "${GNUEFI_EXTRADIR}/Makefile.inc"
.endif

.include <bsd.own.mk>

LIBGNUEFI_ARCH?=	${MACHINE_ARCH}
LIBGNUEFI_CPU?=		${MACHINE_CPU}

.if ${LIBGNUEFI_ARCH} == "i386"
GNUEFIARCH=ia32
.else
GNUEFIARCH=${LIBGNUEFI_ARCH}
.endif

.if defined(LIBGNUEFI_ARCH) && !empty(LIBGNUEFI_ARCH) && \
	    exists(${GNUEFIDIR}/arch/${LIBGNUEFI_ARCH})
ARCHSUBDIR=	${LIBGNUEFI_ARCH}
.elif defined(MACHINE_ARCH) && !empty(MACHINE_ARCH) && \
	    exists(${GNUEFIDIR}/arch/${MACHINE_ARCH})
ARCHSUBDIR=	${MACHINE_ARCH}
.elif defined(MACHINE_CPU) && !empty(MACHINE_CPU) && \
	    exists(${GNUEFIDIR}/arch/${MACHINE_CPU})
ARCHSUBDIR=	${MACHINE_CPU}
.endif

M= ${GNUEFIDIR}/arch/${ARCHSUBDIR}

.if exists($M/Makefile.inc)
CPPFLAGS+= -I$M
.PATH.c: $M
.PATH.S: $M
.include "$M/Makefile.inc"
.endif

.PATH.c: ${GNUEFIDIR} ${GNUEFIDIST}/lib/${GNUEFIARCH} ${GNUEFIDIST}/lib ${GNUEFIDIST}/lib/runtime
.PATH.S: ${GNUEFIDIR} ${GNUEFIDIST}/lib/${GNUEFIARCH} ${GNUEFIDIST}/lib ${GNUEFIDIST}/lib/runtime

SRCS+=	boxdraw.c smbios.c console.c crc.c data.c debug.c dpath.c \
	error.c event.c guid.c hand.c hw.c init.c lock.c \
	misc.c print.c sread.c str.c \
	rtlock.c efirtlib.c rtstr.c vm.c rtdata.c \
	initplat.c math.c

CWARNFLAGS.gcc+= -Wno-unused-but-set-variable
COPTS.boxdraw.c= -Wno-missing-field-initializers
COPTS.guid.c= -Wno-missing-field-initializers
COPTS.smbios.c= -Wno-int-to-pointer-cast
COPTS.dpath.c= -Wno-missing-prototypes
COPTS.print.c= -Wno-missing-prototypes
COPTS.hw.c= -Wno-shadow

.include <bsd.lib.mk>

lib${LIB}.o:: ${OBJS:O}
	@echo building standard ${LIB} library
	@rm -f lib${LIB}.o
	@${LD} -r -o lib${LIB}.o `lorder ${OBJS} | tsort`

CPPFLAGS+=	-Wno-pointer-sign