aab7d4269d92268eb275a3905b56770f8066f558
[dragonfly.git] / gnu / usr.bin / cc50 / cc_tools / libcpp / Makefile
1 # Despite the source files ending in ".c", the c++ compiler needs to build
2 # everything.  We have to roll our own targets to properly support this.
3
4 GCC_NO_PATH=    yes
5 LOCAL_CONFIG=   yes
6 .include "../Makefile.inc"
7 .PATH: ${GCCDIR}/libcpp
8
9 LIB=            cpp
10
11 CFLAGS+=        -I${.CURDIR}
12 CFLAGS+=        -Duchar="unsigned char"
13 GOOD_CONFIG=    ${.CURDIR}/../../support-libs/libcpp/config.h
14
15 SRCS=           charset.c \
16                 directives-only.c \
17                 directives.c \
18                 errors.c \
19                 expr.c \
20                 files.c \
21                 identifiers.c \
22                 init.c \
23                 lex.c \
24                 line-map.c \
25                 macro.c \
26                 mkdeps.c \
27                 pch.c \
28                 symtab.c \
29                 traditional.c
30
31 # Helper for bootstrapping over iconv() removal of 'const' (c++ issue)
32 .if ${WORLD_VERSION} <= 400301
33 CFLAGS+=        -fpermissive
34 .endif
35
36 localedir.h:
37         touch $@
38
39 config.h: ${GOOD_CONFIG}
40         cp ${.ALLSRC} .
41
42 beforedepend: localedir.h config.h
43 afterdepend: libcpp.na
44
45 CLEANFILES=     localedir.h config.h
46
47 .include "../../Makefile.intcxx_lib"