xref: /dragonfly/gnu/usr.bin/cc80/support-libs/libcpp/Makefile (revision 225cb38fefe493d6b322d9e7699d9987ec2c56e5)
1GCC_NO_PATH=        yes
2GCC_NO_LIBS=        yes
3LOCAL_CONFIG=       yes
4.include "../Makefile.inc"
5.PATH: ${GCCDIR}/libcpp
6
7LIB=                cpp
8INTERNALLIB=        YES
9
10CFLAGS+=  -Duchar="unsigned char"
11CXXFLAGS+=          ${NOEXCEPTION_FLAGS}
12
13.if defined(BOOTSTRAPPING)
14CFLAGS+=  -DBOOTSTRAPPING
15.endif
16
17CXX_BUILD=          charset.c \
18                    directives-only.c \
19                    directives.c \
20                    errors.c \
21                    expr.c \
22                    files.c \
23                    identifiers.c \
24                    init.c \
25                    lex.c \
26                    line-map.c \
27                    macro.c \
28                    mkdeps.c \
29                    pch.c \
30                    symtab.c \
31                    traditional.c
32
33OBJS=               ${CXX_BUILD:.c=.o}
34
35# hack to force c++ compiler to compile *.c files to create library
36.for cfile in ${CXX_BUILD}
37${cfile:.c=.o}: ${cfile} localedir.h
38          ${CXX} ${STATIC_CXXFLAGS} ${CXXFLAGS} -c ${.IMPSRC} -o ${.TARGET}
39.endfor
40
41localedir.h:
42          touch $@
43
44CLEANFILES=         localedir.h
45
46.include <bsd.lib.mk>
47