2013-12-06 12:04:52 +01:00
|
|
|
# $NetBSD: Makefile.backend,v 1.3 2013/11/28 12:08:56 mrg Exp $
|
2012-06-06 15:06:52 +02:00
|
|
|
|
|
|
|
NOMAN= # defined
|
2013-12-06 12:04:52 +01:00
|
|
|
.if defined(__MINIX)
|
2013-04-24 18:57:59 +02:00
|
|
|
BINDIR= /usr/bin
|
2013-12-06 12:04:52 +01:00
|
|
|
.else
|
|
|
|
BINDIR= /usr/libexec
|
|
|
|
.endif # defined(__MINIX)
|
2012-06-06 15:06:52 +02:00
|
|
|
CPPFLAGS+= -I${GCCARCH} -I${BACKENDOBJ} \
|
|
|
|
${G_ALL_CFLAGS:M-D*} ${G_INCLUDES:M-I*:N-I.*}
|
|
|
|
|
|
|
|
.include <bsd.own.mk>
|
|
|
|
|
|
|
|
DPADD= ${BACKENDOBJ}/libbackend.a ${LIBIBERTYOBJ}/libiberty.a
|
|
|
|
LDADD= -L${BACKENDOBJ} -lbackend -L${LIBIBERTYOBJ} -liberty
|
|
|
|
|
|
|
|
CLEANFILES+= ${PROG}-checksum.c ${PROG}-dummy dummy-checksum.d \
|
|
|
|
dummy-checksum.o genchecksum genchecksum.lo
|
|
|
|
|
|
|
|
.include <bsd.prog.mk>
|
|
|
|
|
|
|
|
# Don't auto-frob .y or .l files.
|
|
|
|
.l.c .y.c .y.h:
|
|
|
|
@true
|
|
|
|
|
|
|
|
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}
|
|
|
|
# This is a copy of the ${PROG} target from bsd.prog.mk.
|
|
|
|
DUMMYOBJS= ${SRCS:N${PROG}-checksum.c:.c=.o} dummy-checksum.o
|
|
|
|
${PROG}-dummy: ${DUMMYOBJS}
|
|
|
|
${_MKTARGET_LINK}
|
|
|
|
.if defined(DESTDIR)
|
|
|
|
${_CCLINK} -Wl,-nostdlib \
|
|
|
|
${LDFLAGS} ${LDSTATIC} -o ${.TARGET} ${_PROGLDOPTS} \
|
|
|
|
-B${_GCC_CRTDIR}/ -B${DESTDIR}/usr/lib/ \
|
|
|
|
${DUMMYOBJS} ${LDADD} \
|
|
|
|
-L${_GCC_LIBGCCDIR} -L${DESTDIR}/usr/lib
|
|
|
|
.else
|
|
|
|
${_CCLINK} ${LDFLAGS} ${LDSTATIC} -o ${.TARGET} ${_PROGLDOPTS} ${DUMMYOBJS} ${LDADD}
|
|
|
|
.endif # defined(DESTDIR)
|
|
|
|
${PROG}-checksum.c: genchecksum ${PROG}-dummy
|
|
|
|
${_MKTARGET_CREATE}
|
|
|
|
./genchecksum ${PROG}-dummy >${.TARGET}
|
|
|
|
|
|
|
|
# Find our (local) libraries
|
|
|
|
LIBGMPDIR!= cd ${NETBSDSRCDIR}/external/lgpl3/gmp/lib/libgmp && ${PRINTOBJDIR}
|
|
|
|
LIBMPFRDIR!= cd ${NETBSDSRCDIR}/external/lgpl3/mpfr/lib/libmpfr && ${PRINTOBJDIR}
|
2013-12-06 12:04:52 +01:00
|
|
|
LIBMPCDIR!= cd ${NETBSDSRCDIR}/external/lgpl3/mpc/lib/libmpc && ${PRINTOBJDIR}
|
2012-06-06 15:06:52 +02:00
|
|
|
|
|
|
|
LIBGMP= ${LIBGMPDIR}/libgmp.a
|
|
|
|
LIBMPFR= ${LIBMPFRDIR}/libmpfr.a
|
|
|
|
LIBMPC= ${LIBMPCDIR}/libmpc.a
|