Undo the xmalloc->malloc optimization FreeBSD made in certain cases
[dragonfly.git] / gnu / usr.bin / cc3 / cc1plus / Makefile
1 # $FreeBSD: src/gnu/usr.bin/cc/cc1plus/Makefile,v 1.33 2003/07/11 05:37:23 kan Exp $
2 # $DragonFly: src/gnu/usr.bin/cc3/cc1plus/Attic/Makefile,v 1.5 2004/02/03 03:47:11 dillon Exp $
3
4 .include "../Makefile.inc"
5
6 CFLAGS+=        -I${.CURDIR}/../config
7
8 .PATH: ${GCCDIR}/gcc/cp ${GCCDIR}/gcc ${GCCDIR}/libiberty
9
10 PROG=   cc1plus
11 SRCS=   parse+%DIKED.c parse.h cfns.h
12 SRCS+=  main.c cp-lang.c c-opts.c \
13         call.c class.c cvt.c decl.c decl2.c error.c except.c expr.c friend.c \
14         init.c lex.c mangle.c method.c pt.c ptree.c repo.c rtti.c search.c \
15         semantics.c spew.c tree.c typeck.c typeck2.c dump.c optimize.c \
16         xmalloc.c xexit.c
17
18 NOMAN=  1
19 NOSHARED?=yes
20
21 CFLAGS+= -I${GCCDIR}/gcc/cp -I.
22
23 DPADD+= ${LIBCC_INT} 
24 LDADD+= ${LIBCC_INT}
25
26 #-----------------------------------------------------------------------
27 # C++ parser
28
29 parse+%DIKED.c y.tab.h: parse.c
30         sed -e "s/malloc/xmalloc/g" \
31             -e "s/realloc/xrealloc/g" \
32             ${.ALLSRC:M*c} > ${.TARGET}
33
34 parse.h: y.tab.h
35         cp -pf y.tab.h ${.TARGET}
36         grep '^#define[   ]*YYEMPTY' ${.TARGET:S/h$/c/} >>${.TARGET}
37
38 cfns.h: cfns.gperf
39         gperf -o -C -E -k '1-6,$$' -j1 -D -N 'libc_name_p' \
40             ${.ALLSRC} > ${.TARGET}
41
42 CLEANFILES=     parse+%DIKED.c parse.c parse.h y.tab.h cfns.h
43
44 .include <bsd.prog.mk>