Project

General

Profile

Submit #2865 ยป 0001-boot1-Do-not-build-hammer2-related-stuff-if-WANT_HAM.patch

Anonymous, 12/13/2015 11:31 PM

View differences:

lib/libstand/Makefile
SRCS+= dosfs.c ext2fs.c
SRCS+= splitfs.c
SRCS+= hammer1.c
.if defined(WANT_HAMMER2)
SRCS+= hammer2.c
.endif
.include <bsd.lib.mk>
sys/boot/pc32/boot2/Makefile
.for s in _32 _64
.if defined(WANT_HAMMER2)
CFLAGS_HAMMER2=-DHAMMER2FS
OBJ_HAMMER2=hammer2$s.o scrc32$s.o
SRC_HAMMER2=hammer2.c scrc32.c
.else
CFLAGS_HAMMER2=
OBJ_HAMMER2=
SRC_HAMMER2=
.endif
_ADDCFLAGS$s:= -DNSECT=${NSECT$s}
_ts= $s
.if ${_ts} == "_64"
_ADDCFLAGS$s+= -DDISKLABEL64
_ADDCFLAGS$s+= -DHAMMER2FS -DUFS
_ADDOBJS$s+= hammer2$s.o ufsread$s.o scrc32$s.o
_ADDCFLAGS$s+= ${CFLAGS_HAMMER2} -DUFS
_ADDOBJS$s+= ${OBJ_HAMMER2} ufsread$s.o
.else
_ADDCFLAGS$s+= -DUFS -DUFS1_ONLY
_ADDOBJS$s+= ufsread$s.o
......
#${.CURDIR}/../../common/ufsread.c ${.CURDIR}/../../../../lib/libstand/hammer2.c
boot2$s.s: boot2.c boot2$s.h ufsread.c hammer2.c scrc32.c
boot2$s.s: boot2.c boot2$s.h ufsread.c ${SRC_HAMMER2}
${CC} ${CFLAGS} ${_ADDCFLAGS$s} -S -o boot2$s.s.tmp ${.CURDIR}/boot2.c
sed -e '/align/d' -e '/nop/d' < ${.TARGET}.tmp > ${.TARGET}
rm -f ${.TARGET}.tmp
......
bootasmdef.nx \
${_ADDOBJS$s}
.if defined(WANT_HAMMER2)
hammer2$s.o: hammer2.c
${CC} ${CFLAGS} ${_ADDCFLAGS$s} ${.ALLSRC} -o ${.TARGET} -c
ufsread$s.o: ufsread.c
scrc32$s.o: scrc32.c
${CC} ${CFLAGS} ${_ADDCFLAGS$s} ${.ALLSRC} -o ${.TARGET} -c
.endif
scrc32$s.o: scrc32.c
ufsread$s.o: ufsread.c
${CC} ${CFLAGS} ${_ADDCFLAGS$s} ${.ALLSRC} -o ${.TARGET} -c
.endfor
    (1-1/1)