collect2(1): Trim sources that create empty objects.
[dragonfly.git] / gnu / usr.bin / cc80 / backends / programs / collect2 / Makefile
CommitLineData
2233c95b 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
5GCC_LANG_DIR= gcc
6TOP_PREFIX= ../../
7
8.include "../../../Makefile.inc"
9.include "../../../Makefile.langs"
10
11PROG_CXX= collect2
12NOMAN= yes
13
14###CFLAGS+= -static-libstdc++
15
16# verbatim from gcc/lto/Make-lang.in
8b851f84 17COLLECT_OBJS= collect2.o tlink.o vec.o ggc-none.o \
2233c95b 18 collect-utils.o file-find.o hash-table.o
8b851f84 19# only when CROSS_AIX_SUPPORT
20#COLLECT_OBJS+= collect2-aix.o
21
2233c95b 22OBJS= ${COLLECT_OBJS:T}
23SRCS=
2233c95b 24LIBS= ${LIBCOMMON} ${LIBCPP} ${LIBBACKTRACE} ${LIBIBERTY} \
25 ${LIBDECNUMBER}
26LDADD= ${LIBS}
27DPADD= ${LIBS}
28
29
30# hack to force c++ compiler to compile *.c files to create library
31.for ofile in ${OBJS}
32${ofile}: ${ofile:.o=.c}
33 ${CXX} ${STATIC_CXXFLAGS} ${CXXFLAGS} -c ${.IMPSRC} -o ${.TARGET}
34.endfor
35
36.include <bsd.prog.mk>