1# Despite the .c extension, these files and headers must be built by c++
2
3GCC_NO_LIBS=	yes
4GCC_LANG_DIR=	gcc/cp
5TOP_PREFIX=	../../
6
7.include "../../../Makefile.inc"
8.include "../../../Makefile.langs"
9
10LIB=		guts-cxx
11INTERNALLIB=
12
13# note C_TARGET_OBJS == CXX_TARGET_OBJS
14.for object in ${CXX_OBJS}
15. if ! ${C_COMMON_OBJS:M${object}}
16.  if ! ${C_TARGET_OBJS:M${object}}
17GUTS_CXXO+=	${object:T}
18.  endif
19. endif
20.endfor
21
22OBJS=		${GUTS_CXXO}
23SRCS=		${CXX_COMMON_SRCS}
24
25# hack to force c++ compiler to compile *.c files to create library
26.for cfile in ${GUTS_CXXO}
27${cfile}: ${cfile:.o=.c}
28	${CXX} ${STATIC_CXXFLAGS} ${CXXFLAGS} -c ${.IMPSRC} -o ${.TARGET}
29.endfor
30
31.include <bsd.lib.mk>
32