xref: /freebsd/usr.sbin/uathload/Makefile (revision 49b49cda41feabe3439f7318e8bf40e3896c7bf4)
1# $FreeBSD$
2
3PROG=	uathload
4MAN=	uathload.8
5
6SRCS=	uathload.c ar5523.bin
7
8CLEANFILES=	ar5523.bin
9
10# It's hard to tag ar5523.o with the proper gnu note saying that it has a
11# non-executable stack, so ld doesn't properly mark his executable as
12# not having an executable stack. Mark it explicitly, but only for those
13# platforms that support his feature (otherwise signals don't work).
14# Note: Newer versions of ld than is in the tree ignore -z.
15.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "powerpc64"
16LDFLAGS+=	-Wl,-z,noexecstack
17.endif
18
19# The conversion from .bin to .o doesn't always produce a pedantically correct
20# .o's. And it doesn't matter, so turn off the mismatch warnings since it is
21# pure data. On mips64 here's no easy way to produce a proper .o.
22LDFLAGS+=	-Wl,--no-warn-mismatch
23
24ar5523.bin: ${.CURDIR}/../../sys/contrib/dev/uath/ar5523.bin.uu
25	uudecode -p ${.CURDIR}/../../sys/contrib/dev/uath/ar5523.bin.uu > ${.TARGET}
26
27ar5523.o: ar5523.bin
28	${LD} -b binary -d -warn-common -r -d -o ${.TARGET} ar5523.bin
29
30.include <bsd.prog.mk>
31