1 # $NetBSD: Makefile.backend,v 1.1 2006/05/10 22:48:11 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}