NetBSD/external/gpl3/gcc.old/usr.bin/Makefile.checksum

28 lines
945 B
Makefile

# $NetBSD: Makefile.checksum,v 1.1.1.1 2015/09/23 03:03:39 mrg Exp $
# Makefile fragment to build $PROG-checksum. depends upon having
# $PROG and $CHECKSUM_OBJS set before including.
.ifndef _EXTERNAL_GPL3_GCC_USR_BIN_MAKEFILE_CHECKSUM_
_EXTERNAL_GPL3_GCC_USR_BIN_MAKEFILE_CHECKSUM_=1
CLEANFILES+= ${PROG}-checksum.c genchecksum genchecksum.lo checksum-options
CPPFLAGS.genchecksum.c+= -DGENERATOR_FILE -I${GCCARCH} -I${DIST}/include -I${BACKENDOBJ}
genchecksum.lo:
genchecksum: genchecksum.lo
${_MKTARGET_LINK}
${HOST_LINK.c} -o ${.TARGET} ${.ALLSRC} ${NBCOMPATLIB} ${HOSTLIBIBERTY}
# Actual backend Makefile should define CHECKSUM_OBJS appropriately.
${PROG}-checksum.c: genchecksum ${CHECKSUM_OBJS} checksum-options
${_MKTARGET_CREATE}
./genchecksum ${CHECKSUM_OBJS} checksum-options >${.TARGET}.tmp && mv ${.TARGET}.tmp ${.TARGET}
checksum-options:
#echo "${CXX} ${CXXFLAGS} ${LDFLAGS}" >${.TARGET}
echo "" >${.TARGET}
.endif