1 # $NetBSD: Makefile.backend,v 1.2 2011/07/21 03:13:32 mrg Exp $
6 CPPFLAGS+= -I${GCCARCH} -I${BACKENDOBJ} \
7 ${G_ALL_CFLAGS:M-D*} ${G_INCLUDES:M-I*:N-I.*}
11 DPADD= ${BACKENDOBJ}/libbackend.a ${LIBIBERTYOBJ}/libiberty.a
12 LDADD= -L${BACKENDOBJ} -lbackend -L${LIBIBERTYOBJ} -liberty
14 CLEANFILES+= ${PROG}-checksum.c ${PROG}-dummy dummy-checksum.d \
15 dummy-checksum.o genchecksum genchecksum.lo
17 .include <bsd.prog.mk>
19 # Don't auto-frob .y or .l files.
23 CPPFLAGS.genchecksum.c+= -DGENERATOR_FILE -I${GCCARCH} -I${DIST}/include -I${BACKENDOBJ}
26 genchecksum: genchecksum.lo
28 ${HOST_LINK.c} -o ${.TARGET} ${.ALLSRC} ${NBCOMPATLIB} ${HOSTLIBIBERTY}
29 # This is a copy of the ${PROG} target from bsd.prog.mk.
30 DUMMYOBJS= ${SRCS:N${PROG}-checksum.c:.c=.o} dummy-checksum.o
31 ${PROG}-dummy: ${DUMMYOBJS}
34 ${_CCLINK} -Wl,-nostdlib \
35 ${LDFLAGS} ${LDSTATIC} -o ${.TARGET} ${_PROGLDOPTS} \
36 -B${_GCC_CRTDIR}/ -B${DESTDIR}/usr/lib/ \
37 ${DUMMYOBJS} ${LDADD} \
38 -L${_GCC_LIBGCCDIR} -L${DESTDIR}/usr/lib
40 ${_CCLINK} ${LDFLAGS} ${LDSTATIC} -o ${.TARGET} ${_PROGLDOPTS} ${DUMMYOBJS} ${LDADD}
41 .endif # defined(DESTDIR)
42 ${PROG}-checksum.c: genchecksum ${PROG}-dummy
44 ./genchecksum ${PROG}-dummy >${.TARGET}
46 # Find our (local) libraries
47 LIBGMPDIR!= cd ${NETBSDSRCDIR}/external/lgpl3/gmp/lib/libgmp && ${PRINTOBJDIR}
48 LIBMPFRDIR!= cd ${NETBSDSRCDIR}/external/lgpl3/mpfr/lib/libmpfr && ${PRINTOBJDIR}
49 LIBMPCDIR!= cd ${NETBSDSRCDIR}/external/lgpl2/mpc/lib/libmpc && ${PRINTOBJDIR}
51 LIBGMP= ${LIBGMPDIR}/libgmp.a
52 LIBMPFR= ${LIBMPFRDIR}/libmpfr.a
53 LIBMPC= ${LIBMPCDIR}/libmpc.a