diff --git a/stand/uboot/Makefile b/stand/uboot/Makefile --- a/stand/uboot/Makefile +++ b/stand/uboot/Makefile @@ -15,9 +15,9 @@ .include "${.CURDIR}/arch/${MACHINE_CPUARCH}/Makefile.inc" -.if ${MK_PIE} == "yes" +LOADER_UBLDR_BIN?= yes +.if ${LOADER_UBLDR_BIN} != "no" FILES+= ubldr ubldr.bin -OBJS+= ${SRCS:N*.h:R:S/$/.o/g} .else PROG= ubldr .endif @@ -75,6 +75,11 @@ CFLAGS+= -DDISK_DEBUG .endif +.if ${LOADER_UBLDR_BIN} != "no" +OBJS+= ${SRCS:N*.h:R:S/$/.o/g} +ubldr ubldr.bin ubldr.pie: ${OBJS} +.endif + DPADD= ${LDR_INTERP} ${LIBFDT} ${LIBSA} LDADD= ${LDR_INTERP} ${LIBFDT} ${LIBSA} diff --git a/stand/uboot/arch/powerpc/Makefile.inc b/stand/uboot/arch/powerpc/Makefile.inc --- a/stand/uboot/arch/powerpc/Makefile.inc +++ b/stand/uboot/arch/powerpc/Makefile.inc @@ -3,4 +3,4 @@ .PATH: ${SYSDIR}/libkern SRCS+= ucmpdi2.c -MK_PIE= no +LOADER_UBLDR_BIN= no