1# If we defined SRCS, the mkdep fails because it evaluates files with .c
2# extension with cc instead of c++ (go figure).  To avoid that, we need
3# to define OBJS directly
4
5TOP_PREFIX=	../../
6
7.include "../../../Makefile.inc"
8
9PROG_CXX=	lto-wrapper
10NOMAN=		yes
11
12SRCS=
13OBJS=		lto-wrapper.o \
14		collect-utils.o \
15		ggc-none.o
16
17GUTS=		../../guts/guts-common/libguts-common.a \
18		../../guts/guts-target/libguts-target.a
19LIBS=		${LIBCOMMONTARG} ${LIBCOMMON} ${LIBCPP} \
20		${LIBBACKTRACE} ${LIBIBERTY} ${LIBDECNUMBER}
21LDADD=		${LIBS}
22DPADD=		${LIBS}
23
24
25# hack to force c++ compiler to compile *.c files to create library
26.for ofile in ${OBJS}
27${ofile}: ${ofile:.o=.c}
28	${CXX} ${STATIC_CXXFLAGS} ${CXXFLAGS} -c ${.IMPSRC} -o ${.TARGET}
29.endfor
30
31.include <bsd.prog.mk>
32